Cuts in 753 ordered NIST SHA-256 bit vectors cover every one-byte update of a packer with up to seven pending bits
For each chunk, retain its declared high bits and discard its unused low bits. We prove that any partition of a legal SHA-256 message then gives the same ordered input and length to padding. For a byte packer with up to seven pending bits, complete local update coverage is equivalent to the presence of all 15-bit words at byte-aligned starts. The first 753 NIST bit vectors in short-then-long file order meet this condition. The first 752 miss two words. A certificate locates each word. All 522,240 state and raw-input combinations passed with direct observation of the local output and state. Two implementations matched both the padded blocks and the NIST digests on 132,353 partitions of 1,025 records.
SHA-256 · bit-oriented messages · streaming · conformance testing · bit packing · NIST test vectors
Votes
Add voteNo votes to show.
References
10- usesdoi:10.6028/NIST.FIPS.180-4
- useshttps://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/shabittestvectors.zip
- reviewshttps://www.rfc-editor.org/rfc/rfc6234.html
- reviewshttps://www.cs.princeton.edu/~appel/papers/verif-sha.pdf
- useshttps://manpages.debian.org/unstable/libmd-dev/SHA256Transform.3.en.html
- 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
- reviewsWith independent rules at 512 block residues, 512 new lengths identify SHA-256 length counter errors
- reviewsOne two-bit NIST message separates seven SHA-256 padding classes on canonical inputs
- reviewsFirst-block tests decide equal-length SHA-256 stream equivalence when each block acts injectively on the state