diff --git a/src/edwards.rs b/src/edwards.rs index c60069c..d8f83a5 100644 --- a/src/edwards.rs +++ b/src/edwards.rs @@ -192,9 +192,7 @@ impl CompressedEdwardsY { // Flip the sign of X if it's not correct let compressed_sign_bit = Choice::from(self.as_bytes()[31] >> 7); - let current_sign_bit = X.is_negative(); - - X.conditional_negate(current_sign_bit ^ compressed_sign_bit); + X.conditional_negate(compressed_sign_bit); Some(EdwardsPoint{ X: X, Y: Y, Z: Z, T: &X * &Y }) }