SHA-2 performance: keep the message schedule in locals
Rewrite the block functions of SHA224Digest, SHA256Digest and LongDigest (SHA-384/512/512t) to hold the 16 schedule words in rotating locals and run 16 unrolled rounds per pass, instead of expanding the full 64/80-word schedule into an array first. The X/W buffers shrink to 16 words, which also makes the reset() clear and Memoable copy 4-5x smaller.
P
Peter Dettman committed
9d5432fc64694f88ea721fffa600ced949b26a21
Parent: b51452f