binius_core/fiat_shamir/
mod.rs

1// Copyright 2024-2025 Irreducible Inc.
2
3mod hasher_challenger;
4mod sampling;
5
6use bytes::{Buf, BufMut};
7pub use hasher_challenger::HasherChallenger;
8pub use sampling::*;
9
10/// A Fiat-Shamir challenger that can observe prover messages and sample verifier randomness.
11pub trait Challenger {
12	/// Returns an infinite buffer for reading pseudo-random bytes.
13	fn sampler(&mut self) -> &mut impl Buf;
14
15	/// Returns and infinite buffer for writing data that the challenger observes.
16	fn observer(&mut self) -> &mut impl BufMut;
17}