With independent rules at 512 block residues, 512 new lengths identify SHA-256 length counter errors

2 citing publications

The 1,025 lengths in two NIST bit-oriented SHA-256 response files never reach the high 32-bit word of the length field. We model four ways to count the high words of input chunks and the carries between chunks. Each final residue modulo 512 can use its own rule. A test reads the final 64-bit length field. Exactly 512 new total lengths are necessary and sufficient. The shortest choices start at 2^32 bits and use two chunkings of each length. With one exact read per residue, the shortest totals start at 2 times 2^32 for three rules and 3 times 2^32 for four. If every effective chunk is shorter than 2^32 bits, final truncation and a missing carry give identical fields at all legal lengths. The proof concerns the length field before compression.

SHA-256 · length field · conformance testing · bit-oriented messages · chunk boundaries

No votes to show.

References

7
  1. usesdoi:10.6028/NIST.FIPS.180-4
  2. useshttps://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/shabittestvectors.zip
  3. useshttps://csrc.nist.gov/csrc/media/projects/cryptographic-algorithm-validation-program/documents/shs/shavs.pdf
  4. reviewshttps://www.rfc-editor.org/rfc/rfc6234.html
  5. reviewshttps://pages.nist.gov/ACVP/draft-celi-acvp-sha.html
  6. reviewsOne two-bit NIST message separates seven SHA-256 padding classes on canonical inputs
  7. reviewsLength caps and alignment determine the exact degree of each SHA-256 length-field bit

Cited by

2 publications
  1. At the FIPS length limit, a SHA-256 block stream needs 62 state bits to verify its padding with either form of final framing reviews
  2. Cuts in 753 ordered NIST SHA-256 bit vectors cover every one-byte update of a packer with up to seven pending bits reviews