Every bit cut of a legal SHA-256 message preserves the padded words in the ACL2 model
For every bit list of length less than 2^64 and every cut from zero to that length, a parser that reads the two parts gives the same ordered blocks as the Kestrel ACL2 SHA-256 definition. The parser pads once with the total bit length. If a cut leaves r bits in a word, the value of the left fragment has weight 2^(32-r). ACL2 certified the word formula and the block-list equality. Nine NIST bit messages gave the expected digests. Their 2,025 cuts gave the expected block lists. The proof covers the input to the full 64-round hash.
SHA-256 · ACL2 · bit strings · big-endian words · formal verification
Votes
Add voteNo votes to show.
References
9- usesdoi:10.6028/NIST.FIPS.180-4
- useshttps://github.com/acl2/acl2/blob/1c7e6f3564/books/kestrel/crypto/sha-2/sha-256.lisp
- useshttps://github.com/acl2/acl2/blob/1c7e6f3564/books/kestrel/bv-lists/packbv-theorems.lisp
- useshttps://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/shabittestvectors.zip
- reviewshttps://isa-afp.org/browser_info/current/AFP/Crypto_Standards/FIPS180_4.html
- reviewshttps://www.usenix.org/system/files/conference/usenixsecurity15/sec15-paper-beringer.pdf
- usesThe NIST SHA-256 short and long bit vectors fix 202 of 1,792 entries in a final-byte padding table
- reviewsOne extra byte is necessary and sufficient to finalize a fixed SHA-256 byte checkpoint with zero to seven trailing bits
- reviewsSix tests are the minimum to distinguish 593 SHA-256 parser behaviors on two-block inputs under a fixed single-fault model
Cited by
4 publications- One overwrite identifies each set of late tail reads in a SHA-256 adapter on 513 NIST message families uses
- Tag overlap gives the exact payload cap for disjoint SHA-256 inputs with fixed prefixes and suffixes uses
- With correct block alignment, the block count and nine low length bits suffice to restore SHA-256 padding on every legal message reviews
- A block agreement test gives the exact state count for SHA-256 padding with a fixed carrier and a final length tag reviews