summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-02-01 11:36:32 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-02-01 11:36:32 +0700
commit30be9a8adbb937be7bd7d416d631f99086ecab03 (patch)
tree6f00873ad21e3ad8519b32e13f34a0811dd019f0
parentMake Dec/Inc/IncExt methods work at the full length and change assertions acc... (diff)
downloadBouncyCastle.NET-ed25519-30be9a8adbb937be7bd7d416d631f99086ecab03.tar.xz
Fix Nat*.Gte methods
-rw-r--r--crypto/src/math/ec/Nat.cs4
-rw-r--r--crypto/src/math/ec/custom/sec/Nat192.cs4
-rw-r--r--crypto/src/math/ec/custom/sec/Nat256.cs4
3 files changed, 6 insertions, 6 deletions
diff --git a/crypto/src/math/ec/Nat.cs b/crypto/src/math/ec/Nat.cs
index 1ddcb1609..e20304dd6 100644
--- a/crypto/src/math/ec/Nat.cs
+++ b/crypto/src/math/ec/Nat.cs
@@ -153,7 +153,7 @@ namespace Org.BouncyCastle.Math.EC
                 if (x_i > y_i)
                     return true;
             }
-            return false;
+            return true;
         }
 
         public static bool GteExt(int len, uint[] xx, uint[] yy)
@@ -167,7 +167,7 @@ namespace Org.BouncyCastle.Math.EC
                 if (xx_i > yy_i)
                     return true;
             }
-            return false;
+            return true;
         }
 
         public static uint Inc(int len, uint[] z, int zOff)
diff --git a/crypto/src/math/ec/custom/sec/Nat192.cs b/crypto/src/math/ec/custom/sec/Nat192.cs
index 22f79c9d3..b2f29221c 100644
--- a/crypto/src/math/ec/custom/sec/Nat192.cs
+++ b/crypto/src/math/ec/custom/sec/Nat192.cs
@@ -180,7 +180,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
                 if (x_i > y_i)
                     return true;
             }
-            return false;
+            return true;
         }
 
         public static bool GteExt(uint[] xx, uint[] yy)
@@ -193,7 +193,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
                 if (xx_i > yy_i)
                     return true;
             }
-            return false;
+            return true;
         }
 
         public static uint Inc(uint[] z, int zOff)
diff --git a/crypto/src/math/ec/custom/sec/Nat256.cs b/crypto/src/math/ec/custom/sec/Nat256.cs
index b0326716a..40e287b9b 100644
--- a/crypto/src/math/ec/custom/sec/Nat256.cs
+++ b/crypto/src/math/ec/custom/sec/Nat256.cs
@@ -198,7 +198,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
                 if (x_i > y_i)
                     return true;
             }
-            return false;
+            return true;
         }
 
         public static bool GteExt(uint[] xx, uint[] yy)
@@ -211,7 +211,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
                 if (xx_i > yy_i)
                     return true;
             }
-            return false;
+            return true;
         }
 
         public static uint Inc(uint[] z, int zOff)