summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/SecT163FieldElement.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-08-13 18:20:55 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-08-13 18:20:55 +0700
commitdbbd073f7c5081b5e92b1ba685142ea9ff4faeab (patch)
treeecd528a9233212f6e074fe53def9ae58e0126a57 /crypto/src/math/ec/custom/sec/SecT163FieldElement.cs
parentSwitch from lookup table to bit twiddling (diff)
downloadBouncyCastle.NET-ed25519-dbbd073f7c5081b5e92b1ba685142ea9ff4faeab.tar.xz
Use Itoh-Tsujii inversion (with extended bases for some cases)
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecT163FieldElement.cs')
-rw-r--r--crypto/src/math/ec/custom/sec/SecT163FieldElement.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecT163FieldElement.cs b/crypto/src/math/ec/custom/sec/SecT163FieldElement.cs
index 3ab383a1d..c7a0b5639 100644
--- a/crypto/src/math/ec/custom/sec/SecT163FieldElement.cs
+++ b/crypto/src/math/ec/custom/sec/SecT163FieldElement.cs
@@ -152,8 +152,9 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
 
         public override ECFieldElement Invert()
         {
-            return new SecT163FieldElement(
-                AbstractF2mCurve.Inverse(163, new int[] { 3, 6, 7 }, ToBigInteger()));
+            ulong[] z = Nat192.Create64();
+            SecT163Field.Invert(x, z);
+            return new SecT163FieldElement(z);
         }
 
         public override ECFieldElement Sqrt()