aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/numbertheory
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-02-01 12:37:11 -0500
committerJack Lloyd <[email protected]>2016-02-01 13:06:10 -0500
commit87a59dd0ea8a783540d30bb697b4c86d9b66f7ee (patch)
treebf2c62842fe9c945bbb6a2546340a51506170fce /src/lib/math/numbertheory
parentfb22198b9add1f1d46d6b05cc8626b7a8d8ff9c6 (diff)
Fix two bugs in 1.11.27 which caused test failures.1.11.28
The check on each individual size in curve_mul is too strict since we rely on redc(x*1) during the on the curve computation. Fix an off by one in ressol which caused it to occasionally reject valid values. Updating version 1.11.28 since existing 1.11.27 tag already pushed :( Fix an off-by-one in ressol which would cause it to occasionly give up too early.
Diffstat (limited to 'src/lib/math/numbertheory')
-rw-r--r--src/lib/math/numbertheory/ressol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/math/numbertheory/ressol.cpp b/src/lib/math/numbertheory/ressol.cpp
index 875d054c3..127dc899e 100644
--- a/src/lib/math/numbertheory/ressol.cpp
+++ b/src/lib/math/numbertheory/ressol.cpp
@@ -66,7 +66,7 @@ BigInt ressol(const BigInt& a, const BigInt& p)
q = mod_p.square(q);
++i;
- if(s >= i)
+ if(i > s)
{
return -BigInt(1);
}