Trait SigmaTranscript

Source
pub trait SigmaTranscript {
    // Required methods
    fn init_sigma<G: Group>(
        &mut self,
        instance_name: &'static [u8],
        public_scalars: &[&G::ScalarType],
        public_elems: &[G],
    );
    fn append_group_element<G: Group>(&mut self, label: &'static [u8], elem: &G);
    fn append_field_element<S: Scalar>(
        &mut self,
        label: &'static [u8],
        scalar: &S,
    );
    fn append_proof_commitment<G: Group>(&mut self, elem: &G);
    fn get_challenge<S: Scalar>(&mut self) -> S;
}
Expand description

The transcript methods for the Sigma protocol.

Required Methods§

Source

fn init_sigma<G: Group>( &mut self, instance_name: &'static [u8], public_scalars: &[&G::ScalarType], public_elems: &[G], )

Initialize the transcript for the Sigma protocol.

Source

fn append_group_element<G: Group>(&mut self, label: &'static [u8], elem: &G)

Append group elements to the transcript.

Source

fn append_field_element<S: Scalar>(&mut self, label: &'static [u8], scalar: &S)

Append field elements to the transcript.

Source

fn append_proof_commitment<G: Group>(&mut self, elem: &G)

Append the proof commitment to the transcript.

Source

fn get_challenge<S: Scalar>(&mut self) -> S

Compute a challenge from the 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.

Implementations on Foreign Types§

Source§

impl SigmaTranscript for Transcript

Source§

fn init_sigma<G: Group>( &mut self, instance_name: &'static [u8], public_scalars: &[&G::ScalarType], public_elems: &[G], )

Source§

fn append_group_element<G: Group>(&mut self, label: &'static [u8], elem: &G)

Source§

fn append_field_element<S: Scalar>(&mut self, label: &'static [u8], scalar: &S)

Source§

fn append_proof_commitment<G: Group>(&mut self, elem: &G)

Source§

fn get_challenge<S: Scalar>(&mut self) -> S

Implementors§