cancel
Showing results for 
Search instead for 
Did you mean: 

Preparing RSA public key for SBSFU verification on the STM32

Ikbal
Associate II

Hello,

I am trying to add a new crypto scheme in the SBSFU application for STM32H7B3-DK.

I have implemented RSA_PKCS1v15_Verify() function using STCrypto lib in the SE_CRYPTO_Authenticate_Metadata() for RSA verification. As per my understanding the RSA_PKCS1v15_Verify() need modulus and public exponent component for verification using RSA key. Here public exponent is fixed and modulus is translate using KeysAndImages tool.

My question is quit specific to the KeysAndImages tools translate_key scripts. Is translate_key scripts tools specific to the ECDSA only or it is generic to the all crypto scheme?

I have already changed the signing method for RSA in place of ECDSA in the postbuild script.

Thanks and Regards,

Ikbal

1 REPLY 1
Fred
ST Employee

Hi @Ikbal​ ,

actually, the role of translate_key is to produce an execute only code to load the key in RAM (so that it can be used with PCROP).

So, most of the code is only producing the proper assembly instructions to load the code (a sequence of MOV) under the requested function name.

Hence, if your key length is supported in translate, then I guess the code will generate the appropriate set of MOV instructions.

But, as you work with RSA, I think your length will not be supported.

So, I think you need to update this code.

Thanks & Regards,

Fred