Skip to content

Commit 525e94b

Browse files
committed
Use is_negative() directly
1 parent 7cff72f commit 525e94b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ed448-goldilocks/src/field/element.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ impl FieldElement {
418418
let e = b * c;
419419

420420
let mut a = n * e;
421-
a.conditional_negate(!Choice::from(a.0.retrieve().bit(0)) ^ square);
421+
a.conditional_negate(!a.is_negative() ^ square);
422422

423423
let c = e * ONE_MINUS_TWO_D;
424424
let b = c.square();

0 commit comments

Comments
 (0)