From 4fbdc2b6a5c27aebd7210b34fa25575309494cdf Mon Sep 17 00:00:00 2001 From: Pratyush Mishra Date: Fri, 9 Sep 2022 16:28:49 -0700 Subject: [PATCH] `identity` -> `zero` for `Affine` --- src/groups/curves/short_weierstrass/mod.rs | 2 +- src/groups/curves/short_weierstrass/non_zero_affine.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/groups/curves/short_weierstrass/mod.rs b/src/groups/curves/short_weierstrass/mod.rs index 4088f4d..91eae94 100644 --- a/src/groups/curves/short_weierstrass/mod.rs +++ b/src/groups/curves/short_weierstrass/mod.rs @@ -209,7 +209,7 @@ where let (x, y, z) = match f() { Ok(ge) => { let ge = ge.into_affine(); - if ge.is_identity() { + if ge.is_zero() { ( Ok(P::BaseField::zero()), Ok(P::BaseField::one()), diff --git a/src/groups/curves/short_weierstrass/non_zero_affine.rs b/src/groups/curves/short_weierstrass/non_zero_affine.rs index 1c83c3c..8578702 100644 --- a/src/groups/curves/short_weierstrass/non_zero_affine.rs +++ b/src/groups/curves/short_weierstrass/non_zero_affine.rs @@ -75,7 +75,7 @@ where .double() .into_affine(); // Panic if the result is zero. - assert!(!result.is_identity()); + assert!(!result.is_zero()); Ok(Self::new(F::constant(result.x), F::constant(result.y))) } else { let (x1, y1) = (&self.x, &self.y);