SHA-256 terminal blocks across the 448-bit padding boundary differ by a fixed shift plus a binomial count for uniform messages
For two specified lengths below 2^64 bits, suppose one residue modulo 512 is r below 448 and the other is at least 448. Sample independent uniform bit strings at these lengths. The distance between their final padded blocks has a binomial distribution with r trials and probability one half, shifted by one plus the Hamming distance between the two length fields. The sharp limits over all such length pairs are 2 and 510 bits. We give exact counts for block pairs and message pairs and a formula for uniform residue choices. Literal padding checks cover all 28,672 residue pairs at five choices of block counts. All 513 NIST short bit-message digests agree. The theorem concerns compression inputs.
SHA-256 · padding · Hamming distance · weight enumerator
Votes
Add voteNo votes to show.
References
5- usesdoi:10.6028/NIST.FIPS.180-4
- useshttps://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/shabittestvectors.zip
- usesEvery 16-word window in the SHA-256 schedule determines one block, and padding limits which windows occur
- reviewsCounting possible final blocks bounds truncated collisions with SHA-256 padding and ideal compression
- reviewsdoi:10.3390/cryptography10030032
Cited by
8 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 reviews
- For byte messages within 64 padded SHA-256 blocks, four terminal zero counts leave the sentinel block uncertain uses
- Equal word values save 130 small-sigma calls across 11 SHA-256 final blocks with lengths below 2^32 bits uses
- Across all SHA-256 bit lengths, only length-field bits 6, 7 and 8 can be recovered from other final-block bits 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
- For all messages through 512 bits, the minimum SHA-256 padded-bit projection needs a second extra bit at 503 bits uses
- Two looks at 87 and 89 pairs meet 5% and 10% error limits for first-bit agreement in a fixed SHA-256 population of 256 pairs reviews
- Six tests are the minimum to distinguish 593 SHA-256 parser behaviors on two-block inputs under a fixed single-fault model reviews