Add 'static/Send/Sync to specific traits in crypto

These were proven necessary by our real world usage.
This commit is contained in:
Luke Parker
2023-03-07 02:38:47 -05:00
parent 2729882d65
commit 0bbf511062
3 changed files with 10 additions and 8 deletions

View File

@@ -89,7 +89,7 @@ impl<C: Curve, A: Addendum> Writable for Preprocess<C, A> {
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<C: Curve> SignatureShare<C> {
}
/// Trait for the second machine of a two-round signing protocol.
pub trait SignMachine<S>: Sized {
pub trait SignMachine<S>: 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<C: Curve, A: Algorithm<C>> SignMachine<A::Signature> for AlgorithmSignMachi
}
/// Trait for the final machine of a two-round signing protocol.
pub trait SignatureMachine<S> {
pub trait SignatureMachine<S>: Send {
/// SignatureShare message for this machine.
type SignatureShare: Clone + PartialEq + Writable;