pub trait IPProverChannel<F: Field> {
// Required methods
fn send_one(&mut self, elem: F);
fn observe_one(&mut self, val: F);
fn sample(&mut self) -> F;
// Provided methods
fn send_many(&mut self, elems: &[F]) { ... }
fn send_public_claim(&mut self, elem: F) { ... }
fn observe_many(&mut self, vals: &[F]) { ... }
fn sample_many(&mut self, n: usize) -> Vec<F> { ... }
fn sample_array<const N: usize>(&mut self) -> [F; N] { ... }
}Expand description
Channel for sending prover messages and sampling challenges in a public-coin interactive protocol.
In a public-coin protocol, the prover’s role is to:
- Send field elements to the verifier via
send_*methods - Sample the same random challenges as the verifier via
sample
When used with a Fiat-Shamir transcript, the challenges are derived deterministically from the transcript state, ensuring prover and verifier derive identical challenges.
Required Methods§
Sourcefn observe_one(&mut self, val: F)
fn observe_one(&mut self, val: F)
Observes a single field element, feeding it into the Fiat-Shamir state.
Provided Methods§
Sourcefn send_public_claim(&mut self, elem: F)
fn send_public_claim(&mut self, elem: F)
Sends a value the verifier could compute for itself, as advice.
The verifier’s counterpart is
recv_public_claim, which
documents what a claim is. A claim depends on public-channel-derived values alone, so a
channel that masks the prover’s messages sends this one in the clear. The default is the
plain send, for a channel that draws no such distinction.
Sourcefn observe_many(&mut self, vals: &[F])
fn observe_many(&mut self, vals: &[F])
Observes multiple field elements, feeding them into the Fiat-Shamir state.
Sourcefn sample_many(&mut self, n: usize) -> Vec<F>
fn sample_many(&mut self, n: usize) -> Vec<F>
Samples n random challenges.
Sourcefn sample_array<const N: usize>(&mut self) -> [F; N]
fn sample_array<const N: usize>(&mut self) -> [F; N]
Samples a fixed-size array of random challenges.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".