diff options
author | Jack Lloyd <[email protected]> | 2018-04-15 17:49:20 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-04-15 17:49:20 -0400 |
commit | f425705104cf01b30ac8f0c155f96b82fa93124d (patch) | |
tree | e710b29285992687c5789361e5205af6caceb741 /src/lib/math/bigint/bigint.cpp | |
parent | 4fdc3ee1922df17bcb3a2ecdbd17e4494fe3d661 (diff) |
Add const time annotations
Diffstat (limited to 'src/lib/math/bigint/bigint.cpp')
-rw-r--r-- | src/lib/math/bigint/bigint.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/math/bigint/bigint.cpp b/src/lib/math/bigint/bigint.cpp index fd967e66e..8874195af 100644 --- a/src/lib/math/bigint/bigint.cpp +++ b/src/lib/math/bigint/bigint.cpp @@ -335,6 +335,18 @@ void BigInt::shrink_to_fit(size_t min_size) m_reg.resize(words); } +#if defined(BOTAN_HAS_VALGRIND) +void BigInt::const_time_poison() const + { + CT::poison(m_reg.data(), m_reg.size()); + } + +void BigInt::const_time_unpoison() const + { + CT::unpoison(m_reg.data(), m_reg.size()); + } +#endif + void BigInt::const_time_lookup(secure_vector<word>& output, const std::vector<BigInt>& vec, size_t idx) |