How to generate header file fsl_public_key.h from .pem file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to generate header file fsl_public_key.h from .pem file

661 Views
asmaa
Contributor V

Hello All,

We are using imx7D for our product and android OS. I want to change vbmeta fsl_public_key.h in uboot with our public key.

 

Before generating our RSA key pair, I thought of verifying the present one. As mentioned in the header file (This public key is generated from testkey_rsa4096.pemhttps://source.codeaurora.org/external/imx/uboot-imx/tree/lib/avb/fsl/fsl_public_key.h?h=lf_v2020.04 

I found the corresponding private key (testkey_rsa4096.pem) in external/avb/test/data/ folder of android source code. However, when I extracted the public key from it and generated a hex file, the content is different from the header file in uboot.

I would like to know what method was used to convert the public key to hex(header file)?.

 

Thanks,

Asma

Labels (1)
0 Kudos
2 Replies

527 Views
mdonahoe
Contributor III

xxd -i custom_rsa4096_public.bin > custom.h

0 Kudos

647 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Please follow IMX_ANDROID_SECURITY_USERS_GUIDE:

https://www.nxp.com/docs/en/user-guide/IMX_ANDROID_SECURITY_USERS_GUIDE.pdf

0 Kudos