With correct block alignment, the block count and nine low length bits suffice to restore SHA-256 padding on every legal message

5 citing publications

A forward transducer copies each message bit, keeps the correct position in the block, and writes the low w length bits in a 64-bit field. For every legal SHA-256 bit string and every width from 1 through 64, the raw output matches FIPS padding exactly before the first wrap. Given the padded block count and the truncated field, a reader can restore the field. If m lengths fit the frame and field, exactly m minus one individual bit reads are necessary in the worst case and suffice. Nine low bits suffice without a bit read. Eight can require one read. All 513 NIST short bit digests matched with the full counter, and repairs passed 15,360 two-block checks. The proof assumes that the delimiter and zero bits are intact.

SHA-256 · FIPS 180-4 · subsequential transducer · padding · query complexity

No votes to show.

References

10
  1. reviewsEvery bit cut of a legal SHA-256 message preserves the padded words in the ACL2 model
  2. reviewsAt the FIPS length limit, a SHA-256 block stream needs 62 state bits to verify its padding with either form of final framing
  3. reviewsA block agreement test gives the exact state count for SHA-256 padding with a fixed carrier and a final length tag
  4. reviewsFor byte messages within 64 padded SHA-256 blocks, four terminal zero counts leave the sentinel block uncertain
  5. usesThe NIST SHA-256 short and long bit vectors fix 202 of 1,792 entries in a final-byte padding table
  6. doi:10.6028/NIST.FIPS.180-4
  7. https://www.rfc-editor.org/rfc/rfc6234
  8. doi:10.1145/2701415
  9. https://isa-afp.org/entries/Crypto_Standards.html
  10. https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/shabittestvectors.zip

Cited by

5 publications
  1. Total SHA-256 block relations certify a hash when checked guards cover its padded trace and state wires match reviews
  2. For messages below 2^64 bits, the AFP SHA-256 loop with a counted trailer permits both final block counts at fills of 440 through 487 bits reviews
  3. With a known frame and length interval, exact SHA-256 padding checks require every bit from the delimiter to the end reviews
  4. One saved block and a block count recover each live SHA-256 bit stream state when the first padding block uses a reversible code reviews
  5. Two equal-size SHA-256 length sets modulo nine need 63 and 64 state bits when the stream ends without a length tag reviews