Documentation

VCVio.CryptoFoundations.Fischlin.Defs

Fischlin Transform: Core Definitions #

This file defines the Fischlin transform (CRYPTO 2005), which converts a Σ-protocol into a signature scheme (non-interactive proof of knowledge) in the random oracle model with online (straight-line) extraction.

Unlike the Fiat-Shamir transform, which requires a rewinding extractor (via the forking lemma), the Fischlin transform enables extraction by simply observing the prover's hash queries. This comes at the cost of a more complex prover that performs a "proof-of-work" search over the challenge space, and a slight completeness error.

This module holds the core definitions: the random-oracle input type FischlinROInput, the oracle signature fischlinROSpec, the proof type FischlinProof, the prover's inner search fischlinSearchAux, the transform Fischlin itself, and the bundled random-oracle runtime used to denote the signature scheme as a probabilistic computation.

Parameters #

Module layout #

The development is split across the sibling modules under Fischlin/:

References #

Type Definitions #

structure FischlinROInput (Stmt Commit Chal Resp : Type) (ρ : ) (M : Type) :

Input to the Fischlin random oracle. Defined as a structure rather than a nested product to give fast DecidableEq synthesis (avoiding deep product-type unfolding).

  • stmt : Stmt
  • msg : M
  • comList : List Commit
  • rep : Fin ρ
  • chal : Chal
  • resp : Resp
Instances For
    @[implicit_reducible]
    instance instDecidableEqFischlinROInput {Stmt✝ Commit✝ Chal✝ Resp✝ : Type} {ρ✝ : } {M✝ : Type} [DecidableEq Stmt✝] [DecidableEq Commit✝] [DecidableEq Chal✝] [DecidableEq Resp✝] [DecidableEq M✝] :
    DecidableEq (FischlinROInput Stmt✝ Commit✝ Chal✝ Resp✝ ρ✝ M✝)
    def instDecidableEqFischlinROInput.decEq {Stmt✝ Commit✝ Chal✝ Resp✝ : Type} {ρ✝ : } {M✝ : Type} [DecidableEq Stmt✝] [DecidableEq Commit✝] [DecidableEq Chal✝] [DecidableEq Resp✝] [DecidableEq M✝] (x✝ x✝¹ : FischlinROInput Stmt✝ Commit✝ Chal✝ Resp✝ ρ✝ M✝) :
    Decidable (x✝ = x✝¹)
    Instances For
      @[reducible, inline]
      abbrev fischlinROSpec (Stmt Commit Chal Resp : Type) (ρ b : ) (M : Type) :
      OracleSpec (FischlinROInput Stmt Commit Chal Resp ρ M)

      The random oracle specification for the Fischlin transform. Domain: FischlinROInput (statement, message, commitment list, index, challenge, response). Range: Fin (2^b) (b-bit hash values).

      Instances For
        @[reducible, inline]
        abbrev FischlinProof (Commit Chal Resp : Type) (ρ : ) :

        A Fischlin proof consists of one (commitment, challenge, response) triple per parallel repetition.

        Instances For
          def fischlinSearchAux {Stmt Wit Commit PrvState Chal Resp M : Type} {rel : StmtWitBool} {ρ b : } {m : TypeType v} [Monad m] (σ : SigmaProtocol Stmt Wit Commit PrvState Chal Resp rel) [MonadLiftT ProbComp m] [HasQuery (fischlinROSpec Stmt Commit Chal Resp ρ b M) m] (pk : Stmt) (sk : Wit) (sc : PrvState) (msg : M) (comList : List Commit) (i : Fin ρ) :
          List ChalOption (Chal × Resp × Fin (2 ^ b))m (Option (Chal × Resp))

          Recursive search over a list of challenges for one Fischlin repetition.

          For each challenge ω, computes the sigma protocol response and queries the hash oracle. Exits early if a hash value of 0 is found (the ideal "proof of work" result). Otherwise, tracks the (challenge, response) pair with the minimal hash value.

          This models the sequential search in Construction 1 of the Fischlin paper: the prover queries H on each input and keeps the best.

          Instances For

            Main Definition #

            def Fischlin {Stmt Wit Commit PrvState Chal Resp : Type} {rel : StmtWitBool} [FinEnum Chal] [Inhabited Chal] [Inhabited Resp] {m : TypeType v} [Monad m] (σ : SigmaProtocol Stmt Wit Commit PrvState Chal Resp rel) (hr : GenerableRelation Stmt Wit rel) (ρ b S : ) (M : Type) [DecidableEq M] [MonadLiftT ProbComp m] [HasQuery (fischlinROSpec Stmt Commit Chal Resp ρ b M) m] :
            SignatureAlg m M Stmt Wit (FischlinProof Commit Chal Resp ρ)

            The Fischlin transform applied to a Σ-protocol and a generable relation produces a signature scheme in the random oracle model.

            Signing: generates ρ independent commitments, then for each repetition searches through all challenges ω ∈ Ω (via FinEnum.toList) to find the (ω, response) pair whose hash value is minimal, exiting early at hash 0.

            Verification: re-hashes each (commitment, challenge, response) triple, checks sigma-protocol verification for each repetition, and verifies that the sum of hash values is at most S.

            Instances For
              noncomputable def Fischlin.runtime {Stmt Commit Chal Resp : Type} [DecidableEq Stmt] [DecidableEq Commit] [DecidableEq Chal] [DecidableEq Resp] (ρ b : ) (M : Type) [DecidableEq M] :
              ProbCompRuntime (OracleComp (unifSpec + fischlinROSpec Stmt Commit Chal Resp ρ b M))

              Runtime bundle for the Fischlin random-oracle world.

              Instances For