Hello,

I am trying to encrypt a file with a key generated by the TPM. I got everything working and can generate rsa keys with no problem. But when I try to run the following command
$ tpm2_create -C key2.ctx -Gaes -u key3.pub -r key3.priv
I get an error:
ARNING:esys:src/tss2-esys/api/Esys_Create.c:366:Esys_Create_Finish() Received TPM Error 
ERROR:esys:src/tss2-esys/api/Esys_Create.c:116:Esys_Create() Esys Finish ErrorCode (0x0000012f) 
ERROR: Esys_Create(0x12F) - tpm:error(2.0): authValue or authPolicy is not available for selected entity
ERROR: Unable to run tpm2_create
key2 is loaded, so I don't know what the error is. I am using version 3.0.2 from the GitHub repository and running everything in a Raspberry Pi 3. I have been reading the manual and the option for generating an AES key is -Gaes, so I don't understand why it is not working.

Thanks in advance for your help.

Iratxe