Worst-case bounded-prefix raw verifier and raw prover soundness for Kilian's protocol #
kilianVerify takes an already-decoded KilianView α and charges polynomial time in the full
length of the received view (computableInPolyTime_kilianVerify). Against an arbitrary unframed or
oversized cheating prover message, the encoded view itself could be arbitrarily long before
verification starts.
This module isolates the verifier's own inputs from the prover's untrusted raw transcript bits:
- Challenge input vs. raw prover tape (
KilianChallengeInput,kilianVerifyRawBounded): The verifier's machine reads(ch, rawProver)underencPair (encKilianChallengeInput enc) encBits, wherech = { key, stmt, challenges }holds only the verifier-generated hash key, statement, and PCP challenge strings, whilerawProver : List Boolholds the untrusted bytes supplied by the prover (rootandresponseviaencPair encBits encKilianResponse). - Deterministic length cap (
kilianRawProverCap): Any accepting transcript(root, resp)withroot.length ≤ ch.key.length(in particular every honest transcript when∀ k y, (H k y).length = k.length) satisfies(encPair encBits encKilianResponse (root, resp)).length ≤ kilianRawProverCap V ch.key ch.stmt ch.challenges(length_encKilianProverMsg_le_cap_of_kilianVerify). - Single machine with worst-case
(n + |enc x|)^O(1)complexity on all unbounded provers: ComposingcomputableInPolyTime_kilianVerifyRawBoundedwithTuring.MultiTapeTM.computableInTimeAndSpace_boundedPrefixyields one fixed binaryMultiTapeTMcomputingkilianVerifyRawBoundedthat reads at mostcap + 1bits ofrawProverand runs in worst-case time and space polynomially bounded inn + |enc ch.stmt|for everyrawProver : List Bool, regardless of length or framing validity (computableInTimeAndSpace_kilianVerifyRawBounded_of_params). - Raw prover model and soundness (
KilianRawProver,HashFamily.kilianRawSound): Every uniform strict PPT raw prover reduces viaKilianRawProver.toKilianProver(usingkilianResponseDecoder) to a uniform strict PPTKilianProver, yielding negligible soundness error under anyHashFamily.
Main definitions #
Cslib.Crypto.KilianChallengeInput,Cslib.Crypto.encKilianChallengeInput.Cslib.Crypto.KilianRawCommitment,Cslib.Crypto.encKilianRawCommitment.Cslib.Crypto.KilianRawProver,Cslib.Crypto.KilianRawProver.IsPPT,Cslib.Crypto.KilianRawProver.toKilianProver.Cslib.Crypto.kilianOpeningDecoder,Cslib.Crypto.kilianResponseDecoder,Cslib.Crypto.kilianProverMsgDecoder.Cslib.Crypto.kilianOpeningEncBound,Cslib.Crypto.kilianRawProverCap.Cslib.Crypto.kilianVerifyRawBounded,Cslib.Crypto.kilianHonestRawBoundedGame,Cslib.Crypto.kilianRawSoundnessGame,Cslib.Crypto.KilianRawSound.
Main results #
Cslib.Crypto.length_encKilianProverMsg_le_cap_of_kilianVerify,Cslib.Crypto.kilianVerifyRawBounded_enc_eq_of_root_le,Cslib.Crypto.eval_kilianHonestRawBoundedGame.Cslib.Crypto.computableInPolyTime_kilianVerifyRawBounded,Cslib.Crypto.computableInTimeAndSpace_kilianVerifyRawBounded,Cslib.Crypto.computableInTimeAndSpace_kilianVerifyRawBounded_of_params.Cslib.Crypto.succProbability_kilianRawSoundnessGame_le,Cslib.Crypto.HashFamily.kilianRawSound.
Challenge inputs and raw prover types #
The verifier's own inputs to Kilian verification: hash key, statement, and sampled PCP challenges, keeping prover-controlled commitment/response bits in the raw prover tape.
The hash key.
- stmt : α
The statement.
The verifier's PCP challenge strings, one per repetition.
Instances For
Encoding of KilianChallengeInput: framed hash key, framed statement, and challenges.
A raw cheating prover's first-stage output: statement, raw root bitstring, and saved state.
- stmt : α
The statement chosen by the prover.
The raw root bitstring sent in the commitment message.
The saved state passed to the second stage.
Instances For
Encoding of KilianRawCommitment: framed statement, framed raw root, and saved state.
A raw cheating prover is strict PPT if both stages run in polynomial time in their full encoded inputs, saved state, and challenges.
First stage is a strict PPT family from
(n, k)toKilianRawCommitment.- answer : Probability.IsPPTOn (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits))) Turing.MultiTapeTM.encBits fun (x : ℕ × List Bool × List (List Bool)) => match x with | (n, state, ρs) => P.answer n state ρs
Second stage is strict PPT on
(n, state, ρs)outputting a raw bitstring.
Total decoders for raw transcripts #
Total polynomial-time decoder for a MerkleOpening Bool, inverting encKilianOpening.
Total polynomial-time decoder for KilianResponse, inverting encKilianResponse.
Total polynomial-time decoder for (root, resp) from raw prover bits.
kilianProverMsgDecoder recovers (root, kilianResponseDecoder.decode rawResp) from an
encoded pair of bit strings.
Deterministic transcript length cap and bounded-prefix verifier #
Upper bound on the encoded bit length of one MerkleOpening Bool whose authentication path
has depth sibling labels each of length at most kLength.
Deterministic cap on the encoded length of any valid raw prover message
encPair encBits encKilianResponse (root, resp) with root.length ≤ k.length against verifier
challenges (k, x, ρs). Oversized messages exceeding this cap are rejected immediately by
kilianVerifyRawBounded.
The verifier decision operating directly on verifier inputs ch and an arbitrary unframed or
oversized raw prover bitstring rawProver. Rejects immediately if rawProver.length > cap, and
otherwise decodes (root, resp) via kilianProverMsgDecoder and runs kilianVerify.
Accepted transcripts fit under kilianRawProverCap: any transcript accepted by
kilianVerify with root.length ≤ k.length has encoded pair length at most
kilianRawProverCap V k x ρs.
Honest prover transcripts for digest-length hash functions fit strictly under
kilianRawProverCap.
Prefix truncation invariance: kilianVerifyRawBounded depends only on the first
kilianRawProverCap V ch.key ch.stmt ch.challenges + 1 bits of rawProver.
Oversized prover bitstrings exceeding kilianRawProverCap are always rejected.
On any encoded pair within kilianRawProverCap, kilianVerifyRawBounded agrees with
kilianVerify.
On any encoded pair (root, resp) with root.length ≤ ch.key.length, kilianVerifyRawBounded
agrees unconditionally with kilianVerify.
Perfect completeness under the bounded-prefix raw verifier: for a hash with key-length
digests and any accepted table, kilianHonestRawBoundedGame accepts with probability 1.
Polynomial-time certificate and bounded-prefix machine execution #
kilianRawProverCap is computable in polynomial time in unary from KilianChallengeInput.
Polynomial-time certificate for kilianVerifyRawBounded: decodes and verifies the raw
prover bitstring within polynomial time in |(ch, rawProver)|.
Worst-case verifier runtime and space on arbitrary unbounded raw provers (by verifier input
length): there is one fixed binary MultiTapeTM computing kilianVerifyRawBounded on every
(ch, rawProver) whose time and space depend only on (encKilianChallengeInput enc ch).length,
for every rawProver : List Bool (even exponentially long or malformed).
Worst-case verifier runtime and space in n + |enc x| on ALL arbitrary raw provers:
under a polynomial-time hash with key-length digests and a polynomial-time PCP verifier V with
O(log |enc x|) random bits, there is one fixed binary multi-tape Turing machine computing
kilianVerifyRawBounded whose step count and space on every (ch, rawProver) with key length ≤ n
and ≤ n challenges of length ≤ V.coins ch.stmt are bounded by polynomials in
n + |enc ch.stmt|, uniformly over all arbitrary unbounded rawProver : List Bool.
Raw prover soundness #
Convert a raw prover to a structured KilianProver by decoding its raw second-stage response
with kilianResponseDecoder.
Decoding a uniform strict PPT raw prover produces a uniform strict PPT KilianProver.
Soundness experiment for a raw cheating prover verified by kilianVerifyRawBounded.
Computational soundness against raw provers: every uniform strict PPT raw prover convinces
kilianVerifyRawBounded of a false statement with negligible probability.
Every accepting run of kilianRawSoundnessGame also makes kilianSoundnessGame accept for
P.toKilianProver.
Computational soundness of bounded-prefix raw Kilian under any HashFamily, polynomial-time
O(log n)-coin PCP verifier V, and arbitrary uniform strict PPT raw provers.