Skip to content

Commit 2791151

Browse files
committed
Bump crypto-bigint to 0.5.4
1 parent 6b069b6 commit 2791151

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ categories = ["cryptography", "no-std"]
1010
rust-version = "1.65"
1111

1212
[dependencies]
13-
crypto-bigint = { version = "0.5.2", default-features = false, features = ["rand_core"] }
13+
crypto-bigint = { version = "0.5.4", default-features = false, features = ["rand_core"] }
1414
rand_core = { version = "0.6.4", default-features = false }
1515
openssl = { version = "0.10.39", optional = true, features = ["vendored"] }
1616
rug = { version = "1.18", default-features = false, features = ["integer"], optional = true }

src/hazmat/lucas.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl LucasBase for SelfridgeBase {
6060
}
6161

6262
if attempts >= ATTEMPTS_BEFORE_SQRT {
63-
let sqrt_n = n.sqrt();
63+
let sqrt_n = n.sqrt_vartime();
6464
if &sqrt_n.wrapping_mul(&sqrt_n) == n {
6565
return Err(Primality::Composite);
6666
}
@@ -137,7 +137,7 @@ impl LucasBase for BruteForceBase {
137137
}
138138

139139
if attempts >= ATTEMPTS_BEFORE_SQRT {
140-
let sqrt_n = n.sqrt();
140+
let sqrt_n = n.sqrt_vartime();
141141
if &sqrt_n.wrapping_mul(&sqrt_n) == n {
142142
return Err(Primality::Composite);
143143
}

0 commit comments

Comments
 (0)