pub trait TranscriptInst: BabyBearExt4Inst {
// Required methods
fn init_transcript(&mut self);
fn observe(&mut self, value: &ReducedBabyBearWire<Self::F>);
fn observe_ext(&mut self, value: &ReducedBabyBearExt4Wire<Self::F>);
fn observe_commit(&mut self, digest: &DigestWire<Self::F>);
fn sample(&mut self) -> BabyBearWire<Self::F>;
fn sample_ext(&mut self) -> BabyBearExt4Wire<Self::F>;
fn sample_bits(&mut self, bits: usize) -> Self::F;
fn check_witness(
&mut self,
bits: usize,
witness: &ReducedBabyBearWire<Self::F>,
);
fn transcript_load_reduced_constant(
&mut self,
value: BabyBear,
) -> ReducedBabyBearWire<Self::F>;
}Expand description
Stateful Fiat–Shamir transcript mirroring TranscriptChip.
Required Methods§
Sourcefn init_transcript(&mut self)
fn init_transcript(&mut self)
(Re)initialize the transcript sponge to the all-zero state.
fn observe(&mut self, value: &ReducedBabyBearWire<Self::F>)
fn observe_ext(&mut self, value: &ReducedBabyBearExt4Wire<Self::F>)
fn observe_commit(&mut self, digest: &DigestWire<Self::F>)
fn sample(&mut self) -> BabyBearWire<Self::F>
fn sample_ext(&mut self) -> BabyBearExt4Wire<Self::F>
Sourcefn sample_bits(&mut self, bits: usize) -> Self::F
fn sample_bits(&mut self, bits: usize) -> Self::F
Sample and truncate to bits bits; returns a raw cell in [0, 2^bits).
Sourcefn check_witness(&mut self, bits: usize, witness: &ReducedBabyBearWire<Self::F>)
fn check_witness(&mut self, bits: usize, witness: &ReducedBabyBearWire<Self::F>)
Asserts that the proof-of-work witness passes with bits leading zero bits.
Sourcefn transcript_load_reduced_constant(
&mut self,
value: BabyBear,
) -> ReducedBabyBearWire<Self::F>
fn transcript_load_reduced_constant( &mut self, value: BabyBear, ) -> ReducedBabyBearWire<Self::F>
Load a reduced constant through TranscriptChip’s baby-bear constant
cache, which is distinct from BabyBearChip::const_cache. This split
is preserved to keep the verifying key unchanged.