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 b633546 commit ff17407Copy full SHA for ff17407
ed448-goldilocks/src/field/element.rs
@@ -332,12 +332,8 @@ impl FieldElement {
332
}
333
334
/// Inverts a field element
335
- /// Previous chain length: 462, new length 460
336
pub fn invert(&self) -> Self {
337
- const INV_EXP: U448 = U448::from_be_hex(
338
- "fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffffffffffffffffffffffffd",
339
- );
340
- Self(self.0.pow(&INV_EXP))
+ Self(self.0.invert().unwrap_or(ConstMontyType::default()))
341
342
343
pub fn square(&self) -> Self {
0 commit comments