cancel
Showing results for 
Search instead for 
Did you mean: 

PKHTH calculation from public key hashes

zakariazh
Associate II

Hello,

I have 8 pairs of public and private keys with the hashes of each public key and I would like to calculate the associated PKHTH value without necessarily using the STM32MP_KeyGen_CLI tool (for integration with our manufacturing tool).

I tried to calculate the sha256 of all the concatenated hashes of the public keys but this value does not correspond to the one calculated by STM32MP_KeyGen_CLI. Is there anything else I should include in my PKHTH calculation?

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
zakariazh
Associate II

I've found how to do it, just get the ESCDA public key without the asn1 tag (“04”) then add the ECDSA algorithm field at the beginning and calculate the sha256 of the whole. This will give the hash of this key.

Finally, calculate the sha256 of all these hashes to get the PKHTH.

 

Thank you

View solution in original post

1 REPLY 1
zakariazh
Associate II

I've found how to do it, just get the ESCDA public key without the asn1 tag (“04”) then add the ECDSA algorithm field at the beginning and calculate the sha256 of the whole. This will give the hash of this key.

Finally, calculate the sha256 of all these hashes to get the PKHTH.

 

Thank you