pub trait Transcript {
// Required methods
fn get_challenge<T: ConstTranscribable>(&mut self) -> T;
fn get_prime<R: ConstIntSemiring + ConstTranscribable, T: PrimalityTest<R>>(
&mut self,
) -> R;
fn absorb_inner(&mut self, v: &[u8]);
// Provided methods
fn get_field_challenge<F: PrimeField>(&mut self, cfg: &F::Config) -> F
where F::Inner: ConstTranscribable { ... }
fn get_field_challenges<F: PrimeField>(
&mut self,
n: usize,
cfg: &F::Config,
) -> Vec<F>
where F::Inner: ConstTranscribable { ... }
fn get_challenges<T: ConstTranscribable>(&mut self, n: usize) -> Vec<T> { ... }
fn get_random_field_cfg<F, FMod, T>(&mut self) -> F::Config
where F: PrimeField,
FMod: ConstTranscribable + ConstIntSemiring,
F::Modulus: FromRef<FMod>,
T: PrimalityTest<FMod> { ... }
fn absorb_slice(&mut self, buf: &[u8]) { ... }
fn absorb_random_field<F>(&mut self, v: &F, buf: &mut [u8])
where F: PrimeField,
F::Inner: Transcribable,
F::Modulus: Transcribable { ... }
fn absorb_random_field_slice<F>(&mut self, v: &[F], buf: &mut [u8])
where F: PrimeField,
F::Inner: Transcribable,
F::Modulus: Transcribable { ... }
}Required Methods§
Sourcefn get_challenge<T: ConstTranscribable>(&mut self) -> T
fn get_challenge<T: ConstTranscribable>(&mut self) -> T
Generates a pseudorandom transcribable value as a challenge based on the current transcript state, updating it.
fn get_prime<R: ConstIntSemiring + ConstTranscribable, T: PrimalityTest<R>>( &mut self, ) -> R
Sourcefn absorb_inner(&mut self, v: &[u8])
fn absorb_inner(&mut self, v: &[u8])
Absorbs a byte slice into the hash sponge. This updates the internal state of the hasher with the provided data. Should not be used directly.
Provided Methods§
fn get_field_challenge<F: PrimeField>(&mut self, cfg: &F::Config) -> Fwhere
F::Inner: ConstTranscribable,
Sourcefn get_field_challenges<F: PrimeField>(
&mut self,
n: usize,
cfg: &F::Config,
) -> Vec<F>where
F::Inner: ConstTranscribable,
fn get_field_challenges<F: PrimeField>(
&mut self,
n: usize,
cfg: &F::Config,
) -> Vec<F>where
F::Inner: ConstTranscribable,
Generates a pseudorandom transcribable values as challenges based on the current transcript state, updating it.
Sourcefn get_challenges<T: ConstTranscribable>(&mut self, n: usize) -> Vec<T>
fn get_challenges<T: ConstTranscribable>(&mut self, n: usize) -> Vec<T>
Generates a pseudorandom transcribable values as challenges based on the current transcript state, updating it.
fn get_random_field_cfg<F, FMod, T>(&mut self) -> F::Configwhere
F: PrimeField,
FMod: ConstTranscribable + ConstIntSemiring,
F::Modulus: FromRef<FMod>,
T: PrimalityTest<FMod>,
Sourcefn absorb_slice(&mut self, buf: &[u8])
fn absorb_slice(&mut self, buf: &[u8])
Absorbs a byte slice into the transcript.
Sourcefn absorb_random_field<F>(&mut self, v: &F, buf: &mut [u8])where
F: PrimeField,
F::Inner: Transcribable,
F::Modulus: Transcribable,
fn absorb_random_field<F>(&mut self, v: &F, buf: &mut [u8])where
F: PrimeField,
F::Inner: Transcribable,
F::Modulus: Transcribable,
Absorbs a field element into the transcript. Delegates to the field element’s implementation of absorb_into_transcript.
Sourcefn absorb_random_field_slice<F>(&mut self, v: &[F], buf: &mut [u8])where
F: PrimeField,
F::Inner: Transcribable,
F::Modulus: Transcribable,
fn absorb_random_field_slice<F>(&mut self, v: &[F], buf: &mut [u8])where
F: PrimeField,
F::Inner: Transcribable,
F::Modulus: Transcribable,
Absorbs a slice of field element into the transcript. Delegates to the field element’s implementation of absorb_into_transcript.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.