pub fn new_with_synthetic_nonces<H, R>() -> MuSig<H, Synthetic<H, GlobalRng<R>>>
where H: Tag + Digest<OutputSize = U32> + Default + Clone, R: RngCore + Default + Clone,
Expand description

Constructor for a MuSig instance using synthetic nonce generation.

Sythetic nonce generation mixes in external randomness into nonce generation which means you don’t need a unique session id for each signing session to guarantee security. The disadvantage is that you may have to store and recall somehow the nonces generated from MuSig::seed_nonce_rng.

use schnorr_fun::musig;
let musig = musig::new_with_synthetic_nonces::<sha2::Sha256, rand::rngs::ThreadRng>();