Struct schnorrkel::context::SigningTranscriptWithRng
source · [−]pub struct SigningTranscriptWithRng<T, R> where
T: SigningTranscript,
R: RngCore + CryptoRng, { /* private fields */ }
Expand description
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: RngCore + CryptoRng,
impl<T, R> SigningTranscript for SigningTranscriptWithRng<T, R> where
T: SigningTranscript,
R: RngCore + CryptoRng,
Extend transcript with some bytes, shadowed by merlin::Transcript
.
Produce some challenge bytes, shadowed by merlin::Transcript
.
Produce secret witness bytes from the protocol transcript and any “nonce seeds” kept with the secret keys. Read more
Produce secret witness bytes from the protocol transcript and any “nonce seeds” kept with the secret keys. Read more
Extend transcript with a protocol name
Extend the transcript with a compressed Ristretto point
Produce the public challenge scalar e
.