mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-07-30 20:11:23 +00:00
Constant-time field square root
WARNING: THIS IS NOT FULLY CONSTANT TIME YET! This will be fixed once we migrate to the jubjub and bls12_381 crates.
This commit is contained in:
@@ -1025,8 +1025,9 @@ mod test {
|
||||
let x = Fr::random(rng);
|
||||
let s: bool = rng.next_u32() % 2 != 0;
|
||||
|
||||
if let Some(p) = montgomery::Point::<Bls12, _>::get_for_x(x, s, params) {
|
||||
break p;
|
||||
let p = montgomery::Point::<Bls12, _>::get_for_x(x, s, params);
|
||||
if p.is_some().into() {
|
||||
break p.unwrap();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1034,8 +1035,9 @@ mod test {
|
||||
let x = Fr::random(rng);
|
||||
let s: bool = rng.next_u32() % 2 != 0;
|
||||
|
||||
if let Some(p) = montgomery::Point::<Bls12, _>::get_for_x(x, s, params) {
|
||||
break p;
|
||||
let p = montgomery::Point::<Bls12, _>::get_for_x(x, s, params);
|
||||
if p.is_some().into() {
|
||||
break p.unwrap();
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user