Documentation

Complexity.Crypto.Computational.Signature

Uniform digital signature schemes and existential unforgeability #

A uniform digital signature scheme (SignatureScheme) consists of a strict probabilistic polynomial-time key generator keyGen, a strict probabilistic polynomial-time signing algorithm sign, and a deterministic polynomial-time verification algorithm verify that accepts every signature produced by sign on an n-bit message under a key pair sampled at security parameter n. The message space at parameter n is exactly the n-bit words; this module does not claim security for arbitrary polynomial-length message families.

We formalize two adaptive chosen-message security notions against uniform strict oracle-PPT forgers (IsOraclePPT):

Main definitions #

Main results #

References #

@[reducible, inline]

An adaptive forger receives a unary security parameter and a public verification key, queries a signing oracle on chosen messages, and outputs a candidate (message, signature) pair.

Instances For

    A uniform digital signature scheme on n-bit messages at security parameter n, with strict polynomial-time key generation and signing, deterministic polynomial-time verification, and perfect completeness on supported key pairs, n-bit messages, and signatures.

    Instances For

      Full adaptive chosen-message security (EUFCMA) #

      Stateful signing oracle that signs the requested message under sk and prepends the message to the list of queried messages.

      Instances For

        The EUF-CMA experiment: sample (pk, sk) ← S.keyGen n, run the adaptive forger on (n, pk) with oracle access to S.signingOracle sk, and accept when the forger outputs a valid signature on an n-bit message that was never queried to the signing oracle.

        Instances For

          Run the complete EUF-CMA experiment on its unary security parameter for any oracle-PPT forger.

          The EUF-CMA experiment is uniformly strict PPT, independently of unused auxiliary input.

          Existential unforgeability under adaptive chosen-message attack (EUF-CMA) against uniform strict oracle-PPT adversaries.

          Instances For

            Full EUF-CMA security gives negligible forgery probability for every oracle-PPT forger.

            Establish EUF-CMA security by bounding every oracle-PPT forger's success probability.

            One-time adaptive chosen-message security (OneTimeEUFCMA) #

            One-time signing oracle that answers at most the first signing query using S.sign sk and returns the empty word without signing on any subsequent query.

            Instances For

              The one-time EUF-CMA experiment: sample (pk, sk) ← S.keyGen n, run the adaptive forger on (n, pk) with oracle access to S.oneTimeSigningOracle sk (which answers at most one signing query), and accept when the forger outputs a valid signature on an n-bit message distinct from the queried message (if any).

              Instances For

                Run the complete one-time EUF-CMA experiment on its unary security parameter for any oracle-PPT forger.

                The one-time EUF-CMA experiment is uniformly strict PPT, independently of unused auxiliary input.

                Existential unforgeability under one-time adaptive chosen-message attack against uniform strict oracle-PPT adversaries.

                Instances For

                  One-time EUF-CMA security gives negligible forgery probability for every oracle-PPT forger.

                  Establish one-time EUF-CMA security by bounding every oracle-PPT forger's success probability.

                  Starting from the empty query log, oneTimeSigningOracle records at most one queried message.

                  theorem Cslib.Crypto.SignatureScheme.run_oneTimeSigningOracle_apply_eq_of_agree (S : SignatureScheme) {α : Type} (sk₁ sk₂ : List Bool) {agree : List Bool → Prop} (hagree : ∀ (req : List Bool), agree req → S.sign sk₁ req = S.sign sk₂ req) (prog : Probability.WordOracleComp Unit α) (s : List (List Bool)) (a : α) (queried' : List (List Bool)) (hq' : ∀ r ∈ queried', agree r) :
                  ((OracleComp.interpret (ProbOracleComp.handler (fun (k : ℕ) => StateT.lift (ProbComp.unifOracle k)) fun (q : Unit × List Bool) (s : List (List Bool)) => (S.oneTimeSigningOracle sk₁ q s).eval) prog).run s) (a, queried') = ((OracleComp.interpret (ProbOracleComp.handler (fun (k : ℕ) => StateT.lift (ProbComp.unifOracle k)) fun (q : Unit × List Bool) (s : List (List Bool)) => (S.oneTimeSigningOracle sk₂ q s).eval) prog).run s) (a, queried')

                  If S.sign sk₁ and S.sign sk₂ agree on all requests satisfying agree, then running any adaptive program against oneTimeSigningOracle under sk₁ and sk₂ assigns the same probability to every outcome (a, queried') whose recorded query log satisfies agree.

                  Reduction from one-time EUF-CMA to full EUF-CMA #

                  Open stateful handler that forwards at most the first signing request to the external signing oracle (truncating the reply to bound n msg.length) and answers subsequent requests with [].

                  Instances For

                    Wrap an adaptive forger so that it issues at most one external signing query.

                    Instances For

                      Full EUF-CMA security implies one-time EUF-CMA security.