aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/data
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-02 18:16:40 -0500
committerJack Lloyd <[email protected]>2018-12-02 18:16:40 -0500
commit1670af4bdf6b5139fa218377fa8761e2c4ea0e4a (patch)
treeb38ace599215af3b83aa5614d42b40e565c26701 /src/tests/data
parent1e47ce9a3ad995d7a5207e8d741ea9dfa4a68626 (diff)
Add a constant time divide variant for dividing by uint8_t
Originally wrote it for div-by-word but that ends up requiring a dword type which we don't always have. And uint8_t covers the most important cases of n = 10 and n = 58 (whenever I get around to writing base58). We could portably support up to div-by-uint32, but I don't think we need it. Nicely for n = 10, this is actually faster than the variable time division.
Diffstat (limited to 'src/tests/data')
-rw-r--r--src/tests/data/bn/divide.vec4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tests/data/bn/divide.vec b/src/tests/data/bn/divide.vec
index f1220561e..0a6dd2423 100644
--- a/src/tests/data/bn/divide.vec
+++ b/src/tests/data/bn/divide.vec
@@ -159,3 +159,7 @@ In1 = 0x123F71E77499975C79EE4C4F7B275A4410863CEDC3E244724D5AF83A8A2DD73C5D5913E9
In2 = 0x78B294AD98589FDCC2D53FCB0FC9F0E70E4E30323832D5669F66E15
Output = 0x26B426C03F76F97048D5DE0B8D9DBD02F4DC
+In1 = 1996953214196350189568
+In2 = 13331618315827609940
+Output = 149
+