diff options
author | Jack Lloyd <[email protected]> | 2018-12-02 16:14:48 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-12-02 16:14:48 -0500 |
commit | cc5ca964d2b05d055e698bd109db5fa0ada33b2b (patch) | |
tree | 5f99dfd0e6fa0d9d2d569bb1581eb3edb95d9e41 /src/tests/data/bn/divide.vec | |
parent | 7bc0745c3ff2824f9a3607db19e7e1a3e563c5bc (diff) |
Add a const-time division algorithm
It is stupid and slow (~50-100x slower than variable time version) but
still useful for protecting critical algorithms.
Not currently used, waiting for OSS-Fuzz to test it for a while before
we commit to it.
Diffstat (limited to 'src/tests/data/bn/divide.vec')
-rw-r--r-- | src/tests/data/bn/divide.vec | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/data/bn/divide.vec b/src/tests/data/bn/divide.vec index a5470f41d..f1220561e 100644 --- a/src/tests/data/bn/divide.vec +++ b/src/tests/data/bn/divide.vec @@ -1,8 +1,16 @@ [Division] +In1 = 0 +In2 = 5 +Output = 0 + In1 = 0x1234567 In2 = 0x103 Output = 73701 +In1 = -0x1234567 +In2 = 0x103 +Output = -73702 + In1 = 0x100000000000000000000000000000000000000000000000000000000000000000000000 In2 = 0x1000000000000000000000000000000000000000000000000000000000000000000000 Output = 0x100 |