Position-tagged XOR hashing with a uniform table #
XOR-hash looks up each block together with its position and adds the results in a commutative group. Addition on bit strings is XOR. The position distinguishes repeated occurrences of a block, and the list may be empty.
The uniform-table analysis is a step in the proof of Theorem 7.6. For two distinct messages,
there is a tagged block in exactly one of them. Translating that table entry translates the
digest difference by any desired amount. The resulting difference is uniform, giving the
optimal difference and collision bounds for the ideal table. The finite PRF reduction is in
Crypto.Primitives.UHF.XorHash.PRF.
Main definitions #
Cslib.Crypto.UHF.xorHash: sum the table values at the position-tagged blocks.Cslib.Crypto.UHF.xorHashQueryAt: the tagged query at a position in the input message.
Main results #
Cslib.Crypto.UHF.uniform_xorHash_sub: the digest difference of distinct messages is uniform.Cslib.Crypto.UHF.isDeltaUniversalHash_xorHash: the ideal table gives difference universality with bound1 / |Y|.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Section 7.2.3, Figure 7.2 and the ideal-game step of Theorem 7.6, printed pp. 260–262.
XOR-hash from Figure 7.2 ([BS23], v0.6, §7.2.3), with zero-based position tags.
For a fixed table f, the hash sums f (mᵢ, i) over the positions of the message. This
uses any additive commutative monoid, with bit-string addition giving the source's XOR.
A step in the ideal-game analysis of Theorem 7.6 ([BS23], v0.6, pp. 261–262). With an independent uniform value at every tagged position, two distinct messages have a uniform digest difference. This applies to arbitrary finite additive commutative digests.
An ideal uniform table gives XOR-hash difference universality with bound 1 / |Y|.