summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/SecP256R1FieldElement.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2019-08-10 00:18:41 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2019-08-10 00:18:41 +0700
commit36cf0ee10f38735f771d477368e384eae607f6d0 (patch)
treec04aed6ce1497acc8366a564f62a6d01de8510d4 /crypto/src/math/ec/custom/sec/SecP256R1FieldElement.cs
parentAdd and use IntValueExact properties (diff)
downloadBouncyCastle.NET-ed25519-36cf0ee10f38735f771d477368e384eae607f6d0.tar.xz
Fix circular dependence of statics
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecP256R1FieldElement.cs')
-rw-r--r--crypto/src/math/ec/custom/sec/SecP256R1FieldElement.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecP256R1FieldElement.cs b/crypto/src/math/ec/custom/sec/SecP256R1FieldElement.cs
index 808e99ea6..be4021485 100644
--- a/crypto/src/math/ec/custom/sec/SecP256R1FieldElement.cs
+++ b/crypto/src/math/ec/custom/sec/SecP256R1FieldElement.cs
@@ -2,13 +2,15 @@
 
 using Org.BouncyCastle.Math.Raw;
 using Org.BouncyCastle.Utilities;
+using Org.BouncyCastle.Utilities.Encoders;
 
 namespace Org.BouncyCastle.Math.EC.Custom.Sec
 {
     internal class SecP256R1FieldElement
         : AbstractFpFieldElement
     {
-        public static readonly BigInteger Q = SecP256R1Curve.q;
+        public static readonly BigInteger Q = new BigInteger(1,
+            Hex.Decode("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"));
 
         protected internal readonly uint[] x;