See a https://github.com/konradwilk/sha1 for the full git history of this code. Branch name is submission-mpw-two.
This is an implementation of RFC 3174 SHA-1 engine.
It is not the most secure one nowadays (it is still used for git commit ids and TPM PCR values), but it looked like the easiest of the SHA engines to implement within two weeks. The communication channel is via WishBone commands to provide sixteen words after which the engine starts and computes the digest in about 160 cycles. Then digest can be retrieved via the wishbone. There is a IRQ line so when it has completed it will bring it high if that is enabled.
The reason for implementing this instead of say SHA256 was to get a good understanding of the Verilog code; how it ends up in the Caravel harness; the complications that have to be dealt with when trying to put it on a die; and in general to have fun! It was really neat seeing a SHA1 accelerator do the operations.
Thank you for making the Caravel project accessible to folks.
If you are collaborating on this project, please click here to access your collaboration files, and click "Accept Share" in the actions column if you haven't done so already.
Konrad Rzeszutek Wilk
The SHA1 engine, while not the most secure nowadays is still used by git commits and TPM PCR values. It has the implementation of RFC3174 using Method 1 along with a WishBone implementation to slurp up 512 bits and then in 160 cycles provide the digest values.
06/24/21 19:33:19 PDT