diff --git a/crypto/ciphersuite/src/lib.rs b/crypto/ciphersuite/src/lib.rs index ab5a0a4b..fde5306c 100644 --- a/crypto/ciphersuite/src/lib.rs +++ b/crypto/ciphersuite/src/lib.rs @@ -42,7 +42,9 @@ mod ed448; pub use ed448::*; /// Unified trait defining a ciphersuite around an elliptic curve. -pub trait Ciphersuite: Clone + Copy + PartialEq + Eq + Debug + Zeroize { +pub trait Ciphersuite: + 'static + Send + Sync + Clone + Copy + PartialEq + Eq + Debug + Zeroize +{ /// Scalar field element type. // This is available via G::Scalar yet `C::G::Scalar` is ambiguous, forcing horrific accesses type F: PrimeField + PrimeFieldBits + Zeroize; diff --git a/crypto/frost/src/algorithm.rs b/crypto/frost/src/algorithm.rs index ca6108dc..43a11a3d 100644 --- a/crypto/frost/src/algorithm.rs +++ b/crypto/frost/src/algorithm.rs @@ -21,11 +21,11 @@ impl WriteAddendum for () { } /// Trait alias for the requirements to be used as an addendum. -pub trait Addendum: Clone + PartialEq + Debug + WriteAddendum {} -impl Addendum for A {} +pub trait Addendum: Send + Clone + PartialEq + Debug + WriteAddendum {} +impl Addendum for A {} /// Algorithm trait usable by the FROST signing machine to produce signatures.. -pub trait Algorithm: Clone { +pub trait Algorithm: Send + Clone { /// The transcript format this algorithm uses. This likely should NOT be the IETF-compatible /// transcript included in this crate. type Transcript: Clone + Debug + Transcript; @@ -120,7 +120,7 @@ mod sealed { pub(crate) use sealed::IetfTranscript; /// HRAm usable by the included Schnorr signature algorithm to generate challenges. -pub trait Hram: Clone { +pub trait Hram: Send + Clone { /// HRAm function to generate a challenge. /// H2 from the IETF draft, despite having a different argument set (not being pre-formatted). #[allow(non_snake_case)] diff --git a/crypto/frost/src/sign.rs b/crypto/frost/src/sign.rs index 9634b161..089c82c3 100644 --- a/crypto/frost/src/sign.rs +++ b/crypto/frost/src/sign.rs @@ -89,7 +89,7 @@ impl Writable for Preprocess { pub struct CachedPreprocess(pub Zeroizing<[u8; 32]>); /// Trait for the initial state machine of a two-round signing protocol. -pub trait PreprocessMachine { +pub trait PreprocessMachine: Send { /// Preprocess message for this machine. type Preprocess: Clone + PartialEq + Writable; /// Signature produced by this machine. @@ -203,7 +203,7 @@ impl SignatureShare { } /// Trait for the second machine of a two-round signing protocol. -pub trait SignMachine: Sized { +pub trait SignMachine: Send + Sized { /// Params used to instantiate this machine which can be used to rebuild from a cache. type Params: Clone; /// Keys used for signing operations. @@ -436,7 +436,7 @@ impl> SignMachine for AlgorithmSignMachi } /// Trait for the final machine of a two-round signing protocol. -pub trait SignatureMachine { +pub trait SignatureMachine: Send { /// SignatureShare message for this machine. type SignatureShare: Clone + PartialEq + Writable;