forked from lowRISC/opentitan
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cryptolib] Fix CSRNG driver for using the SW command interface of CSRNG
Previously, the main SM state was only checked for the first command word but not for the additional data. Not checking the main SM state before writing the additional data could cause CSRNG to drop additional data provided by software while handling a hardware command. Once the hardware command was handled, the software instance would win arbitration and CSRNG would wait for software to provide the dropped additional data, thereby stalling the entire entropy complex. This would happen for example if a HW instance request would collide with a software request. Since the software command FIFO is only 2 entries deep, it can only be guaranteed to absorb 2 words if the software interface doesn't win arbitration immediately. This commit contains the ES / CSRNG v.1.0.0 specific version of lowRISC#23166. In addition, it adds some more comments to properly document the underlying hardware issue directly in the cryptolib implementation. This is related to lowRISC#22209 and lowRISC#22210. Signed-off-by: Pirmin Vogel <[email protected]>
- Loading branch information
Showing
1 changed file
with
50 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters