summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/SecT571Field.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/SecT571Field.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/SecT571Field.cs')
-rw-r--r--crypto/src/math/ec/custom/sec/SecT571Field.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecT571Field.cs b/crypto/src/math/ec/custom/sec/SecT571Field.cs
index 98f4f7fc2..9596aa5af 100644
--- a/crypto/src/math/ec/custom/sec/SecT571Field.cs
+++ b/crypto/src/math/ec/custom/sec/SecT571Field.cs
@@ -57,9 +57,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
 
         public static ulong[] FromBigInteger(BigInteger x)
         {
-            ulong[] z = Nat576.FromBigInteger64(x);
-            Reduce5(z, 0);
-            return z;
+            return Nat.FromBigInteger64(571, x);
         }
 
         public static void Invert(ulong[] x, ulong[] z)