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.
ConstMontyForm::invert()
pow()
1 parent 912d939 commit 23b10ffCopy full SHA for 23b10ff
ed448-goldilocks/src/field/element.rs
@@ -264,10 +264,7 @@ impl FieldElement {
264
/// Inverts a field element
265
/// Previous chain length: 462, new length 460
266
pub fn invert(&self) -> Self {
267
- const INV_EXP: U448 = U448::from_be_hex(
268
- "fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffffffffffffffffffffffffd",
269
- );
270
- Self(self.0.pow(&INV_EXP))
+ Self(self.0.invert().unwrap_or(ConstMontyType::default()))
271
}
272
273
pub fn square(&self) -> Self {
0 commit comments