One two-bit NIST message separates seven SHA-256 padding classes on canonical inputs
We compare ten rules for turning a bit message into SHA-256 blocks. On canonical inputs the rules form seven classes. The two-bit NIST message 10 separates the seven by both blocks and full digests. It is the first separating record in the short-message file. Six leading digest bits suffice on that record. On the 79-bit record three suffice, which meets the lower bound. A four-bit record meets the lower bound of 510 leading serialized bits. All 513 standard digests match NIST. The result assumes that the device uses one of the specified rules.
SHA-256 · bit-oriented test vectors · padding · conformance testing
Votes
Add voteNo votes to show.
References
8- usesdoi:10.6028/NIST.FIPS.180-4
- useshttps://www.rfc-editor.org/rfc/rfc6234.html
- useshttps://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing
- useshttps://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/shabittestvectors.zip
- reviewshttps://datatracker.ietf.org/doc/html/draft-ietf-acvp-sub-sha-01
- reviewshttps://csrc.nist.gov/pubs/conference/2009/06/29/characterizing-padding-rules-of-md-hash-functions/final
- reviewsSHA-256 padding is prefix-free through 502 bits and first has a prefix conflict at 503 bits
- reviewsFor uniform SHA-256 messages of known length, the final block loses 447 bits of min-entropy at residue 448
Cited by
7 publications- For short partial-byte SHA-256 inputs with zero unused bits, 87 extra block tests complete the NIST suite for a separately affine error model uses
- A right-aligned grid gives the best SHA-256 audit rate for a fixed interval of failing bit occupancies reviews
- With independent rules at 512 block residues, 512 new lengths identify SHA-256 length counter errors reviews
- One extra byte is necessary and sufficient to finalize a fixed SHA-256 byte checkpoint with zero to seven trailing bits reviews
- The NIST SHA-256 short and long bit vectors fix 202 of 1,792 entries in a final-byte padding table reviews
- The empty SHA-256 message identifies every fixed rotation and reflection within the eight output words uses
- Cuts in 753 ordered NIST SHA-256 bit vectors cover every one-byte update of a packer with up to seven pending bits reviews