#### Topic: Cryptographic operations with wolfTPM

Hello,

I am trying to use wolfTPM wrappers to encrypt some data (random number) using a PEM RSA public key. My use case is to read a PEM containing a Public RSA Key and convert this external public key in a key to be used in wolfTPM. This can be done using the wolfTPM2_RsaKey_PubPemToTpm() wrapper. Next, I am using the loaded RSA key (WOLFTPM2_KEY) to encrypt some data using the wolfTPM2_RsaEncrypt() wrapper.

My goal is to use RSA/ECB/PKCS1Padding as cypher type on the encryption operation, but I am not getting how to set this parameters on the wolfTPM2_RsaEncrypt() wrapper. Does the wolfTPM has support for this operation? Does the encryption wrapper's scheme parameter have anything related to it? For example, TPM_ALG_NULL, TPM_ALG_OAEP or TPM_ALG_RSAES?

I've already used the wolfTPM wrappers to encrypt some data with the public key generated using some Online RSA Key Generator (https://www.devglan.com/online-tools/rs … decryption), then I got the encrypted data and tryied to decrypt it using the private part of the key on the Online RSA Key Generator, but the decryption fails with RSA/ECB/PKCS1Padding as cypher type.

Thanks in advance.