Function schnorrkel::context::attach_rng
source ยท pub fn attach_rng<T, R>(t: T, rng: R) -> SigningTranscriptWithRng<T, R>
Expand description
Attach a CryptoRng
to a SigningTranscript
to replace 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 vulnerable when derandomized.