mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Fix the known instance of #295
This commit is contained in:
@@ -26,6 +26,9 @@ pub mod tests;
|
||||
/// Various errors possible during signing.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Error)]
|
||||
pub enum FrostError {
|
||||
#[error("internal error: {0}")]
|
||||
InternalError(&'static str),
|
||||
|
||||
#[error("invalid participant (0 < participant <= {0}, yet participant is {1})")]
|
||||
InvalidParticipant(u16, Participant),
|
||||
#[error("invalid signing set ({0})")]
|
||||
|
||||
@@ -516,6 +516,8 @@ impl<C: Curve, A: Algorithm<C>> SignatureMachine<A::Signature> for AlgorithmSign
|
||||
}
|
||||
|
||||
// If everyone has a valid share, and there were enough participants, this should've worked
|
||||
panic!("everyone had a valid share yet the signature was still invalid");
|
||||
// The only known way to cause this, for valid parameters/algorithms, is to deserialize a
|
||||
// semantically invalid FrostKeys
|
||||
Err(FrostError::InternalError("everyone had a valid share yet the signature was still invalid"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user