Bounded-prefix raw Micali verification, native ROM verifier runtime, and raw ROM soundness #
CslibFrontier.Crypto.Computational.Kilian.MicaliSoundness verifies structured MicaliProof values
under MicaliSpec α without charging message decoding, truncating oversized proof strings, or
certifying native oracle-machine verification runtime (locator not re-verified against primary PDF
for [Mic00] and [CY24]).
This module completes that verification-complexity and raw-proof layer cleanly on top of
CslibFrontier.Crypto.Computational.Kilian.RawVerifier and
CslibFrontier.Computability.Machines.Turing.MultiTape.Combinators.BoundedPrefix:
- Framing decoder and uniform proof cap (
encMicaliProof,micaliProofDecoder,micaliMaxProofCap): reuseskilianProverMsgDecoderandkilianRawProverCap. Before querying the Fiat–Shamir oracle, the verifier decodesrootfrom only the leading2 * σ + 1bits and enforcesmicaliHasRootPrefix σ rawProof. Any accepted raw proof fits insidemicaliMaxProofCap V σ m d x(computableInPolyTime_micaliMaxProofCap), while honest proof payload bits satisfy theO((σ + m + 1)^2 · (log₂ |enc x| + 1))boundmicaliProofBits_micaliProvePure_le_log. - Pure bounded-prefix verifier machine (
micaliVerifyRawBoundedPure): agrees unconditionally withmicaliVerifyPureon every proofprf : MicaliProofwithprf.root.length ≤ σ, depends only onrawProof.take (micaliMaxProofCap V σ m d x + 1), and runs on one fixed binaryMultiTapeTMin worst-case time and space polynomial inm + |enc x|for all unbounded raw inputs (computableInTimeAndSpace_micaliVerifyRawBoundedPure_of_params). - Native ROM verifier machine (
micaliVerifyRawBounded,micaliVerifyRawWord): verifies proofs against Micali's random oracle with at most1Fiat–Shamir query and at mostm * d * (kilianDepth V x + 1)Merkle queries (IsCostBounded), bisimulates cleanly with the word-oracle interfaceMicaliWordOp(micaliWordCodec), and runs on one fixed halting oracleMultiTapePTMin worst-case step count polynomial inσ + m + |enc x|uniformly over all arbitrary unboundedrawProof : List Bool, all(σ, m, x) : MicaliRawInput α, and all stateful word handlers (computesOracleInTimeAndQueriesOn_micaliVerifyRawWord). - Adaptive raw-byte ROM soundness & NP CS proofs (
micaliRawSoundness_bound,exists_micaliRawCSProof_of_npRelation): proves adaptive two-channel ROM soundness against unbounded raw-byte cheating proversP : OracleComp (MicaliSpec α) (α × List Bool)by reducing tomicaliSoundness_bound_of_prover_verifierwith sanitized bounded proofs, and yields complete raw-verified CS proofs for arbitrary NP relations.
Locators in [Mic00] and [CY24] are carried from Kilian.MicaliSoundness
(locator not re-verified against primary PDF).
Main definitions #
Cslib.Crypto.MicaliRawInput,Cslib.Crypto.encMicaliRawInput,Cslib.Crypto.encMicaliProof,Cslib.Crypto.micaliProofDecoder,Cslib.Crypto.micaliHasRootPrefix,Cslib.Crypto.micaliFSReplyCap,Cslib.Crypto.micaliMaxProofCap,Cslib.Crypto.kilianStructValid.Cslib.Crypto.micaliVerifyRawBoundedPure,Cslib.Crypto.micaliVerifyRawBounded.Cslib.Crypto.MicaliWordOp,Cslib.Crypto.micaliWordCodec,Cslib.Crypto.micaliVerifyRawWord.Cslib.Crypto.micaliRawSoundnessProg,Cslib.Crypto.micaliRawSoundnessGame.
Main results #
Cslib.Crypto.micaliVerifyRawBoundedPure_take_eq,Cslib.Crypto.micaliVerifyRawBoundedPure_enc_eq_of_root_le,Cslib.Crypto.computableInTimeAndSpace_micaliVerifyRawBoundedPure_of_params.Cslib.Crypto.evalPure_micaliVerifyRawBounded,Cslib.Crypto.isCostBounded_micaliFSCost_micaliVerifyRawBounded,Cslib.Crypto.isCostBounded_micaliMTCost_micaliVerifyRawBounded.Cslib.Crypto.runWith_wordOracle_micaliVerifyRawWord,Cslib.Crypto.computesOracleInTimeAndQueriesOn_micaliVerifyRawWord.Cslib.Crypto.micaliRawSoundness_bound,Cslib.Crypto.exists_micaliRawCSProof_of_npRelation.
References #
- S. Micali, Computationally Sound Proofs
- A. Chiesa, E. Yogev, Building Cryptographic Proofs from Hash Functions, Construction 21.1.1 and Theorem 21.2.1.
Framed encoding of MicaliRawInput α using unary (sigma, reps) and enc for stmt.
Framed encoding of MicaliProof: the framed Merkle root, then the Kilian opening response.
The tuple of the fields of encMicaliProof.
Total polynomial-time decoder for MicaliProof, reusing kilianProverMsgDecoder.
Deterministic upper bound on kilianRawProverCap V (List.replicate σ false) x ρs uniform
over all challenge lists ρs of length m for a d-query PCP verifier V.
Structural validity check on resp ensuring path lengths and digest lengths match V and
root before issuing any Merkle oracle queries.
Pure bounded-prefix Micali verifier: decodes root from the leading 2 * σ + 1 bits of
rawProof, queries hFS (x, root), validates challenge and proof caps, and runs
kilianVerifyRawBounded.
Prefix truncation invariance for micaliVerifyRawBoundedPure: verification depends only on the
first micaliMaxProofCap V σ m d x + 1 bits of rawProof.
On any encoded prf : MicaliProof with prf.root.length ≤ σ, whenever hFS (x, prf.root)
returns m valid V.coins x-bit challenges, micaliVerifyRawBoundedPure agrees unconditionally
with micaliVerifyPure.
Honest completeness for micaliVerifyRawBoundedPure.
Worst-case pure Micali verifier runtime and space on ALL unbounded raw proofs: for any
polynomial-time fixed-digest hash hTree (σ-bit outputs), Fiat–Shamir oracle hFS, and PCP
verifier V, there is one fixed binary MultiTapeTM computing micaliVerifyRawBoundedPure whose
runtime and space are bounded polynomially in m + |enc x| uniformly over every rawProof
(including exponentially oversized or arbitrarily malformed proof strings).
Native two-channel Micali bounded-prefix verifier program over MicaliSpec α.
Checks micaliHasRootPrefix before issuing the single Fiat–Shamir query (x, root), validates
the received challenge lengths, raw proof cap, and opening lengths before issuing any Merkle
queries, and delegates to kilianVerifyProg.
micaliVerifyRawBounded issues at most 1 Fiat–Shamir oracle query on every rawProof.
micaliVerifyRawBounded issues at most m * d * (kilianDepth V x + 1) Merkle hash queries on
every raw input rawProof (even arbitrarily oversized or malformed inputs).
Finite operation tag for the native two-channel word-oracle Micali verifier.
- merkle : MicaliWordOp
- fs : MicaliWordOp
Instances For
Word-oracle Kilian single-repetition verification.
Word-oracle Kilian multi-repetition verification.
Core native word-oracle Micali verifier taking explicit ((σ, m, x), rawProof) and capping
both the .fs challenge reply at micaliFSReplyCap enc c m x + 1 and every .merkle digest
reply at σ. Rejecting whenever fsWord.length > micaliFSReplyCap enc c m x guarantees no
malformed Fiat–Shamir reply is silently corrupted by prefix truncation.
Bounded-prefix wrapper around micaliVerifyRawWordCore that truncates rawProof to
micaliMaxProofCap V inp.sigma inp.reps d inp.stmt + 1 bits first, achieving worst-case halting
oracle runtime polynomial in σ + m + |enc x| uniformly over all arbitrary unbounded
rawProof.
Classical OracleCodec embedding MicaliSpec α into MicaliWordOp × List Bool using
encPair enc encBits for Fiat–Shamir queries (x, root).
Stateful ROM bisimulation for the native word-oracle Micali verifier: under the word oracle
((micaliWordCodec enc).wordOracle oracle) of ANY stateful (MicaliSpec α) handler whose .inl
Merkle digests have length at most σ (with NO condition on its .inr Fiat–Shamir handler), both
micaliVerifyRawWordCore and micaliVerifyRawWord produce the exact same joint output and final
oracle state distribution as micaliVerifyRawBounded.
micaliVerifyRawWordCore is strict oracle PPT in its full input (inp, rawProof).
micaliVerifyRawWord and micaliVerifyRawWordCore issue at most
1 + m * d * (kilianDepth V x + 1) word-oracle queries on every raw input rawProof.
Uniform worst-case native ROM verifier halting time and query complexity: there is one
fixed halting oracle machine MultiTapePTM computing micaliVerifyRawWord (hence matching
micaliVerifyRawBounded under (micaliWordCodec enc).wordOracle on every stateful handler) whose
halting step count is bounded polynomially in inp.sigma + inp.reps + |enc inp.stmt| uniformly over
all (inp, rawProof) and all stateful word handlers (independent of rawProof.length),
and whose query count is at most 1 + inp.reps * d * (kilianDepth V inp.stmt + 1).
Honest Micali ROM experiment evaluating the raw bounded-prefix verifier
micaliVerifyRawBounded on the framed encoding encMicaliProof proof produced by micaliProve.
Perfect raw completeness of Micali's construction in the random oracle model: if
V.tableVerifier (x, table) = true, then for every digest width σ and repetition count m,
the honest raw bounded verifier micaliVerifyRawBounded accepts encMicaliProof proof with
probability 1.
Native raw-byte Micali soundness program: runs a raw cheating prover
P : OracleComp (MicaliSpec α) (α × List Bool) returning (x, rawProof), checks
micaliVerifyRawBounded V σ m x rawProof, and returns true when x ∉ L and the verifier
accepts.
Native raw-byte Micali ROM soundness experiment against the shared lazy random oracle
RandomOracle.answer (micaliOracleDist V σ m) starting from an empty cache.
Adaptive two-channel ROM soundness for bounded-prefix raw Micali proofs: for any PCP
verifier V with per-repetition soundness error ≤ 1 / 2 outside L and query complexity ≤ d,
and any raw-byte cheating prover P : OracleComp (MicaliSpec α) (α × List Bool) making at most
t_MT Merkle hash queries and t_FS Fiat–Shamir queries such that every candidate output statement
satisfies m * d * (kilianDepth V x + 1) ≤ q_V, micaliRawSoundnessGame accepts a false
statement with probability at most
(t_FS + 1) * (1 / 2) ^ m + (t_MT + q_V) * ((3 * (t_MT + q_V) + (t_FS + 1)) * (1 / 2 ^ σ)).
Native raw-byte Micali CS Proofs for arbitrary NP relations (compare [Mic00];
[CY24], Construction 21.1.1 and Theorem 21.2.1; locator not re-verified against primary PDF): every NP relation R : NPRelation enc admits a PCP verifier V (≤ c * (log₂ |enc x| + 1)
random coins, ≤ d queries) and a polynomial-time witness compiler
compile : α × List Bool → List Bool such that:
compilecompiles everyR-witness into a compact table accepted byV.tableVerifier, and the raw bounded verifiermicaliVerifyRawBoundedaccepts honest framed proofs with probability1(micaliHonestRawGame_eq_pure_true),- there is one fixed halting oracle machine (
MultiTapePTM) implementingmicaliVerifyRawWordwhose worst-case runtime is bounded by a single polynomialtWordBound (σ + m + |enc x|)uniformly over all arbitrary unboundedrawProof : List Booland all stateful word handlers, using at most1 + m * d * (kilianDepth V x + 1)queries, micaliRawSoundnessGamesatisfies themicaliRawSoundness_boundinequality against arbitrary adaptive two-channel raw cheating provers, and- honest proof payload bits
micaliProofBits (micaliProvePure hTree hFS V x table)fit withinC * (σ + m + 1)^2 * (Nat.log 2 |enc x| + 1).
As immediate corollaries of applying runWith_wordOracle_micaliVerifyRawWord and
computableInTimeAndSpace_micaliVerifyRawBoundedPure_of_params to the returned V, coins_le,
and queries_le, micaliVerifyRawWord bisimulates micaliVerifyRawBounded on every stateful
handler via (micaliWordCodec enc).wordOracle, and any fixed digest-width polynomial-time hTree
and hFS yield one fixed halting binary MultiTapeTM for micaliVerifyRawBoundedPure running in
time and space polynomial in m + |enc x| for all rawProof : List Bool.