binius_core/fiat_shamir/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2024 Irreducible Inc.

mod hasher_challenger;

use bytes::{Buf, BufMut};
pub use hasher_challenger::HasherChallenger;

/// A Fiat-Shamir challenger that can observe prover messages and sample verifier randomness.
pub trait Challenger {
	/// Returns an infinite buffer for reading pseudo-random bytes.
	fn sampler(&mut self) -> &mut impl Buf;

	/// Returns and infinite buffer for writing data that the challenger observes.
	fn observer(&mut self) -> &mut impl BufMut;
}