SHA-256 padding is prefix-free through 502 bits and first has a prefix conflict at 503 bits
We give an exact test for a proper prefix between padded messages at two legal SHA-256 input lengths. All bit strings up to 502 bits have a prefix-free padded image. Lengths 256 and 503 bits give the first conflict. For whole bytes, the last prefix-free initial interval ends at 62 bytes. A reduction to the prefix-free Merkle-Damgård theorem gives distinguishing advantage at most 12q²/2²⁵⁶ on either domain for q total classical queries. This bound requires a public ideal compression function and the fixed SHA-256 IV. Direct padding agreed with the test on all 524,800 length pairs through 1024 bits. All 513 NIST short bit-message digests matched.
SHA-256 · Merkle-Damgard · prefix-free padding · indifferentiability
Votes
Add voteNo votes to show.
References
8- usesdoi:10.6028/NIST.FIPS.180-4
- useshttps://cs.nyu.edu/~dodis/ps/merkle.pdf
- useshttps://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/2012.CSF_.pdf
- reviewshttps://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=903173
- reviewsdoi:10.1109/TIT.2023.3238115
- useshttps://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/secure-hashing
- usesUnequal-length SHA-256 collisions give a compression collision in the final blocks
- reviewsCounting possible final blocks bounds truncated collisions with SHA-256 padding and ideal compression
Cited by
17 publications- At the FIPS length limit, a SHA-256 block stream needs 62 state bits to verify its padding with either form of final framing uses
- Tag overlap gives the exact payload cap for disjoint SHA-256 inputs with fixed prefixes and suffixes uses
- With ideal SHA-256 compression, different-length matches for block-aligned zero targets have the single-target probability uses
- With two SHA-256 calls, prefix-free padded bit records lose one tag bit for payload limits from 512 to 958 bits uses
- A free 24-octet status alphabet first loses a common optimum at 8,436 SHA-256 blocks in a CBOR sequence profile reviews
- For one-block SHA-256, a zero delimiter can merge 1,946,939,425,648,112 layouts of one payload into one input reviews
- For byte inputs, deepest records attain the tagged SHA-256 padding width at every block budget except the last uses
- With up to two SHA-256 blocks per record, one length-class bit resolves bounded hint delay, but a bare pulse can fail with one block of jitter uses
- Distinct ordered subtrees give the exact query count before a collision in a tagged binary commitment forest reviews
- One saved block and a block count recover each live SHA-256 bit stream state when the first padding block uses a reversible code uses
- Shared outgoing blocks bound digest coupling loss on a fixed trie under ideal compression reviews
- For all messages through 512 bits, the minimum SHA-256 padded-bit projection needs a second extra bit at 503 bits uses
- Two Clean compression calls give the RFC 9162 SHA-256 parent for normalized child words reviews
- For 512 tagged SHA-256 classes with payloads through 116 bytes, extra weight on 54 bytes can make a third call optimal uses
- With two SHA-256 blocks, prefix-free padded byte records lose one tag byte at payload limits of 64 bytes or more uses
- One two-bit NIST message separates seven SHA-256 padding classes on canonical inputs reviews
- A block agreement test gives the exact state count for SHA-256 padding with a fixed carrier and a final length tag uses