Explicit Collisions for Insecure Block-Cipher Compression Variants #
Building on Cslib.IdealCipher (CslibFrontier.Crypto.Primitives.IdealCipher.Compression), this
module records explicit 2-query ideal-cipher collision finders for two insecure variants of
Davies–Meyer from [BS23], Section 8.5.2 (p. 301) and Exercise 8.11 (p. 349):
keyMasked, defined byh(k, x) = F_k(x) + k([KL20], Exercise 7.23(c)), which ish₄with its two arguments swapped;keyMaskedInput, defined byh₅(k, x) = F_k(k + x) + k.
Both variants are modeled purely in the ideal-cipher model (CollisionFinder and collisionGame
over an arbitrary finite additive group Block); no computational BlockCipher or
CollisionResistantForOn corollary is formalized here.
Main definitions #
Cslib.IdealCipher.keyMaskedAdversary: 2-query ideal-cipher collision finder forkeyMasked.Cslib.IdealCipher.keyMaskedInputAdversary: 2-query ideal-cipher collision finder forkeyMaskedInput.
Main results #
Cslib.IdealCipher.isQueryBounded_keyMaskedAdversary,Cslib.IdealCipher.isQueryBounded_keyMaskedInputAdversary: both finders make at most2ideal-cipher queries on every execution path.Cslib.IdealCipher.keyMaskedAdversary_wins,Cslib.IdealCipher.keyMaskedInputAdversary_wins: for any distinct keysk1 ≠ k2and targety, both finders wincollisionGamewith exact distributionPMF.pure true.Cslib.IdealCipher.exists_collisionFinder_keyMasked,Cslib.IdealCipher.exists_collisionFinder_keyMaskedInput: over any nontrivial finite additive group, there exists a2-queryCollisionFinderwinningcollisionGamewith probability1.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Section 8.5.2, p. 301, and Exercise 8.11, p. 349.
- J. Katz, Y. Lindell, Introduction to Modern Cryptography, Section 7.3.1, Exercise 7.23(c).
An explicit ideal-cipher collision finder for keyMasked (h₄ with its two arguments swapped,
[BS23], Section 8.5.2, p. 301 and Exercise 8.11, p. 349; [KL20],
Exercise 7.23(c)) using two inverse queries with distinct keys k1, k2 and target digest y.
keyMaskedAdversary makes at most 2 ideal-cipher queries on every execution path.
For any distinct keys k1 ≠ k2 and any target y, keyMaskedAdversary k1 k2 y wins
collisionGame keyMasked with exact distribution PMF.pure true.
Existential summary for keyMasked (h₄ with its two arguments swapped) over any nontrivial
finite additive group: there is a 2-query ideal-cipher collision finder winning with probability
1.
An explicit ideal-cipher collision finder for keyMaskedInput (h₅, [BS23],
Section 8.5.2, p. 301 and Exercise 8.11, p. 349) using two inverse queries with distinct keys
k1 and k2 and target digest y.
keyMaskedInputAdversary makes at most 2 ideal-cipher queries on every execution path.
For any distinct keys k1 ≠ k2 and any target y, keyMaskedInputAdversary k1 k2 y wins
collisionGame keyMaskedInput with exact distribution PMF.pure true.
Existential summary for keyMaskedInput (h₅) over any nontrivial finite additive group:
there is a 2-query ideal-cipher collision finder winning with probability 1.