Documentation

CatCryptCore.Crypto.Assumptions.CR

Collision Resistance (CR) Assumptions #

Centralized definitions of collision resistance for hash functions. These are used by Merkle trees, FAEST vector commitments, XMSS, and SLH-DSA.

Main definitions #

Search-style CR (standard) #

Distinguishing-style CR (for game-hopping) #

Target Collision Resistance (TCR) #

Preimage Resistance (Pre) #

Reductions #

Cross-Validation #

NotionThis fileRogaway-Shrimpton 2004BSKL
CR (search)CR_Search_GameDef. 1§8.1Def. 5.1
CR (distinguishing)CR_Dist_Game§8.1
TCRTCR_GameDef. 5§8.1
PrePre_GameDef. 3§8.1§8.1
CR⟹TCRCRSecure_implies_TCRSecureProp. 7Prop. 8.3
CR⟹PreCRSecure_implies_PreSecureProp. 8.4

Equivalent formalizations:

References #

Hash Function Scheme #

Abstract hash function with typed input and output.

Instances For

    Search-Style Collision Resistance #

    The standard formulation: adversary produces two distinct inputs that hash to the same output.

    CR search game: adversary finds a collision (x₁, x₂) with hash(x₁) = hash(x₂) and x₁ ≠ x₂.

    Equations
    Instances For

      CR hardness (search form).

      Instances

        Distinguishing-Style Collision Resistance #

        Used for game-hopping proofs (e.g., Merkle tree reductions): adversary distinguishes hash(x, y) from a random value. A collision implies distinguishing, so this captures CR.

        Collision resistance definition for a compression function, modeled as a distinguishing game analogous to DDH.

        • hashPair x y : the 2-to-1 compression function H(x, y)
        • keygen : sampling the input pair (left child, right child)

        The game: sample (x, y), give adversary either (x, y, hashPair(x, y)) (real) or (x, y, random) (ideal).

        • hashPair : WWW

          Hash compression: H(left, right)

        • keygen : Core.SPComp (W × W)

          Input pair sampling

        • keygen_isPure : self.keygen.IsPure

          Sampling is heap-independent

        Instances For
          @[reducible, inline]

          CR distinguishing adversary: receives both inputs and the challenge.

          Equations
          Instances For

            CR real game: adversary receives (x, y, hashPair(x, y)).

            Equations
            Instances For

              CR ideal game: adversary receives (x, y, random).

              Equations
              Instances For

                Target Collision Resistance (TCR) #

                Second-preimage resistance: given x, find x' ≠ x with hash(x') = hash(x). Weaker than CR.

                TCR game: adversary receives (x, hash(x)) and must find x' ≠ x with hash(x') = hash(x).

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  TCR hardness assumption.

                  Instances

                    Preimage Resistance (Pre) #

                    Given a hash output y = hash(x) for random x, find any x' with hash(x') = y. Weaker than both CR and TCR.

                    Pre game: sample random x, give hash(x) to adversary, check if adversary's output x' satisfies hash(x') = hash(x).

                    Equations
                    Instances For

                      Preimage resistance hardness assumption.

                      Instances

                        Reductions #

                        CR implies TCR: a collision finder trivially finds target collisions. Given a target x and hash(x), a CR adversary can find x' ≠ x with hash(x') = hash(x) by finding any collision and checking if one element matches.

                        Bound: TCR_AdvantageCR_Search_Advantage.

                        Reference: Rogaway-Shrimpton 2004 Prop. 7, Katz-Lindell Prop. 8.3.

                        CR implies preimage resistance (for fixed-length hash functions). If an adversary can find a preimage x' of y = hash(x), then with probability ≥ 1/2, x' ≠ x, giving a collision.

                        Bound: Pre_AdvantageCR_Search_Advantage.

                        Reference: Katz-Lindell Prop. 8.4.

                        The compression hypothesis Fintype.card h.Input > Fintype.card h.Output is essential: for injective hash, CR holds trivially but Pre may not.

                        Instances