Function schnorrkel::context::attach_rng
source · [−]pub fn attach_rng<T, R>(t: T, rng: R) -> SigningTranscriptWithRng<T, R> where
T: SigningTranscript,
R: RngCore + CryptoRng,
Expand description
Attach a CryptoRng
to a SigningTranscript
to repalce the default ThreadRng
There are tricks like attach_rng(t,ChaChaRng::from_seed([0u8; 32]))
for deterministic tests. We warn against doing this in production
however because, although such derandomization produces secure Schnorr
signatures, we do implement protocols here like multi-signatures which
likely become vulnerabile when derandomized.