Fix is_zero for twisted Edwards curves (#101)

* fix the te is_zero

* update CHANGELOG

Co-authored-by: onewayfunc <onewayfunc@gmail.com>
This commit is contained in:
Weikeng Chen
2022-09-03 19:20:07 -07:00
committed by GitHub
parent 6512e48540
commit 6b1cfd5396
3 changed files with 3 additions and 1 deletions

View File

@@ -423,7 +423,7 @@ where
}
fn is_zero(&self) -> Result<Boolean<<P::BaseField as Field>::BasePrimeField>, SynthesisError> {
self.x.is_zero()?.and(&self.x.is_one()?)
self.x.is_zero()?.and(&self.y.is_one()?)
}
#[tracing::instrument(target = "r1cs", skip(cs, f))]