Skip to content

Commit

Permalink
Simplify Choice logic in Ristretto decompression
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed May 30, 2023
1 parent 0ab2281 commit 32893c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ristretto.rs
Expand Up @@ -307,7 +307,7 @@ impl CompressedRistretto {
// t == ((1+as²) sqrt(4s²/(ad(1+as²)² - (1-as²)²)))/(1-as²)
let t = &x * &y;

if (!ok).into() || t.is_negative().into() || y.is_zero().into() {
if (!ok | t.is_negative() | y.is_zero()).into() {
None
} else {
Some(RistrettoPoint(EdwardsPoint {
Expand Down

0 comments on commit 32893c3

Please sign in to comment.