diff --git a/crates/vdf/src/create_discriminant.rs b/crates/vdf/src/create_discriminant.rs index 6824100..4b10225 100644 --- a/crates/vdf/src/create_discriminant.rs +++ b/crates/vdf/src/create_discriminant.rs @@ -112,7 +112,7 @@ pub fn create_discriminant(seed: &[u8], length: u16) -> T { if !x { let q = u64::from(M) * u64::from(i as u32); n = n + q; - if n.probab_prime(2) { + if n.probab_prime(1) { return -n; } n = n - q; diff --git a/crates/vdf/src/proof_wesolowski.rs b/crates/vdf/src/proof_wesolowski.rs index d4f46a3..8f867a3 100644 --- a/crates/vdf/src/proof_wesolowski.rs +++ b/crates/vdf/src/proof_wesolowski.rs @@ -119,7 +119,7 @@ fn hash_prime(seed: &[&[u8]]) -> T { hasher.input(i); } let n = T::from(&hasher.fixed_result()[..16]); - if n.probab_prime(2) { + if n.probab_prime(1) { break n; } j += 1;