[][src]Struct schnorrkel::context::SigningTranscriptWithRng

pub struct SigningTranscriptWithRng<T, R> where
    T: SigningTranscript,
    R: Rng + CryptoRng
{ /* fields omitted */ }

Schnorr signing transcript with the default ThreadRng replaced by an arbitrary CryptoRng.

If ThreadRng breaks on your platform, or merely if your paranoid, then you might "upgrade" from ThreadRng to OsRng by using calls like keypair.sign( attach_rng(t,OSRng::new()) ). We recommend instead simply fixing ThreadRng for your platform however.

There are also derandomization tricks like attach_rng(t,ChaChaRng::from_seed([0u8; 32])) for deterministic signing in tests too. Although derandomization produces secure signatures, we recommend against doing this in production because we implement protocols like multi-signatures which likely become vulnerabile when derandomized.

Trait Implementations

impl<T, R> SigningTranscript for SigningTranscriptWithRng<T, R> where
    T: SigningTranscript,
    R: Rng + CryptoRng
[src]

fn proto_name(&mut self, label: &'static [u8])[src]

Extend transcript with a protocol name

fn commit_point(
    &mut self,
    label: &'static [u8],
    compressed: &CompressedRistretto
)
[src]

Extend the transcript with a compressed Ristretto point

fn challenge_scalar(&mut self, label: &'static [u8]) -> Scalar[src]

Produce the public challenge scalar e.

fn witness_scalar(&self, label: &'static [u8], nonce_seeds: &[&[u8]]) -> Scalar[src]

Produce a secret witness scalar k, aka nonce, from the protocol transcript and any "nonce seeds" kept with the secret keys. Read more

Auto Trait Implementations

impl<T, R> Send for SigningTranscriptWithRng<T, R> where
    R: Send,
    T: Send

impl<T, R> !Sync for SigningTranscriptWithRng<T, R>

impl<T, R> Unpin for SigningTranscriptWithRng<T, R> where
    R: Unpin,
    T: Unpin

impl<T, R> UnwindSafe for SigningTranscriptWithRng<T, R> where
    R: UnwindSafe,
    T: UnwindSafe

impl<T, R> !RefUnwindSafe for SigningTranscriptWithRng<T, R>

Blanket Implementations

impl<T> VRFSigningTranscript for T where
    T: SigningTranscript
[src]

type T = T

Real underlying SigningTranscript

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self