diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-08-13 18:20:55 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-08-13 18:20:55 +0700 |
commit | dbbd073f7c5081b5e92b1ba685142ea9ff4faeab (patch) | |
tree | ecd528a9233212f6e074fe53def9ae58e0126a57 /crypto/src/math/ec/custom/sec/SecT571FieldElement.cs | |
parent | Switch from lookup table to bit twiddling (diff) | |
download | BouncyCastle.NET-ed25519-dbbd073f7c5081b5e92b1ba685142ea9ff4faeab.tar.xz |
Use Itoh-Tsujii inversion (with extended bases for some cases)
Diffstat (limited to '')
-rw-r--r-- | crypto/src/math/ec/custom/sec/SecT571FieldElement.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecT571FieldElement.cs b/crypto/src/math/ec/custom/sec/SecT571FieldElement.cs index a26e1e336..5d5458412 100644 --- a/crypto/src/math/ec/custom/sec/SecT571FieldElement.cs +++ b/crypto/src/math/ec/custom/sec/SecT571FieldElement.cs @@ -152,8 +152,9 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec public override ECFieldElement Invert() { - return new SecT571FieldElement( - AbstractF2mCurve.Inverse(571, new int[] { 2, 5, 10 }, ToBigInteger())); + ulong[] z = Nat576.Create64(); + SecT571Field.Invert(x, z); + return new SecT571FieldElement(z); } public override ECFieldElement Sqrt() |