summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/SecP256K1Field.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2020-09-11 11:54:39 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2020-09-11 11:54:39 +0700
commit5e4ffd78e073bf15b255c1465fa211a13105b65c (patch)
tree7d3d23488573a45cb31dd3477ee9995b49523f2c /crypto/src/math/ec/custom/sec/SecP256K1Field.cs
parentFurther Divsteps30 improvement (diff)
downloadBouncyCastle.NET-ed25519-5e4ffd78e073bf15b255c1465fa211a13105b65c.tar.xz
Fixed loop count for BigInteger conversion
- remove length-specific variants of FromBigInteger
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecP256K1Field.cs')
-rw-r--r--crypto/src/math/ec/custom/sec/SecP256K1Field.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecP256K1Field.cs b/crypto/src/math/ec/custom/sec/SecP256K1Field.cs
index acdb1f362..9a8915c01 100644
--- a/crypto/src/math/ec/custom/sec/SecP256K1Field.cs
+++ b/crypto/src/math/ec/custom/sec/SecP256K1Field.cs
@@ -53,7 +53,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
 
         public static uint[] FromBigInteger(BigInteger x)
         {
-            uint[] z = Nat256.FromBigInteger(x);
+            uint[] z = Nat.FromBigInteger(256, x);
             if (z[7] == P7 && Nat256.Gte(z, P))
             {
                 Nat256.SubFrom(P, z);