summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/SecP521R1FieldElement.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--crypto/src/math/ec/custom/sec/SecP521R1FieldElement.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecP521R1FieldElement.cs b/crypto/src/math/ec/custom/sec/SecP521R1FieldElement.cs
index e47a199f3..83a615928 100644
--- a/crypto/src/math/ec/custom/sec/SecP521R1FieldElement.cs
+++ b/crypto/src/math/ec/custom/sec/SecP521R1FieldElement.cs
@@ -136,7 +136,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
             SecP521R1Field.SquareN(x1, 519, t1);
             SecP521R1Field.Square(t1, t2);
 
-            return Arrays.AreEqual(x1, t2) ? new SecP521R1FieldElement(t1) : null;
+            return Nat.Eq(17, x1, t2) ? new SecP521R1FieldElement(t1) : null;
         }
 
         public override bool Equals(object obj)
@@ -155,12 +155,12 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
                 return true;
             if (null == other)
                 return false;
-            return Arrays.AreEqual(x, other.x);
+            return Nat.Eq(17, x, other.x);
         }
 
         public override int GetHashCode()
         {
-            return Q.GetHashCode() ^ Arrays.GetHashCode(x);
+            return Q.GetHashCode() ^ Arrays.GetHashCode(x, 0, 17);
         }
     }
 }