Skip to content

Commit 6740ef7

Browse files
committed
Remove unnecessary checks from CompressedEdwardsY::decompress()
1 parent 912d939 commit 6740ef7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ed448-goldilocks/src/edwards/extended.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,10 @@ impl CompressedEdwardsY {
236236
///
237237
/// Returns `None`:
238238
/// - if the input is not the \\(y\\)-coordinate of a curve point.
239-
/// - if the input point is not on the curve.
240239
/// - if the input point has nonzero torsion component.
241240
pub fn decompress(&self) -> CtOption<EdwardsPoint> {
242241
self.decompress_unchecked()
243-
.and_then(|pt| CtOption::new(pt, pt.is_on_curve() & pt.is_torsion_free()))
242+
.and_then(|pt| CtOption::new(pt, pt.is_torsion_free()))
244243
}
245244

246245
/// View this `CompressedEdwardsY` as an array of bytes.

0 commit comments

Comments
 (0)