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§

source

fn append_field_element(&mut self, element: &FieldElement<F>)

Appends a field element to the transcript.

source

fn append_bytes(&mut self, new_bytes: &[u8])

Appends a bytes to the transcript.

source

fn state(&self) -> [u8; 32]

Returns the inner state of the transcript that fully determines its outputs.

source

fn sample_field_element(&mut self) -> FieldElement<F>

Returns a random field element.

source

fn sample_u64(&mut self, upper_bound: u64) -> u64

Returns a random index between 0 and upper_bound.

Provided Methods§

source

fn sample_z_ood<S: IsSubFieldOf<F>>( &mut self, lde_roots_of_unity_coset: &[FieldElement<S>], trace_roots_of_unity: &[FieldElement<S>], ) -> FieldElement<F>

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.

Implementors§