summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/SecT409Field.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2019-07-31 17:42:12 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2019-07-31 17:42:12 +0700
commite7e89cce762e32917c1eef745b05da636ed03bbb (patch)
tree063c1ad6b42b21b0c10afc8ed173a4675f286e13 /crypto/src/math/ec/custom/sec/SecT409Field.cs
parentFix CMP tests failing to set body (diff)
downloadBouncyCastle.NET-ed25519-e7e89cce762e32917c1eef745b05da636ed03bbb.tar.xz
Accept only properly-sized BigInteger (no auto-reduction)
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecT409Field.cs')
-rw-r--r--crypto/src/math/ec/custom/sec/SecT409Field.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecT409Field.cs b/crypto/src/math/ec/custom/sec/SecT409Field.cs
index 861b77aa1..f9962de5b 100644
--- a/crypto/src/math/ec/custom/sec/SecT409Field.cs
+++ b/crypto/src/math/ec/custom/sec/SecT409Field.cs
@@ -42,9 +42,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
 
         public static ulong[] FromBigInteger(BigInteger x)
         {
-            ulong[] z = Nat448.FromBigInteger64(x);
-            Reduce39(z, 0);
-            return z;
+            return Nat.FromBigInteger64(409, x);
         }
 
         public static void Invert(ulong[] x, ulong[] z)