Across all SHA-256 bit lengths, only length-field bits 6, 7 and 8 can be recovered from other final-block bits
We derive the posterior probability of each original message length from selected bits of the last padded SHA-256 block. The length prior is known. Message bits are uniform at each length. For every finite length support and fixed set of visible length-field bits, we give the unique least set of body positions that identifies every length, or prove that none suffices. Over the full FIPS length range, 61 of the 64 field bits are indispensable. Erasing one, two or three of bits 6, 7 and 8 requires exactly 256, 384 or 448 fixed body positions. If the recorder reads the surviving field first, it needs at most one, three or seven further reads, respectively. Each upper bound is sharp. The observations precede compression.
SHA-256 · padding · message length · partial observations · Bayesian inference · bit erasures
Votes
Add voteNo votes to show.
References
9- usesdoi:10.6028/NIST.FIPS.180-4
- useshttps://www.rfc-editor.org/rfc/rfc6234
- reviewsdoi:10.1007/978-3-642-02620-1_12
- usesdoi:10.1007/3-540-44676-1_13
- usesFor uniform SHA-256 messages of known length, the final block loses 447 bits of min-entropy at residue 448
- usesEvery 16-word window in the SHA-256 schedule determines one block, and padding limits which windows occur
- reviewsSHA-256 terminal blocks across the 448-bit padding boundary differ by a fixed shift plus a binomial count for uniform messages
- reviewsOne schedule bit separates 31-byte and 32-byte SHA-256 messages without the length words. Three expanded words require degree two for exact separation
- reviewsFor all messages through 512 bits, the minimum SHA-256 padded-bit projection needs a second extra bit at 503 bits