Browse Source

`identity` -> `zero` for `Affine`

master
Pratyush Mishra 2 years ago
parent
commit
4fbdc2b6a5
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/groups/curves/short_weierstrass/mod.rs
  2. +1
    -1
      src/groups/curves/short_weierstrass/non_zero_affine.rs

+ 1
- 1
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()),

+ 1
- 1
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);

Loading…
Cancel
Save