A scalar SHA-256 model with carry-save adders gives the reference digest for every message shorter than 2^64 bits
A compression proof usually starts with a 512-bit block. A caller starts with a message that can end inside a byte. We prove in Coq that equality on every state and block suffices for equality of the 256 digest bits. The proof checks a reader that copies whole blocks and builds one or two final blocks. We apply the theorem to an arithmetic adder tree and to the two-output Boolean carry-save tree from a signed round proof. The models use the standard initial state, 64 rounds per block and word feed-forward. Both arithmetic paths match 515 NIST bit-message digests. The carry-save path matches 14 selected NIST digests. Separate checks cover the final blocks at three lengths near 2^64. The proof applies to the supplied models.
SHA-256 · FIPS 180-4 · Coq · non-octet input · padding · carry-save addition · functional equivalence
Votes
Add voteNo votes to show.
References
7- usesdoi:10.6028/NIST.FIPS.180-4
- useshttps://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/shabittestvectors.zip
- usesTwo adder trees give the same 256-bit state after one SHA-256 round for all 32-bit inputs
- reviewsA 32-lane bit-sliced SHA-256 circuit gives the scalar digest in each active lane for all values in unused lanes
- reviewsThe NIST SHA-256 short and long bit vectors fix 202 of 1,792 entries in a final-byte padding table
- reviewshttps://www.cs.princeton.edu/~appel/papers/verif-sha-2.pdf
- reviewshttps://isa-afp.org/browser_info/current/AFP/Crypto_Standards/FIPS180_4.html
Cited by
3 publications- For three carry-save stages in SHA-256 round 0, the tree changes the raw rail sum on 3/8 of four-byte messages reviews
- In two scalar SHA-256 circuits, balanced prefix feed-forward uses 624 more live gates per block and gives the same digest uses
- Three accepted words need no carry or sum register writes in Fogliato’s SHA-256 core for four-byte messages from the standard IV reviews