chipsalliance / caliptra-sw

Caliptra software (ROM, FMC, runtime firmware), and libraries/tools needed to build and test
Apache License 2.0
96 stars 44 forks source link

Implement hash chain support in Caliptra ROM #1815

Open bluegate010 opened 3 days ago

bluegate010 commented 3 days ago

This supports Stable Identity. Requirements:

bluegate010 commented 3 days ago

We'll implement SVN-specific keys using a hash chain. However, to make this FIPS compliant, each link in the chain will need to be a KDF. Hopefully a future version of SP 800-133 will allow cryptographic keys to be chained together via hashes.

We will have to anchor the hash chain to the min-SVN-since-cold-boot value, instead of simply the current SVN. The reason being:

In short: if we update-reset from an older SVN to a newer SVN, the hash chain will remain where it is. If we update-reset from a newer SVN to an older SVN, ROM will crank the hash chain until it corresponds with the older SVN, before it allows that older firmware to boot.

This is because the only secret available across update-resets from which we could restart the hash chain is mingled with the FMC hash, and therefore is not suitable for anchoring Stable Identity.