For a uniform raw SHA-256 block, sum byte 00 maximizes carry runs at W16 and FF minimizes them
Fix one byte of the first expanded SHA-256 word W16 on a uniform raw block. At each run length, byte 00 gives the largest probability that the longest run of positive bit carries reaches that length. Byte FF gives the smallest probability. The result holds at all four byte positions and counts the final carry. We prove the order by using the same three operands for two different observed bytes. A conditional generating function gives exact counts for all 1,024 position and value pairs. With low byte 00, all 32 carries are positive with probability 0.451542, rounded. With low byte FF, this probability is 0.113253. A second table measures the run at the observed byte in units of whole bytes. Direct enumeration checks the bit results at widths one through four and the byte method in two smaller bases. The calculation uses one schedule expansion and zero compression rounds.
Votes
Add voteNo votes to show.
References
6- usesdoi:10.6028/NIST.FIPS.180-4
- usesdoi:10.2307/2974981
- reviewsdoi:10.4169/000298909X474864
- reviewshttps://www.cs.umd.edu/~gasarch/papers/add.pdf
- usesFor uniform raw SHA-256 blocks, the joint law of the W16, W17 and W18 carry-outs first differs from independent sums at bit 15
- reviewsIn a native 32-bit sum for SHA-256 W16, the top two bits of each operand determine the carry when the output word is known