diff options
author | Jack Lloyd <[email protected]> | 2018-12-03 07:21:38 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-12-03 08:01:27 -0500 |
commit | 5607904f92490ad80b736423a879e3024aa45d94 (patch) | |
tree | 2edca0a85f05b8b12d476371cd57aea730a196f4 /src/lib/math/bigint/bigint.h | |
parent | 10cde6b85d018979fd94fc1c83f27758f4b134b6 (diff) |
Make binary extended Euclidean algorithm less branchy
This is still leaky, but much less than before.
Diffstat (limited to 'src/lib/math/bigint/bigint.h')
-rw-r--r-- | src/lib/math/bigint/bigint.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/math/bigint/bigint.h b/src/lib/math/bigint/bigint.h index 46e0cd250..f0aa04391 100644 --- a/src/lib/math/bigint/bigint.h +++ b/src/lib/math/bigint/bigint.h @@ -689,6 +689,11 @@ class BOTAN_PUBLIC_API(2,0) BigInt final */ void ct_cond_swap(bool predicate, BigInt& other); + /** + * If predicate is true flip the sign of *this + */ + void cond_flip_sign(bool predicate); + #if defined(BOTAN_HAS_VALGRIND) void const_time_poison() const; void const_time_unpoison() const; |