Struct flexible_transcript::MerlinTranscript
source · pub struct MerlinTranscript(_);Available on crate feature
merlin only.Expand description
A wrapper around a Merlin transcript which satisfiees the Transcript API.
Challenges are fixed to 64 bytes, despite Merlin supporting variable length challenges.
This implementation is intended to remain in the spirit of Merlin more than it’s intended to be in the spirit of the provided DigestTranscript. While DigestTranscript uses flags for each of its different field types, the domain_separate function simply appends a message with a label of “dom-sep”, Merlin’s preferred domain separation label. Since this could introduce transcript conflicts between a domain separation and a message with a label of “dom-sep”, the append_message function uses an assertion to prevent such labels.
Trait Implementations§
source§impl Clone for MerlinTranscript
impl Clone for MerlinTranscript
source§fn clone(&self) -> MerlinTranscript
fn clone(&self) -> MerlinTranscript
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for MerlinTranscript
impl Debug for MerlinTranscript
source§impl Transcript for MerlinTranscript
impl Transcript for MerlinTranscript
type Challenge = [u8; 64]
source§fn domain_separate(&mut self, label: &'static [u8])
fn domain_separate(&mut self, label: &'static [u8])
Apply a domain separator to the transcript.
source§fn append_message<M: AsRef<[u8]>>(&mut self, label: &'static [u8], message: M)
fn append_message<M: AsRef<[u8]>>(&mut self, label: &'static [u8], message: M)
Append a message to the transcript.