For uniform 256-bit digests, different odd moduli give the largest relative errors for pair and triple matches
Assume that distinct messages give independent uniform 256-bit digests. Let N be 2^256. Among odd range sizes from 1 to N, the largest pair-match probability relative to the uniform baseline occurs at both 3N/4 minus one and 3N/4 plus one. The largest triple-match ratio occurs only at (7N+5)/9. The corresponding entropy losses relative to a uniform range are below 0.170 and 0.249 bits. We prove the exact finite-width corrections. We give exact match counts in expectation and exact hit probabilities for unequal query budgets with modular reduction, rejection, and high-bit truncation. An integer checker reproduces the results. The proof assumes random outputs for full SHA-256.
SHA-256 · modular reduction · Rényi entropy · match probability · rejection sampling
Votes
Add voteNo votes to show.
References
7- doi:10.6028/NIST.FIPS.180-4
- doi:10.17487/RFC9380
- https://arxiv.org/abs/1805.10941
- https://iacr.org/archive/eurocrypt2004/30270396/bk.pdf
- doi:10.3390/e20120896
- https://www.ism.ac.jp/editsec/aism/pdf/040_1_0077.pdf
- Trial sequence increased clarity prediction error by 1.9% for held-out vocoded words with matching text