From f93dd4ccf5980e58109849788f955e1522dab909 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Tue, 21 Feb 2017 15:11:24 -0800 Subject: [PATCH] Use is_identity() in the torsion subgroup tests. ht @dconnolly for pointing this out --- src/constants.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/constants.rs b/src/constants.rs index f12861a..2f57e0e 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -1573,6 +1573,7 @@ mod test { use curve::CompressedEdwardsY; use curve::ExtendedPoint; use curve::Identity; + use curve::IsIdentity; use curve::ValidityCheck; use constants; @@ -1584,7 +1585,7 @@ mod test { for i in 0..8 { let Q = constants::EIGHT_TORSION[i].mult_by_pow_2(3); assert!(Q.is_valid()); - assert!(Q.compress() == compressed_id); + assert!(Q.is_identity()); } } @@ -1596,7 +1597,7 @@ mod test { for i in (0..8).filter(|i| i % 2 == 0) { let Q = constants::EIGHT_TORSION[i].mult_by_pow_2(2); assert!(Q.is_valid()); - assert!(Q.compress() == compressed_id); + assert!(Q.is_identity()); } } @@ -1608,7 +1609,7 @@ mod test { for i in (0..8).filter(|i| i % 4 == 0) { let Q = constants::EIGHT_TORSION[i].mult_by_pow_2(1); assert!(Q.is_valid()); - assert!(Q.compress() == compressed_id); + assert!(Q.is_identity()); } }