diff options
author | Jack Lloyd <[email protected]> | 2018-12-03 05:29:30 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-12-03 06:19:25 -0500 |
commit | df80fe302dd08f2de74a888cc4ae157f1f2bfa2c (patch) | |
tree | 1fea8d2524da39160665667399527cfb21e3aeac /src/lib/math/bigint/bigint.h | |
parent | 8fa5b4f7d50f48b673be3eb17a335ac1d18de0df (diff) |
Add ct_modulo and BigInt::ct_cond_swap
Diffstat (limited to 'src/lib/math/bigint/bigint.h')
-rw-r--r-- | src/lib/math/bigint/bigint.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/math/bigint/bigint.h b/src/lib/math/bigint/bigint.h index 64f81765a..46e0cd250 100644 --- a/src/lib/math/bigint/bigint.h +++ b/src/lib/math/bigint/bigint.h @@ -681,7 +681,13 @@ class BOTAN_PUBLIC_API(2,0) BigInt final * If predicate is true assign other to *this * Uses a masked operation to avoid side channels */ - void ct_cond_assign(bool predicate, BigInt& other); + void ct_cond_assign(bool predicate, const BigInt& other); + + /** + * If predicate is true swap *this and other + * Uses a masked operation to avoid side channels + */ + void ct_cond_swap(bool predicate, BigInt& other); #if defined(BOTAN_HAS_VALGRIND) void const_time_poison() const; |