mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Add 'static/Send/Sync to specific traits in crypto
These were proven necessary by our real world usage.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user