pub trait IsTranscript<F: IsField> {
// Required methods
fn append_field_element(&mut self, element: &FieldElement<F>);
fn append_bytes(&mut self, new_bytes: &[u8]);
fn state(&self) -> [u8; 32];
fn sample_field_element(&mut self) -> FieldElement<F>;
fn sample_u64(&mut self, upper_bound: u64) -> u64;
// Provided method
fn sample_z_ood<S: IsSubFieldOf<F>>(
&mut self,
lde_roots_of_unity_coset: &[FieldElement<S>],
trace_roots_of_unity: &[FieldElement<S>],
) -> FieldElement<F>
where FieldElement<F>: AsBytes { ... }
}
Expand description
The functionality of a transcript to be used in the STARK Prove and Verify protocols.
Required Methods§
sourcefn append_field_element(&mut self, element: &FieldElement<F>)
fn append_field_element(&mut self, element: &FieldElement<F>)
Appends a field element to the transcript.
sourcefn append_bytes(&mut self, new_bytes: &[u8])
fn append_bytes(&mut self, new_bytes: &[u8])
Appends a bytes to the transcript.
sourcefn state(&self) -> [u8; 32]
fn state(&self) -> [u8; 32]
Returns the inner state of the transcript that fully determines its outputs.
sourcefn sample_field_element(&mut self) -> FieldElement<F>
fn sample_field_element(&mut self) -> FieldElement<F>
Returns a random field element.
sourcefn sample_u64(&mut self, upper_bound: u64) -> u64
fn sample_u64(&mut self, upper_bound: u64) -> u64
Returns a random index between 0 and upper_bound
.
Provided Methods§
sourcefn sample_z_ood<S: IsSubFieldOf<F>>(
&mut self,
lde_roots_of_unity_coset: &[FieldElement<S>],
trace_roots_of_unity: &[FieldElement<S>],
) -> FieldElement<F>where
FieldElement<F>: AsBytes,
fn sample_z_ood<S: IsSubFieldOf<F>>(
&mut self,
lde_roots_of_unity_coset: &[FieldElement<S>],
trace_roots_of_unity: &[FieldElement<S>],
) -> FieldElement<F>where
FieldElement<F>: AsBytes,
Returns a field element not contained in lde_roots_of_unity_coset
or trace_roots_of_unity
.
Object Safety§
This trait is not object safe.