remove temp gcd variable
This commit is contained in:
parent
72176084b0
commit
b7cc408f58
1 changed files with 1 additions and 3 deletions
|
@ -60,10 +60,8 @@ fn euclid(a: &BigUint, b: &BigUint) -> BigUint {
|
||||||
|
|
||||||
fn find_e(phi: &BigUint) -> BigUint {
|
fn find_e(phi: &BigUint) -> BigUint {
|
||||||
let mut e = thread_rng().gen_biguint_range(&1u32.into(), phi);
|
let mut e = thread_rng().gen_biguint_range(&1u32.into(), phi);
|
||||||
let mut g = gcd(&e, phi);
|
while gcd(&e, phi) != 1u32.into() {
|
||||||
while g != 1u32.into() {
|
|
||||||
e = thread_rng().gen_biguint_range(&1u32.into(), phi);
|
e = thread_rng().gen_biguint_range(&1u32.into(), phi);
|
||||||
g = gcd(&e, phi);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
e
|
e
|
||||||
|
|
Loading…
Reference in a new issue