aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi
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/lib/ffi
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/lib/ffi')
-rw-r--r--src/lib/ffi/ffi_mp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ffi/ffi_mp.cpp b/src/lib/ffi/ffi_mp.cpp
index 513dbbb0c..68869e6ec 100644
--- a/src/lib/ffi/ffi_mp.cpp
+++ b/src/lib/ffi/ffi_mp.cpp
@@ -192,7 +192,7 @@ int botan_mp_div(botan_mp_t quotient,
{
return BOTAN_FFI_DO(Botan::BigInt, quotient, q, {
Botan::BigInt r;
- Botan::divide(safe_get(x), safe_get(y), q, r);
+ Botan::vartime_divide(safe_get(x), safe_get(y), q, r);
safe_get(remainder) = r;
});
}