summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/SecP224R1FieldElement.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2020-07-07 19:17:41 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2020-07-07 19:17:41 +0700
commitc43f275ac1aca8af3010dd4d94efa1511ca18f42 (patch)
tree9ebad3642950a439b0bbdd70229bc895f4730b48 /crypto/src/math/ec/custom/sec/SecP224R1FieldElement.cs
parentEC updates from bc-java (diff)
downloadBouncyCastle.NET-ed25519-c43f275ac1aca8af3010dd4d94efa1511ca18f42.tar.xz
Fermat inversion for all custom curves
- also customized random FE gen
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecP224R1FieldElement.cs')
-rw-r--r--crypto/src/math/ec/custom/sec/SecP224R1FieldElement.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecP224R1FieldElement.cs b/crypto/src/math/ec/custom/sec/SecP224R1FieldElement.cs
index e44b4f7b7..bb60edaf6 100644
--- a/crypto/src/math/ec/custom/sec/SecP224R1FieldElement.cs
+++ b/crypto/src/math/ec/custom/sec/SecP224R1FieldElement.cs
@@ -94,7 +94,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
         {
             //return Multiply(b.Invert());
             uint[] z = Nat224.Create();
-            Mod.Invert(SecP224R1Field.P, ((SecP224R1FieldElement)b).x, z);
+            SecP224R1Field.Inv(((SecP224R1FieldElement)b).x, z);
             SecP224R1Field.Multiply(z, x, z);
             return new SecP224R1FieldElement(z);
         }
@@ -117,7 +117,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
         {
             //return new SecP224R1FieldElement(ToBigInteger().ModInverse(Q));
             uint[] z = Nat224.Create();
-            Mod.Invert(SecP224R1Field.P, x, z);
+            SecP224R1Field.Inv(x, z);
             return new SecP224R1FieldElement(z);
         }
 
@@ -259,7 +259,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
 
                 if (Nat224.IsZero(d1))
                 {
-                    Mod.Invert(SecP224R1Field.P, e0, t);
+                    SecP224R1Field.Inv(e0, t);
                     SecP224R1Field.Multiply(t, d0, t);
                     return true;
                 }