Struct flexible_transcript::MerlinTranscript
source · pub struct MerlinTranscript(/* private fields */);
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.
Auto Trait Implementations§
impl Freeze for MerlinTranscript
impl RefUnwindSafe for MerlinTranscript
impl Send for MerlinTranscript
impl Sync for MerlinTranscript
impl Unpin for MerlinTranscript
impl UnwindSafe for MerlinTranscript
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)