pub trait Transcript {
    type Challenge: Clone + Send + Sync + AsRef<[u8]>;

    fn new(name: &'static [u8]) -> Self;
    fn domain_separate(&mut self, label: &'static [u8]);
    fn append_message(&mut self, label: &'static [u8], message: &[u8]);
    fn challenge(&mut self, label: &'static [u8]) -> Self::Challenge;
    fn rng_seed(&mut self, label: &'static [u8]) -> [u8; 32];
}

Required Associated Types

Required Methods

Create a new transcript with the specified name

Apply a domain separator to the transcript

Append a message to the transcript

Produce a challenge. This MUST update the transcript as it does so, preventing the same challenge from being generated multiple times

Produce a RNG seed. Helper function for parties needing to generate random data from an agreed upon state. Internally calls the challenge function for the needed bytes, converting them to the seed format rand_core expects

Implementors