The XOR and modular-difference weights of two independent uniform n-bit words have covariance (1 − 2⁻ⁿ)/2

1 citing publication

Draw two independent uniform n-bit words. Count the one bits in their XOR and in their ordered difference modulo 2ⁿ. Each count has a binomial distribution. A matrix with two borrow states gives their joint distribution. Their covariance is (1 − 2⁻ⁿ)/2. At 32 bits the correlation is about 0.0625. The chance that both counts are at most eight is 32.08 times the product of the two separate probabilities. Direct enumeration gives the same joint counts at every width from one to eight bits. The formula applies to ideal words. Two NIST test vectors check the SHA-256 word convention.

SHA-256 · Hamming distance · modular subtraction · covariance · transfer matrix · joint null distribution

No votes to show.

References

7
  1. usesdoi:10.6028/NIST.FIPS.180-4
  2. useshttps://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing
  3. useshttps://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/shabytetestvectors.zip
  4. reviewshttps://www.schneier.com/wp-content/uploads/2016/02/paper-twofish-paper.pdf
  5. reviewsFor four-byte messages at the standard IV, 14,428,224 additive differences can match both XOR differences after one SHA-256 round
  6. reviewsWith independent uniform 256-bit outputs, 115 samples give the first probability above one half for a pair within 98 bits
  7. reviewshttps://eprint.iacr.org/2026/232

Cited by

1 publication
  1. Adjacent shared-edge weights can preserve independence of triangle and square tests on ideal 256-bit digests reviews