Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ot] hw/opentitan: ot_hmac: Add STOP/CONTINUE commands to HMAC
Adds the STOP/CONTINUE commands to the OpenTitan HMAC model. These commands allow you to stop a SHA/HMAC hash after the next full round of hashing/compression, and retrieve the partial digest so that this context can be restored later and computation can continue. This lets users stop/start the HMAC as needed, and better cache hash computations. To correctly implement these commands, in addition to writing back the partial intermediary digests of the `sha_process` operations, additional conditional logic is introduced on stop commands for only processing the FIFO until the next hash block boundary, and an additional check is added to the `process` call for the hash being completed. Note that this commit still hard-codes for SHA256, and does not update the corresponding DIGEST / MESSAGE LENGTH registers to be writable. Signed-off-by: Alex Jones <[email protected]>
- Loading branch information