aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2020-11-05 05:54:39 -0500
committerJack Lloyd <[email protected]>2020-11-05 06:52:14 -0500
commit55fa3685c5053d66533a7a9e0f08403ffa95b323 (patch)
tree1e2e143c1e27ebfe7c9cbd6a096b6bbec7fcecbc /src/cli
parent69b3ceb1602d22addf2a171e8edbf0134df9fe7c (diff)
Some math deprecations
Mostly things that shouldn't be used (like almost Montgomery inverse, which isn't even constant time) or are very much just for internals (like the word-wise Montgomery inverse computation used for reduction). Make variable time division explicit; leaves plain divide as a call but it forwards to ct_divide now. All callers within the library are now explicitly consttime or vartime. Add a shortcut for modulus by one word - this hits quite often especially in the ECC code
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/speed.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp
index 0ef453311..b8454d2a7 100644
--- a/src/cli/speed.cpp
+++ b/src/cli/speed.cpp
@@ -1356,7 +1356,7 @@ class Speed final : public Command
y.randomize(rng(), q_bits);
div_timer->start();
- Botan::divide(x, y, q1, r1);
+ Botan::vartime_divide(x, y, q1, r1);
div_timer->stop();
ct_div_timer->start();
@@ -1395,7 +1395,7 @@ class Speed final : public Command
x.randomize(rng(), n_bits);
div_timer->start();
- Botan::divide(x, ten, q1, r1);
+ Botan::vartime_divide(x, ten, q1, r1);
div_timer->stop();
ct_div_timer->start();