PKHTH calculation from public key hashes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-10-11 1: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.
- Labels:
-
Security
-
STM32MP25 Lines ST-Boards
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-10-12 5: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-10-12 5: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
