[−][src]Trait sigma_fun::Transcript
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.
Required methods
pub fn initialize(&mut self, sigma: &S)
[src]
Initializes the transcript. This must be called once when the prover is created. It shouldn't be called before each proof. Rather it should be called once and then the transcript should be cloned for each proof.
pub fn add_statement(&mut self, sigma: &S, statement: &S::Statement)
[src]
Adds the prover's statement to the transcript. This must be called before get_challenge
.
pub fn get_challenge(
self,
sigma: &S,
announce: &S::Announcement
) -> GenericArray<u8, S::ChallengeLength>
[src]
self,
sigma: &S,
announce: &S::Announcement
) -> GenericArray<u8, S::ChallengeLength>
Gets the verifier's synthetic challenge for the non-interactive proof.
Implementors
impl<H, S: Sigma, R: Clone> Transcript<S> for HashTranscript<H, R> where
S::ChallengeLength: IsLessOrEqual<U32>,
<S::ChallengeLength as IsLessOrEqual<U32>>::Output: NonZero,
H: BlockInput<BlockSize = U64> + FixedOutput<OutputSize = U32> + Update + Default + Clone,
[src]
S::ChallengeLength: IsLessOrEqual<U32>,
<S::ChallengeLength as IsLessOrEqual<U32>>::Output: NonZero,
H: BlockInput<BlockSize = U64> + FixedOutput<OutputSize = U32> + Update + Default + Clone,
Implements a transcript for any hash that outputs 32 bytes but with a block size of 64 bytes (e.g. SHA256).
The implementation first tags the SHA256 instance with the Sigma protocol's name.
pub fn initialize(&mut self, sigma: &S)
[src]
pub fn add_statement(&mut self, sigma: &S, statement: &S::Statement)
[src]
pub fn get_challenge(
self,
sigma: &S,
announce: &S::Announcement
) -> GenericArray<u8, S::ChallengeLength>
[src]
self,
sigma: &S,
announce: &S::Announcement
) -> GenericArray<u8, S::ChallengeLength>