summary refs log tree commit diff
path: root/crypto/src/math/ec/ECCurve.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/math/ec/ECCurve.cs')
-rw-r--r--crypto/src/math/ec/ECCurve.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/crypto/src/math/ec/ECCurve.cs b/crypto/src/math/ec/ECCurve.cs
index 2b193ba06..3861dc4cb 100644
--- a/crypto/src/math/ec/ECCurve.cs
+++ b/crypto/src/math/ec/ECCurve.cs
@@ -700,9 +700,12 @@ namespace Org.BouncyCastle.Math.EC
             if (isInternal)
             {
                 this.m_q = q;
-                knownQs.add(q);
+                if (!knownQs.Contains(q))
+                {
+                    knownQs.Add(q, q);
+                }
             }
-            else if (knownQs.contains(q))
+            else if (knownQs.Contains(q))
             {
                 this.m_q = q;
             }
@@ -718,7 +721,7 @@ namespace Org.BouncyCastle.Math.EC
                 }
 
                 if (Primes.HasAnySmallFactors(q) || !Primes.IsMRProbablePrime(
-                    q, random, getNumberOfIterations(qBitLength, certainty)))
+                    q, random, GetNumberOfIterations(qBitLength, certainty)))
                 {
                     throw new ArgumentException("Fp q value not prime");
                 }