Target collision resistance from second-preimage resistance (H(k ⊕ m)) #
Given a hash function H : List Bool → List Bool, the XOR-masked keyed family
$$H_{\mathrm{tcr}}(k, m) := H(k \oplus m)$$
([BS23], Section 8.11.3, equation (8.18) and Theorem 8.12, pp. 338–339) is target
collision-resistant on n-bit messages under uniform n-bit keys whenever H is second-preimage
resistant on any validity domain valid that eventually admits all n-bit strings (in particular
Definition 8.6's {0, 1}ⁿ domain validFixedLengthInput or unrestricted
SecondPreimageResistant):
validFixedLengthInput n mchecksdecide (m.length = n), with plain polynomial-time certificatecomputableInPolyTime_validFixedLengthInput.xorTargetHash H n k m = H (BitString.listXor n [k, m]), with plain polynomial-time certificatecomputableInPolyTime_xorTargetHash.xorTargetToSecondPreimage adversaryturns a two-stageTargetCollisionFinderinto aSecondPreimageFinderby runningadversary.choose nto obtain(m₀, state), planting the keyk := m ⊕ m₀on the uniformn-bit challengem, runningadversary.find n state kto obtainm₁, and returningm₁ ⊕ k(isPPT_xorTargetToSecondPreimage).succProbability_targetCollisionGame_xorTargetHash_leproves the concrete reduction boundTCRadv[A, H_tcr] ≤ SPRadvOn[B, H, valid]at parameternwith factor1and additive loss0whenevervalid naccepts alln-bit strings.SecondPreimageResistantOn.targetCollisionResistantOn_xorTargetHashderives asymptoticTargetCollisionResistantOn id (xorTargetHash H) validFixedLengthInputfromSecondPreimageResistantOn H validwhenevervalid neventually admits alln-bit strings.
The restriction to validFixedLengthInput (messages of length n, matching the book's fixed
domain M = {0, 1}^n in equation (8.18)) is essential because BitString.listXor n pads or
truncates its inputs to n bits: without validFixedLengthInput, m₀ = [] and m₁ = [false]
collide under xorTargetHash H n k for every H, n, and k. Likewise, valid n must admit
n-bit words because xorTargetToSecondPreimage produces an n-bit candidate m₁ ⊕ k.
Main definitions #
Cslib.Crypto.validFixedLengthInput:decide (m.length = n).Cslib.Crypto.xorTargetHash:H (BitString.listXor n [k, m]).Cslib.Crypto.xorTargetToSecondPreimage: reduction fromtargetCollisionGameforxorTargetHash HtosecondPreimageGameOn H valid.
Main results #
Cslib.Crypto.computableInPolyTime_validFixedLengthInput,Cslib.Crypto.computableInPolyTime_xorTargetHash.Cslib.Crypto.isPPT_xorTargetToSecondPreimage.Cslib.Crypto.succProbability_targetCollisionGame_xorTargetHash_le.Cslib.Crypto.SecondPreimageResistantOn.targetCollisionResistantOn_xorTargetHash.
References #
- D. Boneh and V. Shoup, A Graduate Course in Applied Cryptography, Section 8.11.3 (equation (8.18) and Theorem 8.12, pp. 338–339).
Testing whether an input has length n is computable in plain polynomial time.
Evaluating xorTargetHash H is polynomial-time when H is polynomial-time.
The second-preimage finder B of [BS23], Theorem 8.12 (pp. 338–339): given unary
n and a uniform n-bit input m, run adversary.choose n to obtain (m₀, state), plant the
key k := m ⊕ m₀, run adversary.find n state k to obtain m₁, and output m₁ ⊕ k.
Running both stages of a strict PPT TargetCollisionFinder with two n-bit XOR operations is
uniformly strict PPT.
Theorem 8.12, concrete bound ([BS23], Section 8.11.3, pp. 338–339): for every
target-collision adversary adversary attacking xorTargetHash H on n-bit messages and any
second-preimage domain predicate valid that accepts all n-bit words, the second-preimage finder
xorTargetToSecondPreimage adversary wins secondPreimageGameOn H valid at least as often as
adversary wins targetCollisionGame.
Theorem 8.12 ([BS23], Section 8.11.3, p. 338): if H is second-preimage
resistant on a domain valid that eventually admits all n-bit words (in particular
Definition 8.6's {0, 1}ⁿ domain validFixedLengthInput or unrestricted
SecondPreimageResistant), then H_tcr(k, m) = H(k ⊕ m) is target collision-resistant on n-bit
messages under uniform n-bit keys.