aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/numbertheory/monty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/math/numbertheory/monty.cpp')
-rw-r--r--src/lib/math/numbertheory/monty.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/math/numbertheory/monty.cpp b/src/lib/math/numbertheory/monty.cpp
index b91560fd5..61a10eae5 100644
--- a/src/lib/math/numbertheory/monty.cpp
+++ b/src/lib/math/numbertheory/monty.cpp
@@ -13,7 +13,7 @@ namespace Botan {
Montgomery_Params::Montgomery_Params(const BigInt& p,
const Modular_Reducer& mod_p)
{
- if(p.is_negative() || p.is_even())
+ if(p.is_even() || p < 3)
throw Invalid_Argument("Montgomery_Params invalid modulus");
m_p = p;