2024-10-11 01:26 AM
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
Solved! Go to Solution.
2024-10-12 05:10 AM
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
2024-10-12 05:10 AM
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