Skip to content

Conversation

@dignifiedquire
Copy link
Member

@dignifiedquire dignifiedquire commented Jan 6, 2026

@dignifiedquire dignifiedquire changed the title fix: do not panic on a prime being 1 fix: do not panic on a prime being 1 when loading a secret key Jan 6, 2026
// Check that Πprimes == n.
let mut m = BigUint::one();
for prime in &self.primes {
// Any primes ≤ 1 will cause divide-by-zero panics later.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment could perhaps say that 0 and 1 are not prime numbers, but...

@dignifiedquire dignifiedquire merged commit 2926c91 into 0-9-x Jan 6, 2026
9 checks passed
@dignifiedquire dignifiedquire deleted the 0-9-fix-invalid-prime branch January 6, 2026 14:58
mbfm added a commit to eclipse-opendut/opendut that referenced this pull request Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants