diff options
-rw-r--r-- | src/lib/pubkey/rsa/rsa.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/pubkey/rsa/rsa.cpp b/src/lib/pubkey/rsa/rsa.cpp index ec3c35ef1..d7d6a939e 100644 --- a/src/lib/pubkey/rsa/rsa.cpp +++ b/src/lib/pubkey/rsa/rsa.cpp @@ -375,7 +375,12 @@ class RSA_Public_Operation m_monty_n(std::make_shared<Montgomery_Params>(m_n)) {} - size_t get_max_input_bits() const { return (m_n.bits() - 1); } + size_t get_max_input_bits() const + { + const size_t n_bits = m_n.bits(); + BOTAN_ASSERT_NOMSG(n_bits >= 384); + return n_bits - 1; + } protected: BigInt public_op(const BigInt& m) const |