Documentation

CslibFrontier.Crypto.Computational.Kilian.Micali

Micali's Computationally Sound Proofs in the Random Oracle Model #

Micali's construction ([Mic00]; [CY24], Construction 21.1.1) compiles a PCP verifier V into a non-interactive argument in the random oracle model by applying the Fiat–Shamir transformation to Kilian's interactive argument (CslibFrontier/Crypto/Computational/Kilian.lean). It is built from the oracle-program Merkle trees merkleRootProg, merklePathProg and merkleVerifyProg over MerkleHashSpec (CslibFrontier.Crypto.Computational.MerkleTree.Prog), evaluated against deterministic oracles with OracleComp.evalPure (CslibFrontier.Languages.Probabilistic.Oracle.EvalPure):

  1. Micali prover and verifier. Over the two-channel random oracle interface MicaliSpec α := MerkleHashSpec ⊕ₒ MicaliFSSpec α (where Sum.inl queries the Merkle hash f_MT : List Bool → List Bool and Sum.inr queries the Fiat–Shamir challenge oracle f_FS : α × List Bool → List (List Bool)), the prover micaliProve V x table commits to the compact PCP table kilianTable V x table under f_MT, queries ρs ← f_FS (x, root) (including the statement x in the Fiat–Shamir query for adaptive soundness), and opens the queried positions under f_MT to produce a MicaliProof. The verifier micaliVerify V x proof re-derives ρs ← f_FS (x, proof.root) and checks the Merkle openings and PCP verdicts under f_MT.
  2. Perfect completeness. Under any deterministic oracle pair (hTree, hFS) whose Fiat–Shamir challenges have length V.coins x, micaliVerify accepts the proof generated by micaliProve on every table accepted by V.tableVerifier (micaliVerify_micaliProve_eq_true). Consequently, in the lazy random oracle experiment micaliHonestGame V x table σ m where f_MT samples uniform σ-bit digests (BitString.uniformList σ) and f_FS (x, rt) samples kilianChallenges V m x, the honest prover is accepted with probability one (micaliHonestGame_eq_pure_true).

As in [CY24], Construction 21.1.1 with salt lengths s_MT = s_FS = 0 (which are zero-knowledge parameters not needed for completeness or soundness), no salts are included.

Source attribution note: Construction 21.1.1 is verified against [CY24], pp. 239–240; bibliographic metadata for [Mic00] is taken from Chiesa–Yogev's bibliography as the publisher text is not directly accessible in this environment, and no theorem numbers are cited from [Mic00].

Main definitions #

Main results #

References #

@[reducible, inline]

Oracle specification for the Fiat–Shamir challenge oracle in Micali's construction: queries (x, root) return a list of PCP random strings List (List Bool).

@[reducible, inline]

Combined random-oracle specification for Micali's construction: a Merkle hash oracle on the left (Sum.inl) and a Fiat–Shamir challenge oracle on the right (Sum.inr).

A non-interactive Micali proof consists of the Merkle root root of the committed compact PCP table and the Kilian opening responses response for the Fiat–Shamir challenges derived from (x, root).

  • root : List Bool

    Merkle root of the committed compact PCP table.

  • response : KilianResponse

    Opened bits and Merkle authentication paths for each Fiat–Shamir challenge repetition.

Instances For
    theorem Cslib.Crypto.MicaliProof.ext {x y : MicaliProof} (root : x.root = y.root) (response : x.response = y.response) :
    x = y

    Oracle-program Kilian commitment, opening and verification #

    Oracle-program computation of the Kilian Merkle commitment root for table on x.

    Oracle-program computation of the Kilian openings for a single random string ρ.

    Oracle-program computation of the Kilian response for a list of random strings ρs.

    Oracle-program verification of a single Kilian repetition against root on random string ρ.

    Oracle-program verification of all Kilian repetitions against root and challenges ρs.

    @[simp]
    theorem Cslib.Crypto.evalPure_kilianCommitProg {α : Type} (h : List Bool → List Bool) (V : Complexity.PCPVerifier α) (x : α) (table : List Bool) :
    OracleComp.evalPure h (kilianCommitProg V x table) = kilianCommit (fun (x : List Bool) => h) V [] x table
    @[simp]
    theorem Cslib.Crypto.evalPure_kilianOpenProg {α : Type} (h : List Bool → List Bool) (V : Complexity.PCPVerifier α) (x : α) (table ρ : List Bool) :
    OracleComp.evalPure h (kilianOpenProg V x table ρ) = kilianOpen (fun (x : List Bool) => h) V [] x table ρ
    @[simp]
    theorem Cslib.Crypto.evalPure_kilianRespondProg {α : Type} (h : List Bool → List Bool) (V : Complexity.PCPVerifier α) (x : α) (table : List Bool) (ρs : List (List Bool)) :
    OracleComp.evalPure h (kilianRespondProg V x table ρs) = kilianRespond (fun (x : List Bool) => h) V [] x table ρs
    @[simp]
    theorem Cslib.Crypto.evalPure_kilianCheckProg {α : Type} (h : List Bool → List Bool) (V : Complexity.PCPVerifier α) (x : α) (root ρ : List Bool) (answers : List (MerkleOpening Bool)) :
    OracleComp.evalPure h (kilianCheckProg V x root ρ answers) = kilianCheck (fun (x : List Bool) => h) V [] x root ρ answers
    @[simp]
    theorem Cslib.Crypto.evalPure_kilianVerifyProg {α : Type} (h : List Bool → List Bool) (V : Complexity.PCPVerifier α) (x : α) (root : List Bool) (ρs : List (List Bool)) (response : KilianResponse) :
    OracleComp.evalPure h (kilianVerifyProg V x root ρs response) = kilianVerify (fun (x : List Bool) => h) V [] x root ρs response

    Micali prover, verifier and perfect completeness #

    def Cslib.Crypto.micaliProvePure {α : Type} (hTree : List Bool → List Bool) (hFS : α × List Bool → List (List Bool)) (V : Complexity.PCPVerifier α) (x : α) (table : List Bool) :

    Pure Micali prover given deterministic Merkle-tree (hTree) and Fiat–Shamir (hFS) hash functions ([CY24], Construction 21.1.1).

    def Cslib.Crypto.micaliVerifyPure {α : Type} (hTree : List Bool → List Bool) (hFS : α × List Bool → List (List Bool)) (V : Complexity.PCPVerifier α) (x : α) (proof : MicaliProof) :

    Pure Micali verifier given deterministic Merkle-tree (hTree) and Fiat–Shamir (hFS) hash functions ([CY24], Construction 21.1.1).

    @[reducible, inline]
    abbrev Cslib.Crypto.micaliOracle {α : Type} (hTree : List Bool → List Bool) (hFS : α × List Bool → List (List Bool)) (q : List Bool ⊕ α × List Bool) :

    Combine a deterministic Merkle hash hTree and a deterministic Fiat–Shamir oracle hFS into a deterministic oracle for MicaliSpec α.

    Micali's non-interactive prover as an OracleComp program over MicaliSpec α: commits to the compact PCP table under the Merkle hash oracle (Sum.inl), queries the Fiat–Shamir oracle (Sum.inr) on (x, root) to obtain the challenge strings ρs, and opens the queried positions under the Merkle hash oracle.

    Micali's non-interactive verifier as an OracleComp program over MicaliSpec α: queries the Fiat–Shamir oracle (Sum.inr) on (x, proof.root) to re-derive ρs, and verifies all openings and PCP verdicts under the Merkle hash oracle (Sum.inl).

    @[simp]
    theorem Cslib.Crypto.evalPure_micaliProve {α : Type} (hTree : List Bool → List Bool) (hFS : α × List Bool → List (List Bool)) (V : Complexity.PCPVerifier α) (x : α) (table : List Bool) :
    OracleComp.evalPure (micaliOracle hTree hFS) (micaliProve V x table) = micaliProvePure hTree hFS V x table
    @[simp]
    theorem Cslib.Crypto.evalPure_micaliVerify {α : Type} (hTree : List Bool → List Bool) (hFS : α × List Bool → List (List Bool)) (V : Complexity.PCPVerifier α) (x : α) (proof : MicaliProof) :
    OracleComp.evalPure (micaliOracle hTree hFS) (micaliVerify V x proof) = micaliVerifyPure hTree hFS V x proof
    theorem Cslib.Crypto.micaliVerifyPure_micaliProvePure_eq_true {α : Type} {hTree : List Bool → List Bool} {ℓ : ℕ} (hlen : ∀ (y : List Bool), (hTree y).length = ℓ) {hFS : α × List Bool → List (List Bool)} {V : Complexity.PCPVerifier α} {x : α} {table : List Bool} (htable : V.tableVerifier (x, table) = true) (hρs : ∀ ρ ∈ hFS (x, kilianCommit (fun (x : List Bool) => hTree) V [] x table), ρ.length = V.coins x) :
    micaliVerifyPure hTree hFS V x (micaliProvePure hTree hFS V x table) = true

    Perfect completeness of Micali's construction (pure oracle form): for any deterministic Merkle oracle hTree whose digests all have one length and any Fiat–Shamir oracle hFS, if V.tableVerifier accepts (x, table) and every challenge string returned by hFS on (x, root) has V.coins x bits, then micaliVerifyPure accepts the proof produced by micaliProvePure.

    theorem Cslib.Crypto.micaliVerify_micaliProve_eq_true {α : Type} {hTree : List Bool → List Bool} {ℓ : ℕ} (hlen : ∀ (y : List Bool), (hTree y).length = ℓ) {hFS : α × List Bool → List (List Bool)} {V : Complexity.PCPVerifier α} {x : α} {table : List Bool} (htable : V.tableVerifier (x, table) = true) (hρs : ∀ ρ ∈ hFS (x, kilianCommit (fun (x : List Bool) => hTree) V [] x table), ρ.length = V.coins x) :
    (OracleComp.evalPure (micaliOracle hTree hFS) do let proof ← micaliProve V x table micaliVerify V x proof) = true

    Perfect completeness of Micali's construction (OracleComp simulation form): under any deterministic oracle (hTree, hFS) whose Merkle digests all have one length and whose Fiat–Shamir challenges have length V.coins x, running micaliProve followed by micaliVerify returns true on every table accepted by V.tableVerifier.

    The Micali random-oracle experiment #

    noncomputable def Cslib.Crypto.micaliOracleDist {α : Type} (V : Complexity.PCPVerifier α) (σ m : ℕ) (q : List Bool ⊕ α × List Bool) :

    Per-query distribution of the Micali random oracle with σ-bit Merkle digests and m PCP repetitions: Merkle queries (Sum.inl) draw uniformly from {0, 1}^σ (BitString.uniformList σ), and Fiat–Shamir queries (Sum.inr (x, rt)) draw m independent V.coins x-bit challenge strings (ProbComp.eval (kilianChallenges V m x)).

    The honest Micali execution as an oracle program: the honest prover generates a proof for (x, table) and the verifier checks it against the same oracle.

    noncomputable def Cslib.Crypto.micaliHonestGame {α : Type} [DecidableEq α] (V : Complexity.PCPVerifier α) (x : α) (table : List Bool) (σ m : ℕ) :

    The honest Micali ROM experiment with σ-bit Merkle digests and m PCP repetitions: runs micaliHonestProg V x table against a shared lazy random oracle RandomOracle.answer (micaliOracleDist V σ m) starting from an empty cache.

    theorem Cslib.Crypto.micaliHonestGame_eq_pure_true {α : Type} [DecidableEq α] (V : Complexity.PCPVerifier α) {x : α} {table : List Bool} (htable : V.tableVerifier (x, table) = true) (σ m : ℕ) :

    Perfect completeness of Micali's construction in the random oracle model: if V.tableVerifier (x, table) = true, then for every digest length σ and repetition count m, the honest Micali ROM experiment accepts with probability 1.