Skip to content

Commit f2e53be

Browse files
Montgomery cannot use TE affine as intermediate representations (#103)
* debug * test * use mont * reduce the delta Co-authored-by: onewayfunc <[email protected]>
1 parent 2416780 commit f2e53be

File tree

1 file changed

+3
-3
lines changed
  • src/groups/curves/twisted_edwards

1 file changed

+3
-3
lines changed

src/groups/curves/twisted_edwards/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub struct MontgomeryAffineVar<
3838

3939
mod montgomery_affine_impl {
4040
use super::*;
41-
use ark_ec::twisted_edwards::Affine as GroupAffine;
41+
use ark_ec::twisted_edwards::MontgomeryAffine as GroupAffine;
4242
use ark_ff::Field;
4343
use core::ops::Add;
4444

@@ -83,8 +83,8 @@ mod montgomery_affine_impl {
8383
pub fn from_edwards_to_coords(
8484
p: &TEAffine<P>,
8585
) -> Result<(P::BaseField, P::BaseField), SynthesisError> {
86-
let montgomery_point: GroupAffine<P> = if p.y == P::BaseField::one() {
87-
GroupAffine::identity()
86+
let montgomery_point: GroupAffine<P::MontCurveConfig> = if p.y == P::BaseField::one() {
87+
return Err(SynthesisError::UnexpectedIdentity);
8888
} else if p.x == P::BaseField::zero() {
8989
GroupAffine::new(P::BaseField::zero(), P::BaseField::zero())
9090
} else {

0 commit comments

Comments
 (0)