Commit Graph

4 Commits

Author SHA1 Message Date
Stephen Heumann
2d8c85bd98 Unroll SHA-1 loop with variables substituted to avoid cycling values around.
SHA-1 has five state variables (a,b,c,d,e), and each iteration of the core loop cycles their values around (e.g. a->b), in some cases with modifications. By unrolling the loop by a factor of five and appropriately substituting the values operated on in each iteration, we can avoid actually doing the copies implied by this cycling, which gives a fairly significant performance gain.
2017-06-30 00:33:16 -05:00
Stephen Heumann
aab47e38e7 Compute SHA-1 message schedule 20 elements at a time, reusing storage.
The reduces the storage needed and boosts performance, since the whole schedule is contained in the direct page.
2017-06-29 22:22:06 -05:00
Stephen Heumann
7182fc5817 Use separate loops for the four parts of the SHA-1 computation. 2017-06-29 20:51:36 -05:00
Stephen Heumann
a519776847 Add implementation of the basic block-processing function for SHA-1. 2017-06-29 16:54:49 -05:00