diff --git a/crypto/dkg/src/frost.rs b/crypto/dkg/src/frost.rs index 0bc7ac7a..8884a9b2 100644 --- a/crypto/dkg/src/frost.rs +++ b/crypto/dkg/src/frost.rs @@ -151,6 +151,7 @@ impl KeyGenMachine { } fn polynomial(coefficients: &[Zeroizing], l: u16) -> Zeroizing { + assert!(l != 0, "attempting to evaluate a polynomial with 0"); let l = F::from(u64::from(l)); let mut share = Zeroizing::new(F::zero()); for (idx, coefficient) in coefficients.iter().rev().enumerate() {