Closed fhsuman closed 3 months ago
Generating 4096 bit RSA key using openssl took 5 seconds on our ARM Cortex55 CPU
real 0m 5.04s user 0m 5.04s sys 0m 0.00s
Same key generation using OPTEE took more than 103 seconds using below code
TEE_AllocateTransientObject(TEE_TYPE_RSA_KEYPAIR, 4096, &key); TEE_GenerateKey(key, 4096, NULL, 0);
D/TA: TA_OpenSessionEntryPoint: Invoking TA M/TA: Requesting RSA KEY Generation real 1m 43.75s user 0m 0.00s sys 1m 43.73s
OPTEE is using the same DDR memory that is used by Linux.
Any insight, why OPTEE is taking so much time to generate RSA key
Find out the root cause. It seems our HW RNG is bit slower.
Generating 4096 bit RSA key using openssl took 5 seconds on our ARM Cortex55 CPU
time openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:4096
real 0m 5.04s user 0m 5.04s sys 0m 0.00s
Same key generation using OPTEE took more than 103 seconds using below code
TEE_AllocateTransientObject(TEE_TYPE_RSA_KEYPAIR, 4096, &key); TEE_GenerateKey(key, 4096, NULL, 0);
time teec_test
D/TA: TA_OpenSessionEntryPoint: Invoking TA M/TA: Requesting RSA KEY Generation real 1m 43.75s user 0m 0.00s sys 1m 43.73s
OPTEE is using the same DDR memory that is used by Linux.
Any insight, why OPTEE is taking so much time to generate RSA key