Formally Verified Arguments of Knowledge in Lean

2 Oracle Reductions

2.1 Definitions

In this section, we give the basic definitions of a public-coin interactive oracle reduction (henceforth called an oracle reduction or IOR). We will define its building blocks, and various security properties.

2.1.1 Probability and Oracle Computations

We write \(\mathsf{U}(A)\) for the uniform distribution on a nonempty finite set \(A\), and \(\Delta \) for event-supremum statistical distance, including for subprobability distributions. A probabilistic algorithm uses its own private coins. An oracle superscript specifies which oracles it may query.

Oracle Queries and Traces

Query and answer types.

A query type \(Q\) and answer types \(A(q)\) specify the type of a function \(f\in \prod _{q\in Q}A(q)\). An algorithm with query access to \(f\) receives \(f(q)\) when it submits \(q\). In Lean, OracleSpec specifies only these types; it does not specify a probability distribution. In general, a random function may be sampled from independently chosen distributions \(\mu _q\) on the answer types. The Lean random-oracle handler below uses uniform sampling.

The query and answer types and their probability laws are fixed before an oracle experiment begins. In particular, an oracle’s output size is part of its answer type. For parameterized NARG security, these data may depend on a public security parameter \(\lambda \in \mathbb N\) and instance-size bound \(n\in \mathbb N\); the experiment samples from \(\mathcal{D}(\lambda ,n)\). A concrete construction may fix these data and write simply \(\mathcal{D}\). The oracle distribution never depends on the adversary’s query budget.

Definition 1 Lazy sampling table
✓
#

For an oracle specification with sampleable answer types \(A(q)\), a lazy sampling table \(C\) is a partial map \(C(q)\in \operatorname {Option}(A(q))\). Its domain

\begin{equation*} \operatorname {dom}(C)=\{ q\in Q\mid C(q)\text{ is defined}\} \end{equation*}

is the set of queries with stored answers. On query \(q\), the uniform random-oracle handler returns the stored answer if \(q\in \operatorname {dom}(C)\); otherwise it samples \(a\) uniformly from \(A(q)\), stores \(C(q)=a\), and returns \(a\). Lean’s QueryCache imposes no finite-domain requirement, and randomOracle implements this cache-hit and cache-miss behavior.

Definition 2 Oracle computation with trace
✓
#

An oracle algorithm is an OracleComp computation. A query handler interprets its calls, possibly maintaining a lazy table as in Definition 1. Logging additionally records each query and answer in order, including repetitions; Lean uses such logs for extraction and backtracking. We write

\begin{equation*} y\xleftarrow {T}\mathsf{Run}_{\mathsf{OracleSpec}}(\mathcal{A}) \end{equation*}

to mean: run \(\mathcal{A}\) with the specified oracle handler, return \(y\), and record the ordered query-answer log \(T\), including repeated queries. The log is distinct from the final cache.

2.1.2 Format

An (interactive) oracle reduction (IOR) is an interactive protocol between two parties, a prover \(\mathcal{P}\) and a verifier \(\mathcal{V}\). In ArkLib, IORs are defined in the following setting:

  1. We work in an ambient dependent type theory (in our case, Lean).

  2. The protocol flow is fixed and defined by a given type signature, which describes in each round which party sends a message to the other, and the type of that message.

  3. The prover and verifier has access to some inputs (called the (oracle) context) at the beginning of the protocol. These inputs are classified as follows:

    • Public inputs (or statement) \(\mathbb {x}\): available to both parties;

    • Private inputs (or witness) \(\mathbb {w}\): available only to the prover;

    • Oracle inputs (or oracle statement) \(\mathbb {ox}\): the underlying data is available to the prover, but it’s only exposed as an oracle to the verifier. See Definition 4 for more information.

    • Shared oracle \(\mathcal O\): the oracle is available to both parties via an interface; in most cases, it is either empty, a probabilistic sampling oracle, a random oracle, or a group oracle (for the Algebraic Group Model). See Section 5.3 for more information on oracle computations.

  4. The messages sent from the prover may either: 1) be seen directly by the verifier, or 2) only available to a verifier through an oracle interface (which specifies the type for the query and response, and the oracle’s behavior given the underlying message).

    Currently, in the oracle reduction setting, we only allow messages sent to be available through oracle interfaces. In the (non-oracle) reduction setting, all messages are available directly. Future extensions may allow for mixed visibility for prover’s messages.

  5. \(\mathcal{V}\) is assumed to be public-coin, meaning that its challenges are chosen uniformly at random from the finite type corresponding to that round, and it uses no randomness otherwise, except from those coming from the shared oracle.

  6. At the end of the protocol, the prover and verifier outputs a new (oracle) context, which consists of:

    • The verifier takes in the input statement and the challenges, performs an oracle computation on the input oracle statements and the oracle messages, and outputs a new output statement.

      The verifier also outputs the new oracle statements, in one of two representations. Either each output oracle is an embedded copy of an input oracle statement or an oracle message, or the output family is virtual: each query to it is answered by queries to the input oracle statements and oracle messages, and this answer is certified against an explicit map that materializes the output data. The virtual form covers derived outputs such as a linear combination of input polynomials.

    • The prover takes in some final private state (maintained during protocol execution), and outputs a new output statement, new output oracle statement, and new output witness.

Remark 3 Literature Comparison
#

In the literature, our definition corresponds to the notion of functional IORs. Historically, (vector) IOPs were the first notion to be introduced by  [ 7 ] ; these are IORs where the output statement is true/false, all oracle statements and messages are vectors over some alphabet \(\Sigma \), and the oracle interfaces are for querying specific positions in the vector. More recent works have considered other oracle interfaces, e.g., polynomial oracles  [ 14 , 10 ] , generalized proofs to reductions  [ 25 , 9 , 11 , 5 ] , and considered general oracle interfaces  [ 4 ] . Most of the IOP theory has been distilled in the textbook  [ 16 ] .

We have not seen any work that considers our most general setting, of IORs with arbitrary oracle interfaces.

We now go into more details on these objects, and how they are represented in Lean. Our description will aim to be as close as possible to the Lean code, and hence may differ somewhat from “mainstream” mathematical & cryptographic notation.

Definition 4 Oracle Interface
✓
#

An oracle interface for an underlying data type \(\mathsf{D}\) consists of the following:

  • A type \(\mathsf{Q}\) for queries to the oracle,

  • A response family \(\mathsf{R} : \mathsf{Q} \to \mathsf{Type}\), so that the type of the response may depend on the query,

  • An answering function \(\mathsf{answer} : \mathsf{D} \to (q : \mathsf{Q}) \to \mathsf{R}(q)\) that specifies the oracle’s behavior given the underlying data and a query.

In Lean the response family and answering function are packaged as an oracle context whose implementation reads the underlying data. A constant response family \(\mathsf{R}(q) = \mathsf{R}\) is the common special case.

See OracleInterface.lean for common instances of \(\mathsf{OracleInterface}\).

Definition 5 Context
#

In an (oracle) reduction, its (oracle) context consists of a statement type, a witness type, and (in the oracle case) an indexed list of oracle statement types.

Currently, we do not abstract out / bundle the context as a separate structure, but rather specifies the types explicitly. This may change in the future.

Definition 6 Protocol Specification
✓
#

A protocol specification for an \(n\)-message (oracle) reduction, is an element of the following type:

\begin{align*} \mathsf{ProtocolSpec}\ n & := \mathsf{Fin}\ n \to \mathsf{Direction}\times \mathsf{Type}. \end{align*}

In the above, \(\mathsf{Direction}:= \{ \mathsf{P \! \! \rightarrow \! \! V}, \mathsf{V \! \! \rightarrow \! \! P}\} \) is the type of possible directions of messages, and \(\mathsf{Fin}\ n := \{ i : \mathbb {N}\mathbin {/\! /}i {\lt} n \} \) is the type of all natural numbers less than \(n\).

In other words, for each step \(i\) of interaction, the protocol specification describes the direction of the message sent in that step, i.e., whether it is from the prover or from the verifier. It also describes the type of that message.

In the oracle setting, we also expect an oracle interface for each message from the prover to the verifier.

We define some supporting definitions for a protocol specification.

Definition 7 Protocol Specification Components
✓

Given a protocol spec \(\mathsf{pSpec}: \mathsf{ProtocolSpec}\ n\), we define:

  • \(\mathsf{pSpec}.\mathsf{Dir}\ i := (\mathsf{pSpec}\ i).\mathsf{fst}\) extracts the direction of the \(i\)-th message.

  • \(\mathsf{pSpec}.\mathsf{Type}\ i := (\mathsf{pSpec}\ i).\mathsf{snd}\) extracts the type of the \(i\)-th message.

  • \(\mathsf{pSpec}.\mathsf{MessageIdx}:= \{ i : \mathsf{Fin}\ n \mathbin {/\! /}\mathsf{pSpec}.\mathsf{Dir}\ i = \mathsf{P \! \! \rightarrow \! \! V}\} \) is the subtype of indices corresponding to prover messages.

  • \(\mathsf{pSpec}.\mathsf{ChallengeIdx}:= \{ i : \mathsf{Fin}\ n \mathbin {/\! /}\mathsf{pSpec}.\mathsf{Dir}\ i = \mathsf{V \! \! \rightarrow \! \! P}\} \) is the subtype of indices corresponding to verifier challenges.

  • \(\mathsf{pSpec}.\mathsf{Message}\ i := (i : \mathsf{pSpec}.\mathsf{MessageIdx}) \to \mathsf{pSpec}.\mathsf{Type}\ i.\mathsf{val}\) is an indexed family of message types in the protocol.

  • \(\mathsf{pSpec}.\mathsf{Challenge}\ i := (i : \mathsf{pSpec}.\mathsf{ChallengeIdx}) \to \mathsf{pSpec}.\mathsf{Type}\ i.\mathsf{val}\) is an indexed family of challenge types in the protocol.

Given protocol specification \(\mathsf{pSpec}: \mathsf{ProtocolSpec}\ n\), we define:

  • A transcript up to round \(k : \mathsf{Fin}\ (n + 1)\) is an element of type

    \begin{equation*} \mathsf{Transcript}\ k\ \mathsf{pSpec}:= (i : \mathsf{Fin}\ k) \to \mathsf{pSpec}.\mathsf{Type}\ (\uparrow i : \mathsf{Fin}\ n) \end{equation*}

    where \(\uparrow i : \mathsf{Fin}\ n\) denotes casting \(i : \mathsf{Fin}\ k\) to \(\mathsf{Fin}\ n\) (valid since \(k \leq n + 1\)).

  • A full transcript is \(\mathsf{FullTranscript}\ \mathsf{pSpec}:= (i : \mathsf{Fin}\ n) \to \mathsf{pSpec}.\mathsf{Type}\ i\).

  • The type of all messages from prover to verifier is

    \begin{equation*} \mathsf{pSpec}.\mathsf{Messages}:= \prod _{i : \mathsf{pSpec}.\mathsf{MessageIdx}} \mathsf{pSpec}.\mathsf{Message}\ i \end{equation*}
  • The type of all challenges from verifier to prover is

    \begin{equation*} \mathsf{pSpec}.\mathsf{Challenges}:= \prod _{i : \mathsf{pSpec}.\mathsf{ChallengeIdx}} \mathsf{pSpec}.\mathsf{Challenge}\ i \end{equation*}
Remark 9 Design Decision
#

We do not enforce a particular interaction flow in the definition of an interactive (oracle) reduction. This is done so that we can capture all protocols in the most generality. Also, we want to allow the prover to send multiple messages in a row, since each message may have a different oracle representation (for instance, in the Plonk protocol, the prover’s first message is a 3-tuple of polynomial commitments.)

Definition 10 Type Signature of a Prover
✓

A prover \(\mathcal{P}\) in a reduction consists of the following components:

  • Prover State: A family of types \(\mathsf{PrvState} : \mathsf{Fin}(n+1) \to \mathsf{Type}\) representing the prover’s internal state at each round of the protocol.

  • Input Processing: A function

    \begin{equation*} \mathsf{input} : \mathsf{StmtIn}\to \mathsf{WitIn}\to \mathsf{PrvState}(0) \end{equation*}

    that initializes the prover’s state from the input statement and witness.

  • Message Sending: For each message index \(i : \mathsf{pSpec}.\mathsf{MessageIdx}\), a function

    \begin{equation*} \mathsf{sendMessage}_i : \mathsf{PrvState}(i.\mathsf{val}.\mathsf{castSucc}) \to \mathsf{OracleComp}(\mathsf{oSpec}, \mathsf{pSpec}.\mathsf{Message}(i) \times \mathsf{PrvState}(i.\mathsf{val}.\mathsf{succ})) \end{equation*}

    that generates the message and updates the prover’s state.

  • Challenge Processing: For each challenge index \(i : \mathsf{pSpec}.\mathsf{ChallengeIdx}\), a function

    \begin{equation*} \mathsf{receiveChallenge}_i : \mathsf{PrvState}(i.\mathsf{val}.\mathsf{castSucc}) \to \mathsf{OracleComp}(\mathsf{oSpec}, \mathsf{pSpec}.\mathsf{Challenge}(i) \to \mathsf{PrvState}(i.\mathsf{val}.\mathsf{succ})) \end{equation*}

    Before seeing the challenge, the prover runs an oracle computation that returns a state-update function; applying it to the challenge gives the next state.

  • Output Generation: A function

    \begin{equation*} \mathsf{output} : \mathsf{PrvState}(\mathsf{Fin}.\mathsf{last}(n)) \to \mathsf{OracleComp}(\mathsf{oSpec}, \mathsf{StmtOut}\times \mathsf{WitOut}) \end{equation*}

    that produces the final output statement and witness from the prover’s final state. It may query the shared oracle.

Definition 11 Type Signature of an Oracle Prover
✓
#

An oracle prover is a prover whose input statement includes the underlying data for oracle statements, and whose output includes oracle statements. Formally, it is a prover with input statement type \(\mathsf{StmtIn}\times (\forall i : \iota _{\mathsf{si}}, \mathsf{OStmtIn}(i))\) and output statement type \(\mathsf{StmtOut}\times (\forall i : \iota _{\mathsf{so}}, \mathsf{OStmtOut}(i))\), where:

  • \(\mathsf{OStmtIn}: \iota _{\mathsf{si}} \to \mathsf{Type}\) are the input oracle statement types

  • \(\mathsf{OStmtOut}: \iota _{\mathsf{so}} \to \mathsf{Type}\) are the output oracle statement types

After the interaction phase, the verifier may then run some verification procedure to check the validity of the prover’s responses. In this procedure, the verifier gets access to the public part of the context, and oracle access to either the shared oracle, or the oracle inputs.

Definition 12 Type Signature of a Verifier
✓
#

A verifier \(\mathcal{V}\) in a reduction is specified by a single function:

\begin{equation*} \mathsf{verify} : \mathsf{StmtIn}\to \mathsf{FullTranscript}(\mathsf{pSpec}) \to \mathsf{OptionT}(\mathsf{OracleComp}(\mathsf{oSpec}), \mathsf{StmtOut}) \end{equation*}

This function takes the input statement and the complete transcript of the protocol interaction, and performs an oracle computation (potentially querying the shared oracle \(\mathsf{oSpec}\)) that either produces an output statement or fails. Failure, the \(\mathsf{none}\) result of the \(\mathsf{OptionT}\) layer, is how the verifier rejects.

The verifier is assumed to be public-coin, meaning it only sends uniformly random challenges and uses no other randomness beyond what is provided by the shared oracle.

Definition 13 Type Signature of an Oracle Verifier
✓

An oracle verifier \(\mathcal{V}\) consists of the following components:

  • Verification Logic: A function

    \begin{equation*} \mathsf{verify} : \mathsf{StmtIn}\to \mathsf{pSpec}.\mathsf{Challenges}\to \mathsf{OptionT}(\mathsf{OracleComp}(\mathsf{oSpec}\mathrel {++_\mathsf {o}} ([\mathsf{OStmtIn}]_\mathsf {o} \mathrel {++_\mathsf {o}} [\mathsf{pSpec}.\mathsf{Message}]_\mathsf {o})), \mathsf{StmtOut}) \end{equation*}

    that takes the input statement and verifier challenges, and performs oracle queries to the shared oracle, input oracle statements, and prover messages to produce an output statement or reject. As for a verifier, rejection is the \(\mathsf{none}\) result of the \(\mathsf{OptionT}\) layer.

  • Output Oracle Representation: one of the following two forms.

    • Embedding. An injective function

      \begin{equation*} \mathsf{embed} : \iota _{\mathsf{so}} \hookrightarrow \iota _{\mathsf{si}} \oplus \mathsf{pSpec}.\mathsf{MessageIdx}\end{equation*}

      that selects, for each output oracle statement, an input oracle statement or a prover message, together with a proof

      \begin{equation*} \mathsf{hEq} : \forall i : \iota _{\mathsf{so}}, \mathsf{OStmtOut}(i) = \begin{cases} \mathsf{OStmtIn}(j) & \text{if } \mathsf{embed}(i) = \mathsf{inl}(j) \\ \mathsf{pSpec}.\mathsf{Message}(k) & \text{if } \mathsf{embed}(i) = \mathsf{inr}(k) \end{cases}\end{equation*}

      that the types match, and a proof that the oracle interfaces match.

    • Virtual simulation. A map \(\mathsf{materializeOutput}\) from the challenges, the input oracle data and the messages to the output oracle data; a query implementation \(\mathsf{simulateOutputQuery}\) answering each output-oracle query by queries to the input oracle statements and prover messages; and a proof that, on actual data, the simulated answer equals the answer computed from the materialized output.

Definition 14 Oracle Verifier to Verifier Conversion
✓
#

An oracle verifier can be converted to a standard verifier through a natural simulation process. The key insight is that while an oracle verifier only has oracle access to certain data (input oracle statements and prover messages), a standard verifier can be given the actual underlying data directly.

The conversion works as follows: when the oracle verifier needs to make an oracle query to some data, the converted verifier can respond to this query immediately using the actual underlying data it possesses. This is accomplished through the OracleInterface type class, which specifies for each data type how to respond to queries given the underlying data.

Specifically, given an oracle verifier \(\mathcal{V}_{\text{oracle}}\):

  • The converted verifier \(\mathcal{V}_{\text{oracle}}.\mathsf{toVerifier}\) takes as input both the statement and the actual underlying data for all oracle statements

  • When \(\mathcal{V}_{\text{oracle}}\) attempts to query an oracle statement or prover message, the converted verifier uses the corresponding OracleInterface instance to compute the response from the actual data

  • The output oracle statements are the materialized output: in the embedding case, the selected input oracle statements and prover messages; in the virtual case, the value of \(\mathsf{materializeOutput}\) on the challenges, input oracle data and messages

  • If the oracle verifier rejects, so does the converted verifier

An oracle reduction then consists of a type signature for the interaction, and a pair of prover and verifier for that type signature.

Definition 15 Interactive Reduction
✓
#

An interactive reduction for protocol specification \(\mathsf{pSpec}: \mathsf{ProtocolSpec}(n)\) and oracle specification \(\mathsf{oSpec}\) consists of:

  • A prover \(\mathcal{P}: \mathsf{Prover}(\mathsf{pSpec}, \mathsf{oSpec}, \mathsf{StmtIn}, \mathsf{WitIn}, \mathsf{StmtOut}, \mathsf{WitOut})\)

  • A verifier \(\mathcal{V}: \mathsf{Verifier}(\mathsf{pSpec}, \mathsf{oSpec}, \mathsf{StmtIn}, \mathsf{StmtOut})\)

The reduction establishes a relationship between input relations on \((\mathsf{StmtIn}, \mathsf{WitIn})\) and output relations on \((\mathsf{StmtOut}, \mathsf{WitOut})\) through the interactive protocol defined by \(\mathsf{pSpec}\).

Definition 16 Interactive Oracle Reduction
✓
#

An interactive oracle reduction for protocol specification \(\mathsf{pSpec}: \mathsf{ProtocolSpec}(n)\) with oracle interfaces for all prover messages, and oracle specification \(\mathsf{oSpec}\), consists of:

  • An oracle prover \(\mathcal{P}: \mathsf{OracleProver}(\mathsf{pSpec}, \mathsf{oSpec}, \mathsf{StmtIn}, \mathsf{WitIn}, \mathsf{StmtOut}, \mathsf{WitOut}, \mathsf{OStmtIn}, \mathsf{OStmtOut})\)

  • An oracle verifier \(\mathcal{V}: \mathsf{OracleVerifier}(\mathsf{pSpec}, \mathsf{oSpec}, \mathsf{StmtIn}, \mathsf{StmtOut}, \mathsf{OStmtIn}, \mathsf{OStmtOut})\)

where:

  • \(\mathsf{OStmtIn}: \iota _{\mathsf{si}} \to \mathsf{Type}\) are the input oracle statement types with oracle interfaces

  • \(\mathsf{OStmtOut}: \iota _{\mathsf{so}} \to \mathsf{Type}\) are the output oracle statement types

The oracle reduction allows the verifier to access prover messages and oracle statements only through specified oracle interfaces, enabling more flexible and composable protocol designs.

Public-Coin Interactive Proofs

The following is the ordinary interactive-proof specialization of the reduction framework: the verifier returns an acceptance bit rather than a new statement.

Definition 17 Public-coin IP structure [ 16 , Definition 13.1.3 ]
✓
#

For input statement \(\mathbb {x}\) and witness \(\mathbb {w}\), write \(\boldsymbol {\alpha }=(\alpha _{i})_{i\in [\mathsf{k}]}\) and \(\boldsymbol {\rho }=(\rho _{i})_{i\in [\mathsf{k}]}\) for the complete prover- and verifier-message tuples in the alternating schedule with \(\mathsf{k}\) rounds. An ordinary public-coin IP consists of:

  • a round count \(\mathsf{k}\);

  • prover message spaces \(\mathcal M_{\mathbf{P},i}\) and verifier message spaces \(\mathcal M_{\mathbf{V},i}\) for each round;

  • a probabilistic, possibly stateful prover transition that produces the next prover message from the instance, witness, previous prover state, and previous verifier message;

  • a deterministic verifier predicate \(\mathbf{V}(\mathbb {x},\boldsymbol {\alpha },\boldsymbol {\rho })\in \{ 0,1\} \).

The public-coin property is represented by sampling verifier messages uniformly and independently from their round message spaces. The predicate \(\mathbf{V}\) is the final decision procedure, not the source of these messages. The public-coin view below records the message exchange without evaluating that predicate. The prover uses private randomness, and the IP has no additional oracle access. The Lean specialization uses a Boolean verifier with an empty external-oracle interface; an implementation that returns no verifier result is treated as rejecting. The general reduction interfaces remain available internally.

Transcript notation.

A full transcript (Definition 8) records both parties’ messages in protocol order. Let \(I_P\) and \(I_V\) be the prover- and verifier-message positions. Write the transcript as \(T=(\boldsymbol {\alpha },\boldsymbol {\rho })\), where \(\boldsymbol {\alpha }=(\alpha _i)_{i\in I_P}\) and \(\boldsymbol {\rho }=(\rho _i)_{i\in I_V}\) are the prover- and verifier-message tuples; the fixed schedule determines their interleaving. In the paper’s alternating schedule, this is \(((\alpha _1,\rho _1),\ldots ,(\alpha _{\mathsf{k}},\rho _{\mathsf{k}}))\), where \(\mathsf{k}\) is the round count. The instance \(\mathbb {x}\) is separate from \(T\), and recording \(T\) does not require running the verifier’s final decision procedure. This notation applies whether verifier messages are sampled during an interaction or derived from an oracle.

2.1.3 Execution Semantics

We now define what it means to execute an oracle reduction. This is essentially achieved by first executing the prover, interspersed with oracle queries to get the verifier’s challenges (these will be given uniform random probability semantics later on), and then executing the verifier’s checks. Any message exchanged in the protocol will be added to the context. We may also log information about the execution, such as the log of oracle queries for the shared oracles, for analysis purposes (i.e. feeding information into the extractor).

Definition 18 Prover Execution to Round
✓

The execution of a prover up to round \(i : \mathsf{Fin}(n+1)\) is defined inductively:

\begin{equation*} \mathsf{Prover}.\mathsf{runToRound}(i, \mathsf{stmt}, \mathsf{wit}) := \end{equation*}
\begin{equation*} \mathsf{Fin}.\mathsf{induction}( \end{equation*}
\begin{equation*} \quad \mathsf{pure}(\langle \mathsf{default}, \mathsf{prover}.\mathsf{input}(\mathsf{stmt}, \mathsf{wit}) \rangle ), \end{equation*}
\begin{equation*} \quad \mathsf{prover}.\mathsf{processRound}, \end{equation*}
\begin{equation*} \quad i \end{equation*}
\begin{equation*} ) \end{equation*}

where \(\mathsf{processRound}\) handles individual rounds by either:

  • Verifier Challenge (\(\mathsf{pSpec}.\mathsf{dir}(j) = \mathsf{V\_ to\_ P}\)): Query for a challenge and update prover state

  • Prover Message (\(\mathsf{pSpec}.\mathsf{dir}(j) = \mathsf{P\_ to\_ V}\)): Generate message via \(\mathsf{sendMessage}\) and update state

Returns the transcript up to round \(i\) and the prover’s state after round \(i\).

Definition 19 Complete Prover Execution
✓
#

The complete execution of a prover is defined as:

\begin{equation*} \mathsf{Prover}.\mathsf{run}(\mathsf{stmt}, \mathsf{wit}) := \mathsf{do} \; \{ \end{equation*}
\begin{equation*} \quad \langle \mathsf{transcript}, \mathsf{state} \rangle \leftarrow \mathsf{prover}.\mathsf{runToRound}(\mathsf{Fin}.\mathsf{last}(n), \mathsf{stmt}, \mathsf{wit}) \end{equation*}
\begin{equation*} \quad \langle \mathsf{stmtOut}, \mathsf{witOut} \rangle \leftarrow \mathsf{prover}.\mathsf{output}(\mathsf{state}) \end{equation*}
\begin{equation*} \quad \mathsf{return} \; \langle \mathsf{transcript}, \mathsf{stmtOut}, \mathsf{witOut} \rangle \end{equation*}
\begin{equation*} \} \end{equation*}

Returns the complete transcript, the output statement and the output witness, as an oracle computation that may also query the challenge oracle.

Definition 20 Verifier Execution
✓
#

The execution of a verifier is simply the application of its verification function:

\begin{equation*} \mathsf{Verifier}.\mathsf{run}(\mathsf{stmt}, \mathsf{transcript}) := \mathsf{verifier}.\mathsf{verify}(\mathsf{stmt}, \mathsf{transcript}) \end{equation*}

This takes the input statement and full transcript, and returns the output statement, or rejects, via an optional oracle computation.

Definition 21 Oracle Verifier Execution
✓
#

The execution of an oracle verifier is the execution of its converted verifier:

\begin{equation*} \mathsf{OracleVerifier}.\mathsf{run}(\mathsf{stmt}, \mathsf{oStmtIn}, \mathsf{transcript}) := \mathsf{verifier}.\mathsf{toVerifier}.\mathsf{run}(\langle \mathsf{stmt}, \mathsf{oStmtIn} \rangle , \mathsf{transcript}) \end{equation*}

It answers queries to the input oracle statements and prover messages from the actual data, runs the verification logic, and on acceptance returns the pair of the output statement and the materialized output oracle data. Its type is \(\mathsf{OptionT}(\mathsf{OracleComp}(\mathsf{oSpec}), \mathsf{StmtOut}\times (\forall i, \mathsf{OStmtOut}(i)))\).

Definition 22 Interactive Reduction Execution
✓
#

The execution of an interactive reduction consists of running the prover followed by the verifier:

\begin{equation*} \mathsf{Reduction}.\mathsf{run}(\mathsf{stmt}, \mathsf{wit}) := \mathsf{do} \; \{ \end{equation*}
\begin{equation*} \quad \langle \mathsf{transcript}, \mathsf{prvStmtOut}, \mathsf{witOut} \rangle \leftarrow \mathsf{reduction}.\mathsf{prover}.\mathsf{run}(\mathsf{stmt}, \mathsf{wit}) \end{equation*}
\begin{equation*} \quad \mathsf{stmtOut} \leftarrow \mathsf{reduction}.\mathsf{verifier}.\mathsf{run}(\mathsf{stmt}, \mathsf{transcript}) \end{equation*}
\begin{equation*} \quad \mathsf{return} \; (\langle \mathsf{transcript}, \mathsf{prvStmtOut}, \mathsf{witOut} \rangle , \mathsf{stmtOut}) \end{equation*}
\begin{equation*} \} \end{equation*}

Returns the prover’s result (the complete transcript, output statement and output witness) and the verifier’s output statement. The execution is an optional oracle computation: it fails when the verifier rejects.

Definition 23 Oracle Reduction Execution
✓

The execution of an interactive oracle reduction runs the oracle prover on the statement together with the oracle statement data, and then the oracle verifier:

\begin{equation*} \mathsf{OracleReduction}.\mathsf{run}(\mathsf{stmt}, \mathsf{oStmt}, \mathsf{wit}) := \mathsf{do} \; \{ \end{equation*}
\begin{equation*} \quad \langle \mathsf{transcript}, \mathsf{prvStmtOut}, \mathsf{witOut} \rangle \leftarrow \mathsf{reduction}.\mathsf{prover}.\mathsf{run}(\langle \mathsf{stmt}, \mathsf{oStmt} \rangle , \mathsf{wit}) \end{equation*}
\begin{equation*} \quad \mathsf{stmtOut} \leftarrow \mathsf{reduction}.\mathsf{verifier}.\mathsf{run}(\mathsf{stmt}, \mathsf{oStmt}, \mathsf{transcript}) \end{equation*}
\begin{equation*} \quad \mathsf{return} \; (\langle \mathsf{transcript}, \mathsf{prvStmtOut}, \mathsf{witOut} \rangle , \mathsf{stmtOut}) \end{equation*}
\begin{equation*} \} \end{equation*}

Here \(\mathsf{prvStmtOut}\) and \(\mathsf{stmtOut}\) each pair an output statement with output oracle data. The execution fails when the verifier rejects, and it returns no query logs.

The logged variant \(\mathsf{OracleReduction}.\mathsf{runWithLog}\) runs the prover and the verifier under the logging oracle. On acceptance it returns the same two components, followed by the log of the prover’s queries (to the shared oracle and the challenge oracle) and the log of the verifier’s queries to the shared oracle. Extractors read these logs.

2.1.4 Security Properties

We can now define security properties: completeness, various notions of soundness, and zero knowledge.

Each security notion specifies protocol and message spaces, statement and witness spaces, a relation or language, honest algorithms, and any oracle sampling, answering, and programming procedures. In parameterized NARG definitions the public parameters \((\lambda ,n)\) may index the oracle model and algorithms; the entire family is fixed before the adversary is chosen. Error bounds display the varying parameters, such as \((\lambda ,n,t)\). A concrete theorem may fix the model and give a bound depending only on the query or move budget, uniform over all its allowed statements. Such bounds imply their size-restricted specializations.

First, for completeness, this is essentially probabilistic Hoare-style conditions on the execution of the oracle reduction (with the honest prover and verifier). In other words, given a predicate on the initial context, and a predicate on the final context, we require that if the initial predicate holds, then the final predicate holds with high probability (except for some completeness error).

Completeness

Definition 24 Completeness
✓
#

A reduction satisfies completeness with error \(\epsilon \geq 0\) and with respect to input relation \(\mathcal{R}_{\mathrm{in}}\) and output relation \(\mathcal{R}_{\mathrm{out}}\), if for all valid statement-witness pair \((\mathbb {x}_{\text{in}}, \mathbb {w}_{\text{in}})\) for \(\mathcal{R}_{\mathrm{in}}\), the execution between the honest prover and the honest verifier will result in a tuple \(((\mathbb {x}_{\text{out}}^P, \mathbb {w}_{\text{out}}), \mathbb {x}_{\text{out}}^V)\) such that:

  • \(\mathcal{R}_{\mathrm{out}}(\mathbb {x}_{\text{out}}^V, \mathbb {w}_{\text{out}}) = \text{True}\) (the output statement-witness pair is valid), and

  • \(\mathbb {x}_{\text{out}}^P = \mathbb {x}_{\text{out}}^V\) (the output statements are the same from both prover and verifier)

except with probability \(\epsilon \).

Definition 25 Perfect Completeness
✓
#

A reduction satisfies perfect completeness if it satisfies completeness with error \(0\). This means that the probability of the reduction outputting a valid statement-witness pair is exactly 1 (instead of at least \(1 - 0\)).

Almost all oracle reductions we consider actually satisfy perfect completeness, which simplifies the proof obligation. In particular, this means we only need to show that no matter what challenges are chosen, the verifier will always accept given messages from the honest prover.

Extractors

For knowledge soundness, we need to consider different types of extractors that can recover witnesses from malicious provers.

Definition 26 Straightline Extractor
✓
#

A straightline extractor takes in:

  • the initial statement \(\mathbb {x}_{\text{in}}\),

  • the output witness \(\mathbb {w}_{\text{out}}\),

  • the IOR transcript \(T\),

  • the query logs from the prover and verifier

and returns a corresponding initial witness \(\mathbb {w}_{\text{in}}\). It runs once, after the execution, without rewinding the prover. It may query the shared oracle and may fail.

Note that the extractor does not need to take in the output statement, since it can be derived via re-running the verifier on the initial statement, the transcript, and the verifier’s query log.

The type bounds neither the running time nor the computability of the extractor. This form of extractor suffices for proving knowledge soundness of most hash-based IOPs.

Definition 27 Monotone Straightline Extractor
✓

A straightline extractor is monotone if, whenever the prover’s and verifier’s query logs are extended (as sublists), the probability that it returns a valid input witness does not decrease.

Definition 28 Round-by-Round Extractor
✓
#

Given intermediate witness types \(W_0, \ldots , W_n\), a round-by-round extractor extracts the input witness backward from the output witness, one round at a time. It consists of three functions, each also given the input statement \(\mathbb {x}_{\text{in}}\):

  • \(\mathsf{extractOut}\) maps a full transcript and an output witness to an intermediate witness in \(W_n\);

  • \(\mathsf{extractMid}\), for each round \(m {\lt} n\), maps the transcript up to round \(m+1\) and an intermediate witness in \(W_{m+1}\) to one in \(W_m\);

  • \(\mathsf{extractIn}\) maps an intermediate witness in \(W_0\) to an input witness.

The extractor reads no query log.

Definition 29 Rewinding Extractor
✓
#

A rewinding extractor consists of:

  • An extractor state type

  • Simulation oracles for challenges and oracle queries for the prover

  • A function that runs the extractor with the prover’s oracle interface, allowing for calling the prover multiple times

This allows the extractor to rewind the prover to earlier states and try different challenges. Only the interface is defined; no knowledge-soundness notion uses it yet.

Soundness Definitions

For soundness, we need to consider different notions. These notions differ in two main aspects:

  • Whether we consider the plain soundness, or knowledge soundness. The latter relies on the notion of an extractor.

  • Whether we consider plain, state-restoration, round-by-round, or tree-based (special) soundness.

State-restoration knowledge soundness is necessary for the security of the SNARK obtained from an oracle reduction after composing with a commitment scheme and applying the Fiat–Shamir transform. Round-by-round knowledge certificates in the interaction layer imply it (??). Special soundness is the other classical source of knowledge soundness, via a rewinding extractor; its tree-based definitions are given in ??, but the rewinding argument from them to knowledge soundness is not yet formalized.

Definition 30 Soundness
✓
#

A reduction satisfies soundness with error \(\epsilon \geq 0\) and with respect to input language \(\mathcal{L}_{\mathrm{in}}\subseteq \text{Statement}_{\text{in}}\) and output language \(\mathcal{L}_{\mathrm{out}}\subseteq \text{Statement}_{\text{out}}\) if:

  • for all (malicious) provers with arbitrary types for witness types,

  • for all arbitrary input witness,

  • for all input statement \(\mathbb {x}_{\text{in}} \notin \mathcal{L}_{\mathrm{in}}\),

the execution between the prover and the honest verifier will result in an output statement \(\mathbb {x}_{\text{out}} \in \mathcal{L}_{\mathrm{out}}\) with probability at most \(\epsilon \).

Definition 31 Knowledge Soundness
✓

A reduction satisfies (straightline) knowledge soundness with error \(\epsilon \geq 0\) and with respect to input relation \(\mathcal{R}_{\mathrm{in}}\) and output relation \(\mathcal{R}_{\mathrm{out}}\) if:

  • there exists a straightline extractor \(E\), such that

  • for every input statement \(\mathbb {x}_{\text{in}}\), every private-input type and private input of the prover, and every (malicious) prover, all chosen after \(E\),

  • if the execution with the honest verifier results in a pair \((\mathbb {x}_{\text{out}}, \mathbb {w}_{\text{out}})\),

then the probability that \((\mathbb {x}_{\text{out}}, \mathbb {w}_{\text{out}})\) is valid for \(\mathcal{R}_{\mathrm{out}}\) and yet the extractor fails to produce a witness \(\mathbb {w}'_{\text{in}}\) such that \((\mathbb {x}_{\text{in}}, \mathbb {w}'_{\text{in}})\) is valid for \(\mathcal{R}_{\mathrm{in}}\) is at most \(\epsilon \).

Note that the extractor failing outright (it is a partial computation) counts as a win for the adversary: whenever the prover convinces the verifier, the extractor is obliged to succeed and produce a valid witness. (Excluding extractor failure from the bad event would render the definition vacuous, as the always-failing extractor would satisfy it for any verifier.) In contrast, runs in which the protocol execution itself fails (e.g. the verifier aborts) impose no obligation on the extractor, matching the convention for plain soundness.

The same game for one named extractor \(E\) is \(\mathsf{knowledgeSoundnessWith}\); knowledge soundness is its existential closure over \(E\).

Remark 32 Extraction cost
#

The extractor in Definition 31 is unconstrained: it may be noncomputable and may pick a witness by classical choice. With that extractor, knowledge soundness is equivalent to relation soundness, which bounds the probability that the prover outputs a valid output pair from an input statement with no valid input witness (Theorem 33). Knowledge soundness in the cryptographic sense is the game for a named extractor together with a cost bound for that extractor. The measured contract \(\mathsf{knowledgeSoundnessWithResources}\) adds this bound: the extractor’s run is the execution of a named measured program, without querying the shared oracle, and every execution path of the program costs at most a stated budget.

Theorem 33 Unbounded Knowledge Soundness is Relation Soundness
✓

Knowledge soundness with error \(\epsilon \) holds if and only if relation soundness with error \(\epsilon \) holds, for the same relations.

Definition 34 Knowledge Soundness with Measured Extraction
✓
#

For a named straightline extractor \(E\), a measured program \(M\) and a budget \(B\), \(\mathsf{knowledgeSoundnessWithResources}\) holds when \(E\) satisfies the knowledge game of Definition 31 with error \(\epsilon \), the run of \(E\) is the execution of \(M\) on its view without querying the shared oracle, and every execution path of \(M\) costs at most \(B\). The budget counts only the instructions that \(M\) declares.

Round-by-Round Security

To define round-by-round (knowledge) soundness, we need to define the notion of a state function. This is a (possibly inefficient) function \(\mathsf{StateF}\) that, for every challenge sent by the verifier, takes in the transcript of the protocol so far and outputs whether the state is doomed or not. Roughly speaking, the requirement of round-by-round soundness is that, for any (possibly malicious) prover \(P\), if the state function outputs that the state is doomed on some partial transcript of the protocol, then the verifier will reject with high probability.

Definition 35 State Function
✓
#

A (deterministic) state function for a verifier, with respect to input language \(\mathcal{L}_{\mathrm{in}}\) and output language \(\mathcal{L}_{\mathrm{out}}\), consists of a function that maps partial transcripts to boolean values, satisfying:

  • For all input statements not in the language, the state function is false for the empty transcript

  • If the state function is false for a partial transcript, and the next message is from the prover to the verifier, then the state function is also false for the new partial transcript regardless of the message

  • If the state function is false for a full transcript, the verifier will not output a statement in the output language

Definition 36 Knowledge State Function
✓
#

A knowledge state function for a verifier, with respect to input relation \(\mathcal{R}_{\mathrm{in}}\), output relation \(\mathcal{R}_{\mathrm{out}}\), and intermediate witness types, extends the basic state function to track witness validity throughout the protocol execution. This is used to define round-by-round knowledge soundness.

Both round-by-round notions below bound a bad transition at every fixed transcript prefix, with the probability taken over the fresh challenge alone. This fixed-prefix form is the only round-by-round notion in the library. Bounds averaged over prefixes reached with honestly sampled earlier challenges follow from it with the same error, but they do not survive Fiat–Shamir or state restoration, where the adversary chooses the prefix to extend.

Definition 37 Round-by-Round Soundness
✓
#

A protocol with verifier \(\mathcal{V}\) satisfies round-by-round soundness with respect to input language \(\mathcal{L}_{\mathrm{in}}\), output language \(\mathcal{L}_{\mathrm{out}}\), and error function \(\epsilon : \text{ChallengeIdx} \to \mathbb {R}_{\geq 0}\) if:

  • there exists a state function for the verifier and the input/output languages, such that

  • for all initial statements \(\mathbb {x}_{\text{in}} \notin \mathcal{L}_{\mathrm{in}}\),

  • for all challenge rounds \(i\),

  • for all transcript prefixes \(T\) up to round \(i\),

the probability, over the next challenge \(c\) chosen uniformly at random, that:

  • the state function is false at \(T\), and

  • the state function is true at \(T\) extended by \(c\)

is at most \(\epsilon (i)\). This is the formulation of  [ 12 ] and  [ 1 ] .

Definition 38 Round-by-Round Knowledge Soundness
✓

A protocol with verifier \(\mathcal{V}\) satisfies round-by-round knowledge soundness with respect to input relation \(\mathcal{R}_{\mathrm{in}}\), output relation \(\mathcal{R}_{\mathrm{out}}\), and error function \(\epsilon : \text{ChallengeIdx} \to \mathbb {R}_{\geq 0}\) if:

  • there exist a family of intermediate witness types, a round-by-round extractor, and a knowledge state function for the verifier and the input/output relations, such that

  • for all initial statements,

  • for all challenge rounds \(i\),

  • for all transcript prefixes \(T\) up to round \(i\),

the probability, over the next challenge \(c\) chosen uniformly at random, that some intermediate witness \(\mathbb {w}\) satisfies:

  • the knowledge state function is true for \(\mathbb {w}\) at \(T\) extended by \(c\), and

  • it is false at \(T\) for the witness extracted back from \(\mathbb {w}\)

is at most \(\epsilon (i)\). As for round-by-round soundness, the bound holds at every fixed transcript prefix. As in Remark 32, the extractor is unconstrained.

Definition 39 Round-by-Round Knowledge Soundness with a Named Extractor
✓
#

\(\mathsf{rbrKnowledgeSoundnessWith}\) is the condition of Definition 38 for one given family of intermediate witness types, round-by-round extractor and knowledge state function. These objects stay visible in the statement, so downstream composition and extraction theorems can name them. Round-by-round knowledge soundness is its existential closure.

Tree-Based Special Soundness

Special soundness and its relatives extract a witness from a tree of accepting transcripts that share every message before the round where their challenges diverge.

Definition 40 Challenge Tree
✓

A challenge tree for a protocol specification branches only at challenge rounds: a message round has one child, and a challenge round has one child per branch, labelled by the challenge sent on that branch. Every root-to-leaf path reads off one full transcript. A shape fixes the branching arity of each challenge round and a condition on the sibling challenges at each node.

A verifier is tree special sound for a shape \(S\) and relations \(\mathcal{R}_{\mathrm{in}}, \mathcal{R}_{\mathrm{out}}\) if there is a tree-based extractor such that, for every input statement and every challenge tree that satisfies \(S\) and on which the verifier accepts every leaf, the extractor returns a valid input witness from every valid witnessing of the leaves. \((k_i)\)-special soundness is the instance in which the \(k_i\) sibling challenges at each round are pairwise distinct. Coordinate-wise special soundness  [ 21 ] is the instance with arity \(\ell _i(k_i - 1) + 1\) and the coordinate-wise sibling condition.

Theorem 42 Coordinate-Wise Special Soundness Generalizes Special Soundness
✓

For \(k_i \geq 2\), coordinate-wise special soundness with one coordinate per round (\(\ell _i = 1\)) is equivalent to \((k_i)\)-special soundness, for the same relations.

Implications Between Security Notions

Definition 43 Guarded Verifier
✓

A verifier is guarded if there are a Boolean check and a deterministic output map such that, on every statement and full transcript, it returns the output map’s value when the check passes and aborts otherwise. Pure verifiers are the special case with the trivially true check. When the output statement type is nonempty, a verifier is guarded exactly when its verdict makes no query to the shared oracle. A guarded form carries the check and the output map as data.

Round-by-round soundness implies soundness, and round-by-round knowledge soundness implies knowledge soundness, for guarded verifiers. A state function’s terminal condition is checked from a fresh oracle state, while the ordinary games run the verifier from whatever oracle state the prover left behind, so without the guard the implications fail. The library states no implication from knowledge soundness to soundness: the knowledge game fixes the output witness before a randomized verifier runs, so the usual argument does not apply.

Theorem 44 RBR Soundness Implies Soundness
✓

For a verifier with a guarded form, round-by-round soundness with error function \(\epsilon \) implies soundness with error \(\sum _i \epsilon (i)\), where the sum is over all challenge rounds \(i\), for arbitrary shared-oracle state and provers.

Theorem 45 RBR Knowledge Soundness Implies RBR Soundness
✓

Round-by-round knowledge soundness for relations \(\mathcal{R}_{\mathrm{in}}, \mathcal{R}_{\mathrm{out}}\) with error function \(\epsilon \) implies round-by-round soundness for the induced languages (the statements that have some valid witness) with the same error function \(\epsilon \).

Theorem 46 RBR Soundness and RBR Knowledge Soundness Coincide
✓

If the input witness type is nonempty, round-by-round soundness of the induced languages with error function \(\epsilon \) is equivalent to round-by-round knowledge soundness with the same \(\epsilon \). More precisely, this equivalence holds for all relations and all error functions if and only if the input witness type is nonempty, or no input statement, full transcript and output witness exist together. The condition depends neither on the verifier nor on the error. The equivalence uses an unconstrained round-by-round extractor.

Theorem 47 RBR Knowledge Soundness Implies Knowledge Soundness
✓

For a verifier with a guarded form, round-by-round knowledge soundness with error function \(\epsilon \) implies knowledge soundness with error \(\sum _i \epsilon (i)\), where the sum is over all challenge rounds \(i\). The extractor folds the round-by-round extractor backward along the transcript.

Zero-Knowledge

Definition 48 Simulator
✓
#

A simulator consists of:

  • Oracle simulation capabilities for the shared oracles

  • A prover simulation function that takes an input statement and produces a transcript

The simulator should have programming access to the shared oracles and be able to generate transcripts that are indistinguishable from real protocol executions.

Remark 49 Zero-Knowledge Definition
#

Honest-verifier zero-knowledge asks for a simulator whose transcripts, on every valid input, are (statistically) indistinguishable from those of the interaction between the honest prover and the honest verifier. Full zero-knowledge asks the same against every (malicious) verifier. Public-coin honest-verifier zero-knowledge is formalized below (Definition 51); full interactive zero-knowledge is not.

Let \(\mathcal X,\mathcal W\) be statement and witness spaces and \(\mathcal{R}\subseteq \mathcal X\times \mathcal W\) be a relation. Write \(\boldsymbol {\alpha }=(\alpha _{i})_{i\in [\mathsf{k}]}\) and \(\boldsymbol {\rho }=(\rho _{i})_{i\in [\mathsf{k}]}\). Each verifier-message space \(\mathcal M_{\mathbf{V},i}\) is finite and nonempty. Write \(\mathsf{Tr}\) for the space of these complete transcripts and \(\Delta \) to denote statistical distance between distributions.

Definition 50 Honest-verifier view (public-coin case) [ 15 , Definition 7.2 ]   [ 16 , Definition 13.1.6 ]
✓

Let \(\mathrm{IP}=(\mathbf{P},\mathbf{V})\) be an ordinary public-coin IP with \(\mathsf{k}\) rounds. The honest verifier’s view on the instance–witness pair \((\mathbb {x},\mathbb {w})\), denoted \(\mathsf{View}_{\mathrm{IP}}(\mathbf{P},\mathbb {x},\mathbb {w})\), is the random variable

\begin{equation*} (\mathbb {x},\boldsymbol {\rho },\boldsymbol {\alpha }), \end{equation*}

where:

  • \(\boldsymbol {\rho }\) consists of independent uniform verifier messages \(\rho _{i}\in \mathcal M_{\mathbf{V},i}\);

  • \(\boldsymbol {\alpha }\) consists of the prover messages received in the honest interaction between \(\mathbf{P}(\mathbb {x},\mathbb {w})\) and \(\mathbf{V}\), with \(\rho _{i}\) revealed only after the prover message in round \(i\).

The prover is probabilistic and uses private randomness independent of the verifier messages. The verifier has no other randomness.

Definition 51 Honest-verifier zero knowledge (public-coin case) [ 15 , Definition 7.3 ]   [ 16 , Definition 13.1.7 ]
✓

Let \(\mathbf{P}\) be the prover of an ordinary public-coin IP for relation \(\mathcal{R}\), with honest-verifier view \(\mathsf{View}_{\mathrm{IP}}(\mathbf{P},\mathbb {x},\mathbb {w})\) as in Definition 50. Write \(\mathsf{Tr}\) for the space of complete protocol transcripts. The protocol has statistical honest-verifier zero-knowledge error \(z_{\mathrm{IP}}:\mathcal X\to [0,\infty ]\) if there exists a probabilistic simulator \(\mathbf S\), taking only \(\mathbb {x}\in \mathcal X\) as input and returning a view in \(\mathcal X\times \mathsf{Tr}\), such that

\begin{equation*} \forall (\mathbb {x},\mathbb {w})\in \mathcal{R},\qquad \Delta \bigl( \mathsf{View}_{\mathrm{IP}}(\mathbf{P},\mathbb {x},\mathbb {w}),\mathbf S(\mathbb {x}) \bigr)\leq z_{\mathrm{IP}}(\mathbb {x}). \end{equation*}

Fix a size function \(|\cdot |:\mathcal X\to \mathbb N\). For an instance-size bound \(n\), write

\[ z_{\mathrm{IP}}(n) :=\sup \Bigl(\{ 0\} \cup \{ z_{\mathrm{IP}}(\mathbb {x}): \exists \mathbb {w},\ (\mathbb {x},\mathbb {w})\in \mathcal{R}, \ |\mathbb {x}|\le n\} \Bigr), \]

with value \(\infty \) when the set is unbounded. This is the maximum used in the cited definitions when it is attained, with value zero when there are no valid instances. Any upper bound for these errors also suffices in the theorems below. The same simulator then has error at most \(z_{\mathrm{IP}}(n)\) on every valid pair of size at most \(n\). Ordinary IP honest-verifier zero knowledge has no oracle-query parameter. No running-time requirement is imposed on the simulator.

Let \(\mathcal{R}\subseteq \mathcal X\times \mathcal W\) be a relation with instance-size function \(|\cdot |:\mathcal X\to \mathbb N\). Let \(\mathcal{D}(\lambda ,n)\) be the oracle distribution for security parameter \(\lambda \) and instance-size bound \(n\), as in  [ 16 , Section 7.1, Definition 7.1.1 ] (version 1.2). Let \(\mathcal{P}^{\boldsymbol {f}}(\mathbb {x},\mathbb {w})\) be the honest argument prover.

A NARG has adaptive statistical zero-knowledge error \(z_{\mathrm{NARG}}:\mathbb N^3\to [0,\infty ]\) if there exists a probabilistic simulator \(\mathcal S\) such that, for every security parameter \(\lambda \in \mathbb N\), instance-size bound \(n\in \mathbb N\), query budget \(t\in \mathbb N\), and probabilistic \(t\)-query adversary \(\mathcal{A}\) whose output \((\mathbb {x},\mathbb {w},\mathsf{aux})\) always satisfies \((\mathbb {x},\mathbb {w})\in \mathcal{R}\) and \(|\mathbb {x}|\le n\), the following two distributions are \(z_{\mathrm{NARG}}(\lambda ,n,t)\)-close in statistical distance:

\begin{equation*} \begin{aligned} \mathcal{D}_{\mathrm{real}}(\mathcal{A})& := \left\{ \mathsf{out}\; \middle |\; \begin{array}{l} \boldsymbol {f}\leftarrow \mathcal{D}(\lambda ,n);\\ (\mathbb {x},\mathbb {w},\mathsf{aux})\leftarrow \mathcal{A}^{\boldsymbol {f}};\\ \pi \leftarrow \mathcal{P}^{\boldsymbol {f}}(\mathbb {x},\mathbb {w});\\ \mathsf{out}\leftarrow \mathcal{A}^{\boldsymbol {f}}(\mathsf{aux},\pi ) \end{array}\right\} ,\\[6pt] \mathcal{D}_{\mathrm{sim}}(\mathcal S,\mathcal{A})& := \left\{ \mathsf{out}\; \middle |\; \begin{array}{l} \boldsymbol {f}\leftarrow \mathcal{D}(\lambda ,n);\\ (\mathbb {x},\mathbb {w},\mathsf{aux})\leftarrow \mathcal{A}^{\boldsymbol {f}};\\ (\pi ,\mu )\leftarrow \mathcal S^{\boldsymbol {f}}(\mathbb {x});\\ \mathsf{out}\leftarrow \mathcal{A}^{\boldsymbol {f}[\mu ]}(\mathsf{aux},\pi ) \end{array}\right\} . \end{aligned}\end{equation*}

Besides the public parameters \((\lambda ,n)\), the simulator receives only \(\mathbb {x}\) and query access to the original \(\boldsymbol {f}\). It returns a NARG string \(\pi \) and programming data \(\mu \). The notation \(\boldsymbol {f}[\mu ]\) denotes the public oracles obtained by applying the model’s specified programming operation. The query budget counts the adversary’s public queries across both stages, for every supplied NARG string and every sequence of oracle replies and private choices, including a separate bound on the first stage (Definition 63). One simulator family, depending on \((\lambda ,n)\), works for all budgets and adversaries. No running-time requirement is imposed.

Remark 53 Limitations
✓
#

The Lean predicates impose no computational bound on the simulator. In cases this is undesirable, for instance: if each valid instance has a unique witness, a simulator can select that witness and run the honest prover. The same holds for adaptive NARG zero knowledge.

Oracle-Specific Security

For oracle reductions, the security definitions are analogous to those for standard reductions, but adapted to work with oracle interfaces:

Definition 54 Oracle Reduction Completeness
✓

Completeness of an oracle reduction is the same as for non-oracle reductions, but applied to the converted reduction where oracle statements are handled through their interfaces.

Definition 55 Oracle Verifier Soundness
✓

Soundness of an oracle verifier is defined by converting it to a standard verifier and applying the standard soundness definition.

Definition 56 Oracle Verifier Knowledge Soundness
✓

Knowledge soundness of an oracle verifier is defined by converting it to a standard verifier and applying the standard knowledge soundness definition.

Definition 57 Oracle Verifier RBR Soundness
✓

Round-by-round soundness of an oracle verifier is defined by converting it to a standard verifier and applying the standard round-by-round soundness definition.

Definition 58 Oracle Verifier RBR Knowledge Soundness
✓

Round-by-round knowledge soundness of an oracle verifier is defined by converting it to a standard verifier and applying the standard round-by-round knowledge soundness definition.

State-Restoration Security

State-restoration security is developed in the interaction layer (ArkLib/Interaction), which is meant to replace the legacy oracle-reduction layer used in the rest of this chapter. It covers a fixed-round public-coin oracle protocol: \(k\) rounds, in each of which the prover sends an oracle message from a finite type and the verifier replies with a uniform challenge from a finite nonempty type. In the state-restoration setting the adversary may query challenges for any transcript prefix it likes, in any order and repeatedly, before it commits to one transcript.

A restoration key for round \(j\) consists of an input, the prover messages of rounds \(1, \ldots , j\), and a salt for each of those rounds. Earlier verifier challenges are not part of the key. The challenge oracle answers each key with a challenge of that round, and is implemented as a lazily sampled random oracle starting from an empty cache.

A state-restoration adversary is an oracle computation against this challenge oracle that makes at most \(Q\) queries in total and returns an input \(z\), a prover message and salt for every round, and an output witness \(\mathbb {w}\). The experiment then completes the selected transcript by querying the same oracle once per round (so at most \(Q + k\) queries are made in all), and runs the verifier on the completed path. In the closed-oracle variant, the verifier returns either a rejection or an oracle claim, whose behavior is observed through the accumulated oracle handler of the same path.

Definition 60 Round-by-Round Knowledge Certificate in the Interaction Layer
✓

For an input \(z\), an interaction-layer round-by-round extractor assigns to each node of the protocol tree a knowledge state (a witness type with a validity predicate) and a named map that transports a later witness one step backward. It is prover preserving if prover messages cannot make an invalid witness valid under these maps. It is locally bounded with error \(\epsilon _j\) at round \(j\) if, at every authored transcript prefix before a challenge of round \(j\), including prefixes of probability zero in an honest run, the probability over the fresh uniform challenge that some later witness is valid while its backward image is invalid is at most \(\epsilon _j\). A knowledge certificate bundles such an extractor with these two properties; a measured certificate adds a budgeted program for each extraction stage.

Fix a set \(Z\) of permitted inputs and an error \(\epsilon \). Suppose that, for every \(z \in Z\), the interaction-layer round-by-round extractor for \(z\) is prover preserving and locally bounded with error \(\epsilon \) at every round. Suppose also that its input knowledge state is the input relation \(\mathcal{R}_{\mathrm{in}}(z, \cdot )\), and that its terminal knowledge state on every completed path is the output relation \(\mathcal{R}_{\mathrm{out}}\) of the verifier’s output on that path, after a named equivalence between the adversary’s witness type and the terminal witness type.

Then for every state-restoration adversary making at most \(Q\) queries, the probability that the selected input \(z\) lies in \(Z\), the output witness \(\mathbb {w}\) is valid for the verifier’s actual output, and the input witness extracted backward from \(\mathbb {w}\) along the completed path is invalid for \(\mathcal{R}_{\mathrm{in}}(z, \cdot )\), is at most

\begin{equation*} (Q + k) \cdot \epsilon . \end{equation*}

The extractor is the named backward map, not an existentially chosen witness. The same bound holds for the closed-oracle variant, where a rejection is never a valid output, and, with private coins of the adversary sampled before the game, for both variants.

Proof ▶

If extraction fails on a valid terminal witness, the completed path contains a challenge at which the knowledge state switches from invalid to valid. Its key was queried by the adversary or by completion. The key’s knowledge state depends only on strictly earlier keys, so resampling its answer leaves that state unchanged, and the local bound gives probability at most \(\epsilon \) for each of the at most \(Q + k\) queries.

Under the hypotheses of Theorem 61 for the closed-oracle variant, but with local error \(\epsilon _j\) at round \(j\), the bound becomes

\begin{equation*} Q \cdot \max _j \epsilon _j + \sum _{j} \epsilon _j . \end{equation*}

For a measured knowledge certificate whose challenge schedule has these errors and whose stage budgets are at most \(B\) on every input in \(Z\), the same bound holds together with the stage budget \(B\) for the same named extractor.

Proof ▶

Charge each queried key the error of its round. The adversary’s at most \(Q\) queries cost at most \(Q \cdot \max _j \epsilon _j\), and completion queries one key per round, costing \(\sum _j \epsilon _j\).

The interaction layer states state-restoration security only in this knowledge form. The bound concerns the interaction-layer verifier; its transfer to the Fiat–Shamir transform is discussed in Section 2.3.5. docs/design/00-current-status.md records the status of the interaction layer.

Query bounds

Definition 63 Counted prover queries
✓

An argument prover is \(t\)-query if it makes at most \(t\) calls to the oracles designated by the experiment in every execution, for every sequence of oracle replies and private choices; repeated queries count again. Private coins do not contribute to the count.

Adaptive NARG soundness and knowledge soundness

A non-interactive argument (NARG) consists of an argument prover and an argument verifier \(\mathcal{V}\), which accepts or rejects. Let \(\mathcal{R}\subseteq \mathcal X\times \mathcal W\) be the relation being proved, with language \(L(\mathcal{R}):=\{ \mathbb {x}:\exists \mathbb {w},\ (\mathbb {x},\mathbb {w})\in \mathcal{R}\} \). An adaptive malicious argument prover \(\tilde{\mathcal{P}}\) is a probabilistic algorithm that chooses both the statement \(\mathbb {x}\) and its NARG string \(\pi \).

As in  [ 16 , Section 7.1, Definition 7.1.1 ] (version 1.2), let \(\lambda \in \mathbb N\) be a security parameter and \(n\in \mathbb N\) an instance-size bound, for a specified size function \(|\cdot |:\mathcal X\to \mathbb N\). An oracle distribution \(\mathcal{D}(\lambda ,n)\) samples the public oracles for these parameters. The query and answer types, oracle interpretation, NARG-string space, and algorithms may also depend on \((\lambda ,n)\). Both parameters are public inputs to every algorithm, including the extractor; we suppress these inputs in the displays. The entire family is fixed before the query budget and adversary are chosen. In Lean there is no separate definition for the family: a theorem quantifies over \(\lambda \), \(n\), and the query budget itself, and the size condition \(|\mathbb {x}|\le n\) is part of the failure event.

Write \(\boldsymbol {f}\) for the public oracles specified by the NARG’s model. For DSFS these are the sampled hash function, permutation and inverse \((h,p,p^{-1})\leftarrow \mathcal{D}_{\mathfrak S}\); for basic Fiat–Shamir they are the independent round functions \((f_i)_i\). These are the only public oracles in the experiment. An assignment \(z\leftarrow A^{\boldsymbol {f}}\) means run \(A\) with query access to these oracles. The prover and verifier use the same initialized public-oracle state, continuing that state between their executions when the specified model is stateful. The prover is a probabilistic algorithm with private randomness; the verifier uses only the public oracles. We write \(b=1\) for acceptance; rejection or an absent returned bit does not satisfy this event. The symbol \(\bot \) denotes a missing output or witness; by convention, \((\mathbb {x},\bot )\notin \mathcal{R}\) for every statement \(\mathbb {x}\) and witness relation \(\mathcal{R}\). In the probability displays below, the left column states the event and the right column specifies the experiment; the separator does not denote conditioning. Probabilities include the oracle initialization and the algorithms’ private randomness.

Let \(\mathcal{V}\) be a NARG verifier for relation \(\mathcal{R}\), with oracle distribution \(\mathcal{D}\). The NARG has adaptive soundness error \(\varepsilon _{\mathrm{NARG}}:\mathbb N^3\to [0,\infty ]\) if, for every security parameter \(\lambda \in \mathbb N\), instance-size bound \(n\in \mathbb N\), query budget \(t\in \mathbb N\), and \(t\)-query malicious argument prover \(\tilde{\mathcal{P}}\) (Definition 63),

\begin{equation*} \Pr \left[\begin{array}{l|rl} |\mathbb {x}|\le n& 1. & \boldsymbol {f}\leftarrow \mathcal{D}(\lambda ,n);\\ {}\land \mathbb {x}\notin L(\mathcal{R}) & 2. & (\mathbb {x},\pi )\leftarrow \tilde{\mathcal{P}}^{\boldsymbol {f}};\\ {}\land b=1 & 3. & b\leftarrow \mathcal{V}^{\boldsymbol {f}}(\mathbb {x},\pi ) \end{array}\right]\le \varepsilon _{\mathrm{NARG}}(\lambda ,n,t). \end{equation*}

In Lean, this definition is stated on the experiment above for a verifier given as a plain function, which depends on no protocol layer. For a one-message interactive verifier, a theorem proves the definition equal to adaptive soundness of the one-message protocol.

Let \(\mathcal{V}\) be a NARG verifier for relation \(\mathcal{R}\), with oracle distribution \(\mathcal{D}(\lambda ,n)\) and the public parameter convention above.

A probabilistic straightline knowledge extractor \(\mathcal E\) receives a statement \(\mathbb {x}\), a NARG string \(\pi \), and the prover and verifier public query–answer logs \(\mathsf{tr}_{\tilde{\mathcal{P}}},\mathsf{tr}_{\mathcal{V}}\), and returns a candidate witness \(\mathbb {w}\) for \(\mathbb {x}\) or \(\bot \). The extractor runs after the verifier, in the public-oracle state the verifier leaves. Besides these inputs, it may query the public oracles and use its own private randomness; it cannot invoke or rewind the malicious prover.

The verifier has adaptive knowledge-soundness error \(\kappa _{\mathrm{NARG}}:\mathbb N^3\to [0,\infty ]\) if there exists such an extractor \(\mathcal E\) such that, for every security parameter \(\lambda \in \mathbb N\), instance-size bound \(n\in \mathbb N\), query budget \(t\in \mathbb N\), and \(t\)-query malicious argument prover \(\tilde{\mathcal{P}}\) (Definition 63),

\begin{equation*} \Pr \left[\begin{array}{l|rl} |\mathbb {x}|\le n& 1. & \boldsymbol {f}\leftarrow \mathcal{D}(\lambda ,n);\\ {}\land b=1 & 2. & (\mathbb {x},\pi )\xleftarrow {\mathsf{tr}_{\tilde{\mathcal{P}}}}\tilde{\mathcal{P}}^{\boldsymbol {f}};\\ {}\land (\mathbb {x},\mathbb {w})\notin \mathcal{R}& 3. & b\xleftarrow {\mathsf{tr}_{\mathcal{V}}}\mathcal{V}^{\boldsymbol {f}}(\mathbb {x},\pi );\\ & 4. & \mathbb {w}\leftarrow \mathcal E^{\boldsymbol {f}} (\mathbb {x},\pi ,\mathsf{tr}_{\tilde{\mathcal{P}}},\mathsf{tr}_{\mathcal{V}}) \end{array}\right]\le \kappa _{\mathrm{NARG}}(\lambda ,n,t). \end{equation*}

The annotated arrows record public query–answer logs. No running-time requirement is imposed, so this is a distributional notion: a theorem that claims the full notion of [ 15 ] or [ 16 ] also needs a running-time bound for the same named extractor. The extractor interface follows [ 16 , Definition 7.1.5 ] , with one addition. [ 15 , Definition 3.6 ] gives the extractor only \((\mathbb {x},\pi ,\mathsf{tr}_{\tilde{\mathcal{P}}})\), without the verifier log, so an extractor for that definition is also one for this definition, but not conversely. Neither source lets the extractor query the public oracles. [ 15 , Definition 3.6 ] says “deterministic”; we allow private randomness, which the paper’s own extractor needs (its LookAhead step samples). In Lean, this definition is stated on the experiment above for a verifier given as a plain function. For a one-message interactive verifier, a theorem proves the definition equal to adaptive knowledge soundness of the one-message protocol.

State-restoration security

State-restoration (SR) security allows a prover to explore several continuations of an interactive execution. We consider an ordinary public-coin IP: the prover is probabilistic, every verifier message is sampled independently and uniformly, and the final verifier decision is deterministic given the statement and full transcript. The single-salt game below includes a salt from \(\mathsf{Salt}\) separately in every query, while the original IP statement and verifier remain unchanged. The challenge functions below implement the restoration game. They are not an additional oracle available to the underlying IP. The family of verifier message function distributions \(\mathcal{D}_{\mathrm{sr}}(s,n)\), indexed by salt-size parameter \(s\) and instance-size bound \(n\), is fixed for each SR security notion. The basic FS and DSFS reductions sample these functions independently and uniformly. In the probability displays below, the left column states the event and the right column specifies the experiment; the separator does not denote conditioning. The salt parameter indexes the specified carrier: for bit strings one takes \(\mathsf{Salt}(s,n)=\{ 0,1\} ^{s}\). In the DSFS specialization, \(s=\delta \) measures alphabet symbols and the encoding embeds \(\Sigma ^{\delta }\) into the chosen salt carrier; an injective bit-string encoding requires at least \(\lceil \delta \log _2|\Sigma |\rceil \) bits.

Definition 66 State-restoration prover [ 16 , Definition 13.2.1 ]
✓
#

Let \(\mathrm{IP}\) be a public-coin IP with \(\mathsf{k}\) rounds, each consisting of a prover message followed by a verifier message. Let \(\mathsf{Salt}\) be the salt space, and let \(\boldsymbol {f}=(f_{i})_{i\in [\mathsf{k}]}\) be the functions used to obtain verifier messages. An IP state-restoration prover \(\widetilde{\mathbf P}^{\mathrm{sr}}\) is a probabilistic algorithm that makes moves as follows:

  1. The prover outputs \((i,\mathbb {x},\tau ,(\alpha _1,\ldots ,\alpha _{i}))\), where \(\mathbb {x}\) is a statement, \(\tau \in \mathsf{Salt}\) is a chosen salt, and \((\alpha _1,\ldots ,\alpha _{i})\) are prover messages.

  2. The game sets \(\rho _{i}:=f_{i}(\mathbb {x},\tau ,\alpha _1,\ldots ,\alpha _{i})\).

  3. The game sends \(\rho _{i}\) to the prover.

The prover repeats these steps until it decides to stop, then outputs \((\mathbb {x},\tau ,(\alpha _1,\ldots ,\alpha _{\mathsf{k}}))\). We say that the prover is \(t\)-move if it stops after at most \(t\) moves (Definition 63). The same prover interface is used for soundness and knowledge soundness. The implementation supports arbitrary protocol schedules; the displays use alternating rounds for readability.

Definition 67 IP state-restoration game [ 15 , Definition 3.12 ]   [ 16 , Definition 13.2.1 ]
✓
#

Fix \(\mathrm{IP}\) with \(\mathsf{k}\) rounds as in Definition 66. The IP state-restoration game takes as input a salt-size parameter \(s\in \mathbb N\) with associated salt space \(\mathsf{Salt}\), verifier-message functions \(\boldsymbol {f}=(f_{i})_{i\in [\mathsf{k}]}\) and an SR prover \(\widetilde{\mathbf P}^{\mathrm{sr}}\), and returns a statement \(\mathbb {x}\), a chosen salt \(\tau \in \mathsf{Salt}\), prover messages \(\boldsymbol {\alpha }=(\alpha _1,\ldots ,\alpha _{\mathsf{k}})\), and verifier messages \(\boldsymbol {\rho }=(\rho _1,\ldots ,\rho _{\mathsf{k}})\):

\[ \begin{gathered} \mathsf{Game}^{\mathrm{sr}}_{\mathrm{IP}}(s,\boldsymbol {f},\widetilde{\mathbf P}^{\mathrm{sr}}):\\ \left[\begin{array}{rl} 1. & \text{Repeat until }\widetilde{\mathbf P}^{\mathrm{sr}}\text{ ends its moves:}\\ (a) & \quad \text{receive }(i,\mathbb {x}’,\tau ’,(\alpha ’_j)_{j\in [i]}) \text{ from }\widetilde{\mathbf P}^{\mathrm{sr}};\\ (b) & \quad \rho ’:=f_{i}(\mathbb {x}’,\tau ’,\alpha ’_1,\ldots ,\alpha ’_{i});\\ (c) & \quad \text{send }\rho ’\text{ to }\widetilde{\mathbf P}^{\mathrm{sr}}.\\ 2. & \text{Receive the final output }(\mathbb {x},\tau ,\boldsymbol {\alpha }) \text{ from }\widetilde{\mathbf P}^{\mathrm{sr}}.\\ 3. & \text{For }i=1,\ldots ,\mathsf{k}: \quad \rho _{i}:=f_{i}(\mathbb {x},\tau ,\alpha _1,\ldots ,\alpha _{i}).\\ 4. & \text{Return }(\mathbb {x},\tau ,\boldsymbol {\alpha },\boldsymbol {\rho }). \end{array}\right] \end{gathered} \]

The vectors \(\boldsymbol {\alpha }\) and \(\boldsymbol {\rho }\) specify the full transcript \((\alpha _1,\rho _1,\ldots ,\alpha _{\mathsf{k}},\rho _{\mathsf{k}})\). The move–response trace \(\mathsf{tr}^{\mathrm{sr}}\) is the ordered list of pairs \(\bigl((i,\mathbb {x}',\tau ',\alpha '_1,\ldots ,\alpha '_{i}),\rho '\bigr)\) from Step 1. A \(t\)-move prover performs at most \(t\) iterations of Step 1, under the counting convention of Definition 63.

Definition 68 State-restoration soundness [ 15 , Definition 3.13 ]   [ 16 , Definition 13.2.2 ]
✓
#

Fix a family of salt spaces \(\mathsf{Salt}(s,n)\), public-coin IP verifiers \(\mathbf{V}\), and verifier message function distributions \(\mathcal{D}_{\mathrm{sr}}(s,n)\), with a common relation \(\mathcal{R}\subseteq \mathcal X\times \mathcal W\) and size function \(|\cdot |\). These public parameters may determine the protocol and message spaces and are supplied to all algorithms; we suppress them in algorithm calls. The verifier has state-restoration soundness error \(\varepsilon _{\mathrm{IP}}^{\mathrm{sr}}:\mathbb N^3\to [0,\infty ]\) if, for every salt-size parameter \(s\in \mathbb N\), instance-size bound \(n\in \mathbb N\), move budget \(t\in \mathbb N\) and every \(t\)-move malicious SR prover \(\widetilde{\mathbf P}^{\mathrm{sr}}\),

\begin{equation*} \Pr \left[\begin{array}{l|rl} |\mathbb {x}|\le n\ \land \ \mathbb {x}\notin L(\mathcal{R}) & 1. & \boldsymbol {f}\leftarrow \mathcal{D}_{\mathrm{sr}}(s,n);\\ {}\land b=1 & 2. & (\mathbb {x},\tau ,\boldsymbol {\alpha },\boldsymbol {\rho })\leftarrow \mathsf{Game}^{\mathrm{sr}}_{\mathrm{IP}}(s,\boldsymbol {f},\widetilde{\mathbf P}^{\mathrm{sr}});\\ & 3. & b\leftarrow \mathbf{V}(\mathbb {x},\boldsymbol {\alpha },\boldsymbol {\rho }) \end{array}\right]\le \varepsilon _{\mathrm{IP}}^{\mathrm{sr}}(s,n,t). \end{equation*}

The size test restricts the failure event; it neither conditions the sampling nor changes the game.

Definition 69 State-restoration knowledge soundness [ 16 , Definition 13.2.3 ] , adapted from [ 15 , Definition 3.14 ]
✓

Fix a family of salt spaces \(\mathsf{Salt}(s,n)\), public-coin IP verifiers \(\mathbf{V}\), and verifier message function distributions \(\mathcal{D}_{\mathrm{sr}}(s,n)\), with a common relation \(\mathcal{R}\subseteq \mathcal X\times \mathcal W\) and size function \(|\cdot |\). These public parameters may determine the protocol and message spaces and are supplied to all algorithms; we suppress them in algorithm calls. The verifier has state-restoration knowledge-soundness error \(\kappa _{\mathrm{IP}}^{\mathrm{sr}}:\mathbb N^3\to [0,\infty ]\) if there exists a probabilistic straightline knowledge extractor \(\mathbf E^{\mathrm{sr}}\) such that, for every salt-size parameter \(s\in \mathbb N\), instance-size bound \(n\in \mathbb N\), move budget \(t\in \mathbb N\) and every \(t\)-move malicious SR prover \(\widetilde{\mathbf P}^{\mathrm{sr}}\),

\begin{equation*} \Pr \left[\begin{array}{l|rl} |\mathbb {x}|\le n\ \land \ b=1 & 1. & \boldsymbol {f}\leftarrow \mathcal{D}_{\mathrm{sr}}(s,n);\\ {}\land (\mathbb {x},\mathbb {w})\notin \mathcal{R}& 2. & (\mathbb {x},\tau ,\boldsymbol {\alpha },\boldsymbol {\rho })\xleftarrow {\mathsf{tr}^{\mathrm{sr}}} \mathsf{Game}^{\mathrm{sr}}_{\mathrm{IP}}(s,\boldsymbol {f},\widetilde{\mathbf P}^{\mathrm{sr}});\\ & 3. & b\leftarrow \mathbf{V}(\mathbb {x},\boldsymbol {\alpha },\boldsymbol {\rho });\\ & 4. & \mathbb {w}\leftarrow \mathbf E^{\mathrm{sr}}(\mathbb {x},\tau ,\boldsymbol {\alpha },\boldsymbol {\rho },\mathsf{tr}^{\mathrm{sr}}) \end{array}\right]\le \kappa _{\mathrm{IP}}^{\mathrm{sr}}(s,n,t). \end{equation*}

The extractor receives the original statement \(\mathbb {x}\), the chosen salt \(\tau \) separately, all prover messages \(\boldsymbol {\alpha }\), all verifier messages \(\boldsymbol {\rho }\), and the prover’s move–response trace \(\mathsf{tr}^{\mathrm{sr}}\) from Definition 67. It returns a witness for \(\mathbb {x}\) or \(\bot \), and may use fresh private randomness; by convention, \((\mathbb {x},\bot )\notin \mathcal{R}\).

One extractor family is chosen before all \(s,n,t\) and adversaries. It may use the public salt-size and instance-size parameters, but not the move budget. The size restriction applies to the entire failure event, including missing witnesses. This is the information-theoretic straightline definition with the book’s full-transcript extractor interface; no polynomial-time requirement is imposed, so a theorem that claims the full paper notion also needs a running-time bound for the same named extractor. [ 15 , Definition 3.14 ] withholds the verifier messages \(\boldsymbol {\rho }\) from the straightline extractor, so an extractor for that definition, which ignores them, is also one for this definition, but not conversely. The single-salt game specializes the paper’s vector of per-round salts to a salt supplied from the first round, with no fresh later salts.

2.2 Composition of Oracle Reductions

In this section, we describe a suite of composition operators for building secure oracle reductions from simpler secure components. In other words, we define a number of definitions that govern how oracle reductions can be composed to form larger reductions, and how the resulting reduction inherits the security properties of the components.

2.2.1 Sequential Composition

Sequential composition allows us to chain together oracle reductions where the output context of one reduction becomes the input context of the next reduction. This is fundamental for building complex protocols from simpler components.

Composition of Protocol Specifications

We begin by defining how to compose protocol specifications and their associated structures.

Definition 70 Protocol Specification Append
✓
#

Given two protocol specifications \(\mathsf{pSpec}_1 : \mathsf{ProtocolSpec}\ m\) and \(\mathsf{pSpec}_2 : \mathsf{ProtocolSpec}\ n\), their sequential composition is:

\begin{equation*} \mathsf{pSpec}_1 \mathrel {++_\mathsf {p}} \mathsf{pSpec}_2 : \mathsf{ProtocolSpec}\ (m + n) \end{equation*}
Definition 71 Full Transcript Append
✓
#

Given full transcripts \(T_1 : \mathsf{FullTranscript}\ \mathsf{pSpec}_1\) and \(T_2 : \mathsf{FullTranscript}\ \mathsf{pSpec}_2\), their sequential composition is:

\begin{equation*} T_1 \mathrel {++_\mathsf {t}} T_2 : \mathsf{FullTranscript}\ (\mathsf{pSpec}_1 \mathrel {++_\mathsf {p}} \mathsf{pSpec}_2) \end{equation*}

Composition of Provers and Verifiers

Definition 72 Prover Append
✓
#

Given provers \(P_1 : \mathsf{Prover}\ \mathsf{pSpec}_1\ \mathsf{oSpec}\ \mathsf{StmtIn}_1\ \mathsf{WitIn}_1\ \mathsf{StmtOut}_1\ \mathsf{WitOut}_1\) and \(P_2 : \mathsf{Prover}\ \mathsf{pSpec}_2\ \mathsf{oSpec}\ \mathsf{StmtOut}_1\ \mathsf{WitOut}_1\ \mathsf{StmtOut}_2\ \mathsf{WitOut}_2\), their sequential composition is:

\begin{equation*} P_1.\mathsf{append}\ P_2 : \mathsf{Prover}\ (\mathsf{pSpec}_1 \mathrel {++_\mathsf {p}} \mathsf{pSpec}_2)\ \mathsf{oSpec}\ \mathsf{StmtIn}_1\ \mathsf{WitIn}_1\ \mathsf{StmtOut}_2\ \mathsf{WitOut}_2 \end{equation*}

The composed prover works by:

  • Running \(P_1\) on the input context to produce an intermediate context

  • Using this intermediate context as input to \(P_2\)

  • Outputting the final context from \(P_2\)

Equality with two separate prover runs requires an execution condition such as the one in Theorem 80; output queries can otherwise cross an opening challenge.

Definition 73 Verifier Append
✓
#

Given verifiers \(V_1 : \mathsf{Verifier}\ \mathsf{pSpec}_1\ \mathsf{oSpec}\ \mathsf{StmtIn}_1\ \mathsf{StmtOut}_1\) and \(V_2 : \mathsf{Verifier}\ \mathsf{pSpec}_2\ \mathsf{oSpec}\ \mathsf{StmtOut}_1\ \mathsf{StmtOut}_2\), their sequential composition is:

\begin{equation*} V_1.\mathsf{append}\ V_2 : \mathsf{Verifier}\ (\mathsf{pSpec}_1 \mathrel {++_\mathsf {p}} \mathsf{pSpec}_2)\ \mathsf{oSpec}\ \mathsf{StmtIn}_1\ \mathsf{StmtOut}_2 \end{equation*}

The composed verifier first runs \(V_1\) on the first part of the transcript, then runs \(V_2\) on the second part using the intermediate statement from \(V_1\).

Definition 74 Reduction Append
✓
#

Sequential composition of reductions combines the corresponding provers and verifiers:

\begin{equation*} R_1.\mathsf{append}\ R_2 : \mathsf{Reduction}\ (\mathsf{pSpec}_1 \mathrel {++_\mathsf {p}} \mathsf{pSpec}_2)\ \mathsf{oSpec}\ \mathsf{StmtIn}_1\ \mathsf{WitIn}_1\ \mathsf{StmtOut}_2\ \mathsf{WitOut}_2 \end{equation*}
Definition 75 Oracle Reduction Append
✓

Sequential composition extends naturally to oracle reductions by composing the oracle provers and oracle verifiers.

General Sequential Composition

For composing an arbitrary number of reductions, we provide a general composition operation.

Definition 76 General Protocol Specification Composition
✓
#

Given a family of protocol specifications \(\mathsf{pSpec}: \forall i : \mathsf{Fin}(m+1), \mathsf{ProtocolSpec}\ (n\ i)\), their composition is:

\begin{equation*} \mathsf{compose}\ m\ n\ \mathsf{pSpec}: \mathsf{ProtocolSpec}\ (\sum _{i} n\ i) \end{equation*}
Definition 77 General Prover Composition
✓
#
Definition 78 General Verifier Composition
✓
#
Definition 79 General Reduction Composition
✓

Security Properties of Sequential Composition

Completeness composition requires control of the prover execution order and of the shared oracle state. Fix one stateful oracle implementation on a state space \(\Sigma \) and an initial state distribution \(\mu \). The second component receives the state left by the first component. A guarantee for the second component initialized separately from \(\mu \) does not cover this state.

The composition theorems below are proved under their stated hypotheses. Soundness and knowledge soundness require guarded verifiers (Definition 43): the first verifier for binary composition, and every verifier for finite chains. Bounds for later components must hold from every deterministic shared oracle state, and knowledge soundness composes extractors that are pure functions of the input statement, the output witness and the transcript.

Theorem 80 Completeness Preservation under Append
✓

Let \(R_1\) and \(R_2\) have compatible input, intermediate, and output relations. Assume both verifiers are pure and total: each returns a deterministic function of its input statement and transcript, without oracle queries or rejection. Assume also that at least one of the following execution conditions holds:

  • the first prover’s output is a pure function of its final internal state;

  • the second protocol is empty;

  • the second protocol starts with a prover message.

Suppose \(R_1\) is complete with error \(\epsilon _1\) from \(\mu \), and for every \(s \in \Sigma \), \(R_2\) is complete with error \(\epsilon _2\) when initialized deterministically at \(s\). Then \(R_1.\mathsf{append}\ R_2\) is complete from \(\mu \) with error \(\epsilon _1 + \epsilon _2\).

Theorem 81 Perfect Completeness Preservation under Append
✓

Under the pure-verifier and execution hypotheses of Theorem 80, suppose \(R_1\) is perfectly complete from \(\mu \) and \(R_2\) is perfectly complete from every deterministic shared state. Then \(R_1.\mathsf{append}\ R_2\) is perfectly complete from \(\mu \).

Theorem 82 Soundness Preservation under Append
✓

Suppose \(V_1\) is guarded and sound with error \(\epsilon _1\) from the initial distribution \(\mu \), and \(V_2\) is sound with error \(\epsilon _2\) from every deterministic shared state. Then \(V_1.\mathsf{append}\ V_2\) is sound from \(\mu \) with error \(\epsilon _1 + \epsilon _2\). The second verifier needs no guard. Some restriction is necessary: a later verifier that queries the shared oracle can be steered by the prover’s queries in an earlier stage. The every-state hypothesis is needed because the intermediate statement is chosen after oracle answers; it holds for lazily sampled oracles and fails for states that hide a secret from the prover.

Theorem 83 Knowledge Soundness Preservation under Append
✓

Suppose \(V_1\) is guarded. Suppose there are fixed pure extractors \(e_1\) and \(e_2\), each a function of the input statement, the transcript and the output witness, such that \(e_1\) satisfies the knowledge game of \(V_1\) with error \(\epsilon _1\) from \(\mu \), and this same \(e_2\) satisfies the knowledge game of \(V_2\) with error \(\epsilon _2\) from every deterministic shared state. Then \(V_1.\mathsf{append}\ V_2\) is knowledge sound from \(\mu \) with error \(\epsilon _1 + \epsilon _2\), with the extractor that runs the second extractor and then the first.

Round-by-round guarantees and a guarded first verifier give the following composition theorem.

Theorem 84 Round-by-Round Knowledge Soundness under a Guarded First Verifier
✓

Suppose \(V_1\) is guarded: it returns a deterministic verdict when its check passes and aborts otherwise. Suppose \(V_1\) and \(V_2\) are round-by-round knowledge sound for every fixed transcript prefix, with intermediate relation \(R_2\) shared between them. Then \(V_1.\mathsf{append}\ V_2\) is round-by-round knowledge sound for every fixed transcript prefix, and each challenge keeps its component’s error. The composed extractor runs the second extractor from the first verdict and then the first extractor. The composed knowledge state is the first one up to the seam, and after it is the first check together with the second knowledge state at the first verdict. At the seam, the second knowledge state at round \(0\) places the verdict in \(R_2\), and a passing check makes that verdict a positive-probability output of \(V_1\).

Finite-chain completeness likewise requires guarantees from every shared state. Finite-chain soundness and knowledge soundness hold for guarded chains, and so does round-by-round knowledge soundness.

Theorem 85 General Completeness Preservation
✓

Let \(R_0, \ldots , R_{k-1}\) be a finite chain with compatible consecutive relations. Every prover has pure output and every verifier is pure and total. For each \(i\) and each \(s \in \Sigma \), assume \(R_i\) is complete with error \(\epsilon _i\) from the deterministic initial state \(s\). Then the chain is complete from any initial distribution \(\mu \), with error \(\sum _{i=0}^{k-1} \epsilon _i\).

Theorem 86 General Soundness Preservation
✓

Let \(V_0, \ldots , V_{k-1}\) be guarded verifiers, each sound with error \(\epsilon _i\) from every deterministic shared state. Then their sequential composition is sound from any initial distribution with error \(\sum _{i=0}^{k-1} \epsilon _i\).

Theorem 87 General Knowledge Soundness Preservation
✓

Let \(V_0, \ldots , V_{k-1}\) be guarded verifiers. For each component \(i\), choose one pure extractor \(e_i\), a function of the input statement, the transcript and the output witness, that satisfies the knowledge game of \(V_i\) with error \(\epsilon _i\) from every deterministic initial shared state. Then their sequential composition is knowledge sound from any initial distribution with error \(\sum _{i=0}^{k-1} \epsilon _i\), with the extractors folded backwards over the chain.

Theorem 88 Round-by-Round Knowledge Soundness of a Guarded Chain
✓

If every verifier of a finite chain is guarded and round-by-round knowledge sound for every fixed transcript prefix between consecutive relations, so is the chain. Each combined challenge keeps the error of the component challenge it corresponds to. The proof iterates Theorem 84.

2.2.2 Lifting Contexts

Another essential tool for modular oracle reductions is the ability to adapt reductions from one context to another. This allows us to apply reductions designed for simple contexts to more complex scenarios.

Context Lenses

The fundamental abstraction for context adaptation is a lens, a pair of maps between an outer and an inner context: one projects inputs inward, the other lifts outputs back outward.

Definition 89 Statement Lens
✓
#

A statement lens between outer context types \((\mathsf{StmtIn}_{\mathsf{outer}}, \mathsf{StmtOut}_{\mathsf{outer}})\) and inner context types \((\mathsf{StmtIn}_{\mathsf{inner}}, \mathsf{StmtOut}_{\mathsf{inner}})\) consists of:

  • \(\mathsf{projStmt}: \mathsf{StmtIn}_{\mathsf{outer}} \to \mathsf{StmtIn}_{\mathsf{inner}}\) (projection to inner context)

  • \(\mathsf{liftStmt}: \mathsf{StmtIn}_{\mathsf{outer}} \to \mathsf{StmtOut}_{\mathsf{inner}} \to \mathsf{StmtOut}_{\mathsf{outer}}\) (lifting back to outer context)

Definition 90 Witness Lens
✓
#

A witness lens, used by the prover, consists of:

  • \(\mathsf{projWit}: \mathsf{StmtIn}_{\mathsf{outer}} \times \mathsf{WitIn}_{\mathsf{outer}} \to \mathsf{WitIn}_{\mathsf{inner}}\) (projection to inner context)

  • \(\mathsf{liftWit}: \mathsf{StmtIn}_{\mathsf{outer}} \times \mathsf{WitIn}_{\mathsf{outer}} \to \mathsf{StmtOut}_{\mathsf{inner}} \times \mathsf{WitOut}_{\mathsf{inner}} \to \mathsf{WitOut}_{\mathsf{outer}}\) (lifting back to outer context)

The statements are part of both maps because the prover sees its full context.

Definition 91 Context Lens
✓
#

A context lens pairs a statement lens with a witness lens. It adapts a whole reduction: the verifier uses the statement lens and the prover uses both.

Definition 92 Oracle Context Lens
✓

For oracle reductions, the statement lens acts on pairs of a statement and its oracle statements, and the witness lens sees these pairs. This form suffices for relations. To run an oracle verifier, an executable oracle context lens also implements the inner input oracles by queries to the outer ones, and the outer output oracles by queries to the outer input and inner output oracles, each agreeing with a materialized map.

Definition 93 Extractor Lens
✓
#

An extractor runs from output witnesses back to input witnesses, so lifting an extractor needs a witness lens in the reverse direction. An inverse witness lens consists of:

  • a projection \(\mathsf{StmtIn}_{\mathsf{outer}} \times \mathsf{WitOut}_{\mathsf{outer}} \to \mathsf{WitOut}_{\mathsf{inner}}\) of output witnesses;

  • a lifting \(\mathsf{StmtIn}_{\mathsf{outer}} \times \mathsf{WitOut}_{\mathsf{outer}} \to \mathsf{WitIn}_{\mathsf{inner}} \to \mathsf{WitIn}_{\mathsf{outer}}\) of extracted input witnesses.

An extractor lens pairs a statement lens with an inverse witness lens.

Lifting Reductions

Given a context lens, we can lift reductions from inner contexts to outer contexts.

Definition 94 Prover Context Lifting
✓
#

Given a prover \(P\) for the inner context and a context lens, the lifted prover works by:

  • Projecting the outer input to the inner context

  • Running the inner prover

  • Lifting the output back to the outer context

Definition 95 Verifier Context Lifting
✓
#

The lifted verifier runs the inner verifier on the projected input statement and lifts its output statement with the statement lens.

Definition 96 Reduction Context Lifting
✓

Conditions for Security Preservation

For lifting to preserve security properties, the lens must satisfy conditions relative to the outer and inner relations. Each condition takes a compatibility predicate between the outer input and the inner output. The lifting theorems instantiate it with the outputs the inner reduction or verifier can actually produce on the projected input, for some transcript.

Definition 97 Completeness-Preserving Context Lens
✓
#

A context lens preserves completeness if projection maps the outer input relation into the inner input relation, and lifting maps every compatible pair of a valid outer input and a valid inner output into the outer output relation.

Definition 98 Soundness-Preserving Statement Lens
✓
#

A statement lens preserves soundness if projection maps statements outside the outer input language to statements outside the inner input language, and lifting maps an outer input outside its language together with a compatible inner output outside its language to an outer output outside its language. The same condition serves ordinary and round-by-round soundness.

Definition 99 Knowledge-Soundness-Preserving Extractor Lens
✓
#

An extractor lens preserves knowledge soundness if it satisfies two conditions.

  • Lift: if the projected outer input statement and an extracted inner input witness lie in the inner input relation, then the lifted outer input witness lies in the outer input relation.

  • Project, or shortcut: if a lifted output statement and an outer output witness lie in the outer output relation, then either the projected output witness and the inner output statement lie in the inner output relation, or every inner input witness lifts to a valid outer input witness.

The shortcut covers lenses whose outer output already certifies the outer input. Both conditions also take a compatibility predicate on witnesses; the lifting theorems use the trivial one.

Security Preservation Theorems for Context Lifting

Theorem 100 Completeness Preservation under Context Lifting
✓

If a reduction is complete with error \(\epsilon \) and the context lens is completeness-preserving, then the lifted reduction is complete with error \(\epsilon \). The same holds for perfect completeness.

Theorem 101 Soundness Preservation under Context Lifting
✓

If a verifier is sound with error \(\epsilon \) and the statement lens is soundness-preserving, then the lifted verifier is sound with error \(\epsilon \). The inner output statement type must be inhabited.

Theorem 102 Knowledge Soundness Preservation under Context Lifting
✓

If a verifier is knowledge sound with error \(\epsilon \) and the extractor lens is knowledge-soundness-preserving, then the verifier lifted along its statement lens is knowledge sound with error \(\epsilon \). The inner output statement and inner input witness types must be inhabited: when the inner extractor fails, the lifted extractor lifts a default inner witness. That default is a valid outer input witness when the shortcut disjunct of the lens condition holds; failure in the other branch is charged to the inner knowledge error.

Theorem 103 RBR Soundness Preservation under Context Lifting
✓

If a verifier is round-by-round sound with error \(\epsilon \) and the statement lens is soundness-preserving, then the lifted verifier is round-by-round sound with the same error at every challenge.

Theorem 104 RBR Knowledge Soundness Preservation under Context Lifting
✓

If a verifier is round-by-round knowledge sound with error \(\epsilon \) and the extractor lens is knowledge-soundness-preserving, then the lifted verifier is round-by-round knowledge sound with the same error at every challenge. The named form keeps the lifted extractor and knowledge state function explicit.

Extractors and State Functions

Context lifting also applies to extractors and state functions used in knowledge soundness and round-by-round soundness.

Definition 105 Straightline Extractor Lifting
✓

The lifted extractor runs the inner extractor on the projected statement and output witness and lifts the result with the inverse witness lens, using a default inner witness when the inner extractor fails.

Definition 106 Round-by-Round Extractor Lifting
✓

The lifted round-by-round extractor keeps the outer output witness alongside each intermediate inner witness.

Definition 107 State Function Lifting
✓

The lifted state function holds when the outer input statement is in its language or the inner state function holds at the projected statement.

The lifted knowledge state function carries a pair of witnesses: the outer output witness and the current inner witness. It holds when the inner knowledge state function holds at the projected statement for the carried inner witness, or when every inner input witness lifts, using the carried outer output witness and the inverse witness lens, to a valid outer input witness. The second disjunct is the shortcut of the knowledge-soundness lens condition; it is not membership of the outer statement in a language.

These composition and lifting operators provide the essential building blocks for constructing complex oracle reductions from simpler components while preserving their security properties.

2.3 The Fiat-Shamir Transformation

The Fiat–Shamir transformation turns a public-coin interactive reduction into a non-interactive one. The prover computes all of its messages at once, and both parties derive each verifier challenge by querying a challenge oracle on the input statement and the prover messages sent before that challenge. In the security analysis this oracle is a random oracle.

ArkLib formalizes the basic (or slow) variant, which hashes the whole statement and message prefix for each challenge. The same challenge oracle serves as the state-restoration oracle, so the definitions below carry both names. In the single-salt state-restoration game (Definition 67), each challenge query includes the original statement, a prover-chosen salt, and the preceding prover messages. The IP verifier receives the original statement and the full transcript.

2.3.1 The Challenge Oracle

Let \(\mathsf{pSpec}\) be a protocol specification and \(\mathsf{StmtIn}\) the input statement type. Write \(\mathsf{pSpec}.\mathsf{MessagesUpTo}\ k\) for the prover messages among the first \(k\) rounds.

Definition 108 Challenge Oracle Interface
✓
#

For each challenge index \(i : \mathsf{pSpec}.\mathsf{ChallengeIdx}\), the state-restoration (and Fiat–Shamir) oracle interface on \(\mathsf{pSpec}.\mathsf{Challenge}\ i\) has:

  • Query type: \(\mathsf{StmtIn}\times \mathsf{pSpec}.\mathsf{MessagesUpTo}\ i.\mathsf{val}.\mathsf{castSucc}\), the input statement together with the prover messages sent before round \(i\);

  • Response type: \(\mathsf{pSpec}.\mathsf{Challenge}\ i\);

  • Oracle behavior: return the challenge itself.

The Lean name is \(\mathsf{challengeOracleInterfaceSR}\).

Definition 109 Challenge Oracle Specification
✓

The challenge oracle specification is

\[ \mathsf{srVerifierMessageOracle}\ \mathsf{StmtIn}\ \mathsf{pSpec}: \mathsf{OracleSpec}\ \big((i : \mathsf{pSpec}.\mathsf{ChallengeIdx}) \times (\mathsf{StmtIn}\times \mathsf{pSpec}.\mathsf{MessagesUpTo}\ i.\mathsf{val}.\mathsf{castSucc})\big), \]

which answers the query \(\langle i, (x, m) \rangle \) with a value of type \(\mathsf{pSpec}.\mathsf{Challenge}\ i\). The index type pairs a challenge round with a query of the interface of Definition 108. The name \(\mathsf{fsVerifierMessageOracle}\) is an alias.

2.3.2 Fiat-Shamir Transformation for Provers

The transformed prover runs the interactive prover, answering its own challenges with oracle queries. All definitions in this section and the next run in the oracle specification \(\mathsf{oSpec}\mathrel {+} \mathsf{srVerifierMessageOracle}\ \mathsf{StmtIn}\ \mathsf{pSpec}\).

Definition 110 Fiat-Shamir Round Processing
✓
#

Given the prover messages so far, the input statement and the prover state before round \(j\), \(\mathsf{processRoundFS}\ j\) computes the same data after round \(j\):

  • If \(j\) is a challenge round, it queries the challenge oracle at \(\langle j, (x, m) \rangle \), where \(x\) is the statement and \(m\) the messages so far, and passes the answer to the prover’s \(\mathsf{receiveChallenge}\).

  • If \(j\) is a message round, it runs the prover’s \(\mathsf{sendMessage}\) and appends the message.

Only prover messages are accumulated; challenges are not stored.

Definition 111 Fiat-Shamir Prover Execution
✓
#

\(\mathsf{runToRoundFS}\ i\ \mathsf{stmt}\ \mathsf{prover}\ \mathsf{state}\) starts from the empty message prefix, the statement and the prover state at round \(0\), and applies \(\mathsf{processRoundFS}\) to rounds \(0, \ldots , i - 1\). It returns the messages up to round \(i\), the statement and the prover state at round \(i\).

Definition 112 Fiat-Shamir Prover Transformation
✓
#

Given an interactive prover \(P\) for \(\mathsf{pSpec}\), the transformation produces a non-interactive prover

\[ P.\mathsf{fiatShamir} : \mathsf{NonInteractiveProver}\ (\forall i, \mathsf{pSpec}.\mathsf{Message}\ i)\ (\mathsf{oSpec}\mathrel {+} \mathsf{srVerifierMessageOracle}\ \mathsf{StmtIn}\ \mathsf{pSpec})\ \mathsf{StmtIn}\ \mathsf{WitIn}\ \mathsf{StmtOut}\ \mathsf{WitOut}. \]

Its state at round \(0\) pairs the statement with \(P\)’s initial state; afterwards it is \(P\)’s final state. Its single message is the vector of all of \(P\)’s messages, computed by \(\mathsf{runToRoundFS}\) up to the last round. It receives no challenges and outputs through \(P\)’s output function.

2.3.3 Transcript Derivation and Verifier Transformation

Definition 113 Fiat-Shamir Transcript Derivation
✓

Given an input statement \(x\) and all prover messages, \(\mathsf{deriveTranscriptFS}\) reconstructs the full transcript

\[ \mathsf{messages}.\mathsf{deriveTranscriptFS}\ x : \mathsf{OracleComp}\ (\mathsf{oSpec}\mathrel {+} \mathsf{srVerifierMessageOracle}\ \mathsf{StmtIn}\ \mathsf{pSpec})\ (\mathsf{pSpec}.\mathsf{FullTranscript}) . \]

Round by round, it copies each prover message and obtains each challenge by querying the challenge oracle at the statement and the messages before that round. The name is an alias of \(\mathsf{deriveTranscriptSR}\).

Definition 114 Fiat-Shamir Verifier Transformation
✓
#

Given an interactive verifier \(V\) for \(\mathsf{pSpec}\), the transformation produces a non-interactive verifier

\[ V.\mathsf{fiatShamir} : \mathsf{NonInteractiveVerifier}\ (\forall i, \mathsf{pSpec}.\mathsf{Message}\ i)\ (\mathsf{oSpec}\mathrel {+} \mathsf{srVerifierMessageOracle}\ \mathsf{StmtIn}\ \mathsf{pSpec})\ \mathsf{StmtIn}\ \mathsf{StmtOut}. \]

On a statement and a proof consisting of all prover messages, it derives the full transcript with \(\mathsf{deriveTranscriptFS}\) and runs \(V\)’s verification on it.

2.3.4 Fiat-Shamir Transformation for Reductions

Definition 115 Fiat-Shamir Reduction Transformation
✓
#

Given an interactive reduction \(R\) for \(\mathsf{pSpec}\), its transform

\[ R.\mathsf{fiatShamir} : \mathsf{NonInteractiveReduction}\ (\forall i, \mathsf{pSpec}.\mathsf{Message}\ i)\ (\mathsf{oSpec}\mathrel {+} \mathsf{srVerifierMessageOracle}\ \mathsf{StmtIn}\ \mathsf{pSpec})\ \mathsf{StmtIn}\ \mathsf{WitIn}\ \mathsf{StmtOut}\ \mathsf{WitOut} \]

applies the transformation to the prover and to the verifier of \(R\).

2.3.5 Security Properties

Theorem 116 Fiat-Shamir Preserves Completeness
✓

If an interactive reduction \(R\) has perfect completeness, its Fiat–Shamir transform has perfect completeness for every fixed challenge table.

If \(R\) has completeness error \(\epsilon \), its Fiat–Shamir transform has completeness error \(\epsilon \) when the challenge oracle is a lazily sampled random oracle shared by prover and verifier, starting from an empty cache. This needs only decidable equality of the oracle’s query type. Both claims use the same input and output relations as \(R\).

Proof ▶

Each uniform interactive challenge has full support, so every honest transformed execution is an interactive branch, and verifier reconstruction replays exactly that branch. For the random oracle, the honest prover’s queries are at distinct round indices and hence fresh, and reconstruction reads the cached answers.

Remark 117 Soundness and zero-knowledge
#

The expected route to soundness of the transform is the following:

  • state-restoration knowledge soundness of the interactive reduction implies knowledge soundness of its Fiat–Shamir transform in the random oracle model;

  • honest-verifier zero-knowledge of the interactive reduction implies zero-knowledge of the transform.

State-restoration knowledge soundness itself is proved for fixed-round oracle protocols in the interaction layer, from round-by-round knowledge certificates, with error \((Q + k)\cdot \epsilon \) (Theorem 61). The two transfers above are not formalized. docs/design/00-current-status.md records the status of this work.

Remark 118 Implementation considerations
#

Practical Fiat–Shamir implementations absorb transcript elements into a cryptographic sponge incrementally and squeeze challenges from it. ArkLib formalizes only the basic variant above; it has no sponge-based variant.