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 42c74d4 commit 502ef51Copy full SHA for 502ef51
ed448-goldilocks/src/field/element.rs
@@ -263,12 +263,8 @@ impl FieldElement {
263
}
264
265
/// Inverts a field element
266
- /// Previous chain length: 462, new length 460
267
pub fn invert(&self) -> Self {
268
- const INV_EXP: U448 = U448::from_be_hex(
269
- "fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffffffffffffffffffffffffd",
270
- );
271
- Self(self.0.pow(&INV_EXP))
+ Self(self.0.invert().unwrap_or(ConstMontyType::default()))
272
273
274
pub fn square(&self) -> Self {
0 commit comments