Documentation

CatCryptCore.Crypto.Assumptions.MAC

MAC (Message Authentication Code) EUF-CMA Security #

This file defines the EUF-CMA security notion for MAC schemes at the abstract CryptoWord W level.

MAC Games #

The MAC security game captures the difficulty of forging a valid tag:

For game-hopping proofs (SSH, Kerberos), we use an indistinguishability formulation rather than existential forgery, which is equivalent up to a factor of 1/|W| for single-query adversaries.

Cross-Validation #

PropertyThis fileTextbook
Game structureMAC_Game_Real/IdealBoneh-Shoup Def. 6.1 (PRF)
AdvantageAdvantage(Real, Ideal)|Pr[W₀] - Pr[W₁]|
FormulationIndistinguishability (real vs random tag)Equiv. to SUF-CMA for single query

Note: This uses an indistinguishability formulation rather than EUF-CMA (existential unforgeability). The two are equivalent up to a factor of 1/|W| for single-query adversaries. The indistinguishability formulation composes better with game-hopping.

Equivalent formalizations:

References #

MAC Definition #

Abstract MAC scheme definition, parametric over SampleableType W.

  • mac key message → tag
  • verify key message tag → Bool
  • mac : WWW

    MAC computation: (key, message) → tag

  • verify : WWWBool

    MAC verification: (key, message, tag) → Bool

Instances For

    MAC Games #

    @[reducible, inline]

    Type of MAC adversary: receives a (message, tag) pair and must distinguish real MAC from random tag.

    Equations
    Instances For

      MAC real game: sample random key, compute tag on adversary's message.

      Equations
      Instances For

        MAC ideal game: adversary receives a random tag.

        Equations
        Instances For
          noncomputable def CatCrypt.Crypto.Assumptions.MAC_Advantage {W : Type} [SampleableType W] (D : MACDef W) (msg : W) (A : MAC_Adversary W) :

          MAC advantage: ability to distinguish real tag from random.

          Equations
          Instances For

            IsPure Proofs #

            theorem CatCrypt.Crypto.Assumptions.MAC_Game_Real_isPure {W : Type} [SampleableType W] (D : MACDef W) (msg : W) (A : MAC_Adversary W) (hA : ∀ (x : W), (A x).IsPure) :

            Keyed MAC Games (KDM + Key Leakage) #

            Non-Standard Assumption #

            MAC_Keyed_Advantage combines key-dependent messages (msg : W → W) with key leakage (outputs (tag, key) as a pair). Same KDM + leakage pattern as AEAD_Keyed_Advantage.

            Literature #

            Same as AEAD_Keyed_Advantage: Black-Rogaway-Shrimpton 2003, Applebaum et al. 2014, Dodis et al. 2010.

            Usage #

            Used by SSH and Kerberos hybrid arguments.

            noncomputable def CatCrypt.Crypto.Assumptions.mac_keyed_real {W : Type} [SampleableType W] (D : MACDef W) (msg : WW) :

            MAC keyed real game: sample key, output (tag, key) pair.

            Equations
            Instances For

              MAC keyed ideal game: sample independent random pair.

              Equations
              Instances For