aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/data
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-01 13:06:31 -0500
committerJack Lloyd <[email protected]>2018-12-01 13:06:31 -0500
commitbe796a3f30d4bec1af7c0e6770a0397dca6ccd4a (patch)
tree0b2607f4193a899c4012e3072f4a71e9d17128e4 /src/tests/data
parent5cc1b897edf52a2037004bae28291c67c966c320 (diff)
Correct a bug in BigInt::operator%(word)
If reducing a negative number modulo a power of 2, an incorrect result would be returned. This only affected the versions taking a single word as the modulo.
Diffstat (limited to 'src/tests/data')
-rw-r--r--src/tests/data/bn/mod.vec12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tests/data/bn/mod.vec b/src/tests/data/bn/mod.vec
index fe6492e64..2d4196dbe 100644
--- a/src/tests/data/bn/mod.vec
+++ b/src/tests/data/bn/mod.vec
@@ -19,6 +19,18 @@ In1 = -0xE
In2 = 0x7
Output = 0x0
+In1 = -15
+In2 = 7
+Output = 6
+
+In1 = -15
+In2 = 8
+Output = 1
+
+In1 = -15
+In2 = 128
+Output = 113
+
In1 = 0x0
In2 = 0x1E8D2D00
Output = 0x0