Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
makavity authored May 22, 2023
2 parents 0d86bf2 + b2e2818 commit 607beaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions primeorder/src/affine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,11 @@ where
}
sec1::Coordinates::Uncompressed { x, y } => {
C::FieldElement::from_repr(*y).and_then(|y| {
Self::decompress(x, y.is_odd())
.and_then(|point| CtOption::new(point, point.y.ct_eq(&y)))
C::FieldElement::from_repr(*x).and_then(|x| {
let lhs = y * &y;
let rhs = x * &x * &x + &(C::EQUATION_A * &x) + &C::EQUATION_B;
CtOption::new(Self { x, y, infinity: 0 }, lhs.ct_eq(&rhs))
})
})
}
}
Expand Down

0 comments on commit 607beaf

Please sign in to comment.