Closed gunaMect closed 10 months ago
optee_example_acipher optee_example_acipher: Unexpected number of arguments 0 (expected 2) usage: optee_example_acipher optee_example_acipher 16 text-to-encrypt optee_example_acipher: TEEC_InvokeCommand(TA_ACIPHER_CMD_GEN_KEY): 0xffff000a (error origin 0x4)
optee_example_acipher optee_example_acipher: Unexpected number of arguments 0 (expected 2) usage: optee_example_acipher
optee_example_acipher 16 text-to-encrypt optee_example_acipher: TEEC_InvokeCommand(TA_ACIPHER_CMD_GEN_KEY): 0xffff000a (error origin 0x4)
D/TC:? 0 tee_ta_init_pseudo_ta_session:299 Lookup pseudo TA a734eed9-d6a1-4244-aa50-7c99719e7b7b D/TC:? 0 ldelf_load_ldelf:91 ldelf load address 0x40006000 D/LD: ldelf:134 Loading TS a734eed9-d6a1-4244-aa50-7c99719e7b7b D/TC:? 0 ldelf_syscall_open_bin:142 Lookup user TA ELF a734eed9-d6a1-4244-aa50-7c99719e7b7b (Secure Storage TA) D/TC:? 0 ldelf_syscall_open_bin:146 res=0xffff0008 D/TC:? 0 ldelf_syscall_open_bin:142 Lookup user TA ELF a734eed9-d6a1-4244-aa50-7c99719e7b7b (REE) D/TC:? 0 ldelf_syscall_open_bin:146 res=0 D/LD: ldelf:168 ELF (a734eed9-d6a1-4244-aa50-7c99719e7b7b) at 0x40024000 E/TA: cmd_gen_key:35 TEE_AllocateTransientObject(0xa1000030, 16): 0xffff000a D/TC:? 0 tee_ta_invoke_command:823 Error: ffff000a of 4 D/TC:? 0 tee_ta_close_session:512 csess 0x14059c90 id 1 D/TC:? 0 tee_ta_close_session:531 Destroy session D/TC:? 0 destroy_context:308 Destroy TA ctx (0x14059c30)
On Analysing the source code, it is getting failed to generate RSA key pair -> https://github.com/linaro-swg/optee_examples/blob/378dc0db2d5dd279f58a3b6cb3f78ffd6b165035/acipher/ta/acipher_ta.c#L22
Here -> E/TA: cmd_gen_key:35 TEE_AllocateTransientObject(0xa1000030, 16): 0xffff000a Error code 0xffff000a indicates - TEE_ERROR_NOT_SUPPORTED and 0xa1000030 - TEE_TYPE_RSA_KEYPAIR from optee_os/lib/libutee/include.
Is the RSA_KEYPAIR generation not supported in QEMU environment. Can anyone help me resolve this issue? Thanks
Argument is the the RSA private size expressed in bits. Try with 256, 384, etc...
Thanks @etienne-lms, it worked.
@gunaMect, do you want to propose a patch in acipher/host/main.c to make helper message "usage: %s <key_size> <string to encrypt> more explicit about what refers to?
"usage: %s <key_size> <string to encrypt>
I am trying to run the optee_example_acipher example in my QEMU environment, but getting the below error
Client application logs:
Trusted application logs:
On Analysing the source code, it is getting failed to generate RSA key pair -> https://github.com/linaro-swg/optee_examples/blob/378dc0db2d5dd279f58a3b6cb3f78ffd6b165035/acipher/ta/acipher_ta.c#L22
Here -> E/TA: cmd_gen_key:35 TEE_AllocateTransientObject(0xa1000030, 16): 0xffff000a Error code 0xffff000a indicates - TEE_ERROR_NOT_SUPPORTED and 0xa1000030 - TEE_TYPE_RSA_KEYPAIR from optee_os/lib/libutee/include.
Is the RSA_KEYPAIR generation not supported in QEMU environment. Can anyone help me resolve this issue? Thanks