pub trait Transcript<S: Sigma>: Clone {
    fn add_name<N: Writable + ?Sized>(&mut self, name: &N);
fn add_statement(&mut self, sigma: &S, statement: &S::Statement);
fn get_challenge(
        self,
        sigma: &S,
        announcement: &S::Announcement
    ) -> GenericArray<u8, S::ChallengeLength>; }
Expand description

A trait for a Fiat-Shamir proof transcript.

Really this is just a trait around a cryptographic hash that can produce a Fiat-Shamir challenge from the statement and the announcement. The usual workflow is to call add_name and then clone the transcript for each new statement.

Required methods

The name unambigiously determines the semantics of the statement and announcement which are subsequently added to the transcript.

Adds the prover’s statement to the transcript. This must be called before get_challenge.

Gets the verifier’s synthetic challenge for the non-interactive proof.

Implementors

Implements a transcript for any hash that outputs 32 bytes but with a block size of 64 bytes (e.g. SHA256).

The implementation first BIP-340 tags the SHA256 instance with the Sigma protocol’s name.