For uniform SHA-256 messages of known length, the final block loses 447 bits of min-entropy at residue 448
For each FIPS 180-4 message length, we count all messages that give the same last padded block. A uniform message leaves r bits of min-entropy when its length has residue r from 0 through 447 modulo 512. It leaves zero bits at residues 448 through 511. For a uniform choice of length over the FIPS domain and uniform message bits at each length, the best one-guess probability after length disclosure is (66 - 2^-447)/512. We also give a sharp bound for a random prefix followed by a fixed suffix. The results concern the 512-bit block supplied to compression. Checks cover 513 NIST bit vectors and 1035 prefix histograms.
SHA-256 · padding · min-entropy · message length · guessing probability
Votes
Add voteNo votes to show.
References
8- doi:10.6028/NIST.FIPS.180-4
- https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing
- https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/shabittestvectors.zip
- https://csrc.nist.gov/pubs/conference/2009/06/29/characterizing-padding-rules-of-md-hash-functions/final
- https://arxiv.org/abs/0807.1338
- A shared final block changes the fixed-target match probability for 448- to 512-bit messages under ideal random compression
- With an ideal cipher and SHA-256 padding, the chance of a common digest falls below half at 388 prescribed block-aligned lengths
- A single equality test cannot match two SHA-256 schedule views exactly for 257- to 287-bit messages with standard padding
Cited by
7 publications- For two unequal SHA-256 bit lengths, 45 masks select the matching sites in a balanced word schedule with independent data uses
- One known word erasure preserves length for one-block SHA-256 messages. With hidden prefixes, either erased length word causes ambiguity uses
- One extra byte is necessary and sufficient to finalize a fixed SHA-256 byte checkpoint with zero to seven trailing bits reviews
- A published 19-step SHA-224 input difference fits a final SHA-2 block only at length 447 modulo 512 uses
- First-block tests decide equal-length SHA-256 stream equivalence when each block acts injectively on the state reviews
- Across all SHA-256 bit lengths, only length-field bits 6, 7 and 8 can be recovered from other final-block bits uses
- One two-bit NIST message separates seven SHA-256 padding classes on canonical inputs reviews