We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e741815 commit 22a5c09Copy full SHA for 22a5c09
ed448-goldilocks/src/edwards/affine.rs
@@ -114,7 +114,7 @@ impl AffinePoint {
114
// See https://www.rfc-editor.org/rfc/rfc7748#section-4.2 4-isogeny maps
115
pub fn to_montgomery_x(&self) -> MontgomeryXpoint {
116
// u = y^2/x^2
117
- let u = self.y.square() * self.x.square().invert();
+ let u = (self.y * self.x.invert()).square();
118
119
MontgomeryXpoint(u.to_bytes())
120
}
@@ -123,7 +123,7 @@ impl AffinePoint {
123
124
pub fn to_montgomery(&self) -> MontgomeryPoint {
125
126
- // v = (2 - x^2 - y^2)*y/x^3)
+ // v = (2 - x^2 - y^2)*y/x^3
127
128
// Optimized to one inversion:
129
// x_inv = x^-1
0 commit comments