Import ECC key into HSE FW

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

Import ECC key into HSE FW

Jump to solution
1,415 Views
IAussman
Contributor III

Dear NXP community,

I'm currently trying to import ECC public key into HSE FW.

OpenSSL has generated the private and public key with ".pem" extension.

So my question is, how to convert this pem file into something that could be used for key import.

Thank you for your support.

Best regards,

 

0 Kudos
Reply
1 Solution
1,322 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @IAussman 

0x04 is a prefix only which says that it's uncompressed format.

Regards,

Lukas

View solution in original post

5 Replies
1,384 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @IAussman 

see please attached document.

Regards,

Lukas

1,333 Views
IAussman
Contributor III

Hi @lukaszadrapa ,

Is there any reason why the first byte of the ECC public key has been removed in the code source ?

Thank you.

Best regards,

 

0 Kudos
Reply
1,323 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @IAussman 

0x04 is a prefix only which says that it's uncompressed format.

Regards,

Lukas

1,362 Views
IAussman
Contributor III
Hi @lukaszadrapa ,

Thank you for your rapid response. I've followed the instructions for generating the ECC key.

HSE FW reference manual says that we have to format the key catalog prior to any key provisioning. By doing so (format catalog), I got an error saying "operation is not allowed". In my code source LC= CUST_DEL, so I should have super user rights.

If I bypass the catalog formating, I'm also getting the same error on the key import (NOT_ALLOWED).

Do you have any suggestions ? Thank you.

Below the code:

Crypto_Init(NULL_PTR);

RetVal = Crypto_Exts_FormatKeyCatalogs();

Crypto_KeyElementSet(CryptoConf_CryptoKey_ECC_PublicKey, /* CryptoKeyId */
CryptoConf_CryptoKeyElement_CryptoKeyElement_ECC_Public, /* KeyElementId */
SEC_au8Ecc256PubKey, /*Ecc public key address */
ECC_PUB_KEY_SZ /* Ecc public key size */);
1,342 Views
IAussman
Contributor III
Problem solved by setting Key_Owner to OWNER_CUST for NvmKeyCatalog, and Key Owner to OWNER_ANY for RamKeyCatalog.

Best regards,