mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Remove Clone from ClsagMultisigMask{Sender, Receiver}
This had ill-defined properties on Clone, as a mask could be sent multiple times (unintended) and multiple algorithms may receive the same mask from a singular sender. Requires removing the Clone bound within modular-frost and expanding the test helpers accordingly. This was not raised in the audit yet upon independent review.
This commit is contained in:
@@ -47,7 +47,7 @@ impl<T: Writable> Writable for Vec<T> {
|
||||
}
|
||||
|
||||
// Pairing of an Algorithm with a ThresholdKeys instance.
|
||||
#[derive(Clone, Zeroize)]
|
||||
#[derive(Zeroize)]
|
||||
struct Params<C: Curve, A: Algorithm<C>> {
|
||||
// Skips the algorithm due to being too large a bound to feasibly enforce on users
|
||||
#[zeroize(skip)]
|
||||
@@ -193,7 +193,7 @@ impl<C: Curve> SignatureShare<C> {
|
||||
/// Trait for the second machine of a two-round signing protocol.
|
||||
pub trait SignMachine<S>: Send + Sync + Sized {
|
||||
/// Params used to instantiate this machine which can be used to rebuild from a cache.
|
||||
type Params: Clone;
|
||||
type Params;
|
||||
/// Keys used for signing operations.
|
||||
type Keys;
|
||||
/// Preprocess message for this machine.
|
||||
@@ -397,7 +397,7 @@ impl<C: Curve, A: Algorithm<C>> SignMachine<A::Signature> for AlgorithmSignMachi
|
||||
|
||||
Ok((
|
||||
AlgorithmSignatureMachine {
|
||||
params: self.params.clone(),
|
||||
params: self.params,
|
||||
view,
|
||||
B,
|
||||
Rs,
|
||||
|
||||
Reference in New Issue
Block a user