diff options
Diffstat (limited to 'src/lib/math')
-rw-r--r-- | src/lib/math/bigint/big_io.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/ec_gfp/point_gfp.cpp | 4 | ||||
-rw-r--r-- | src/lib/math/mp/mp_misc.cpp | 2 | ||||
-rw-r--r-- | src/lib/math/numbertheory/numthry.cpp | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/math/bigint/big_io.cpp b/src/lib/math/bigint/big_io.cpp index 3e66f788d..779f8ccb7 100644 --- a/src/lib/math/bigint/big_io.cpp +++ b/src/lib/math/bigint/big_io.cpp @@ -19,7 +19,7 @@ std::ostream& operator<<(std::ostream& stream, const BigInt& n) if(stream.flags() & std::ios::hex) base = BigInt::Hexadecimal; else if(stream.flags() & std::ios::oct) - throw std::runtime_error("Octal output of BigInt not supported"); + throw Exception("Octal output of BigInt not supported"); if(n == 0) stream.write("0", 1); diff --git a/src/lib/math/ec_gfp/point_gfp.cpp b/src/lib/math/ec_gfp/point_gfp.cpp index c81c4ee5a..93508ba55 100644 --- a/src/lib/math/ec_gfp/point_gfp.cpp +++ b/src/lib/math/ec_gfp/point_gfp.cpp @@ -323,7 +323,7 @@ Blinded_Point_Multiply::Blinded_Point_Multiply(const PointGFp& base, const BigIn { // Upper bound is a sanity check rather than hard limit if(m_h < 1 || m_h > 8) - throw std::invalid_argument("Blinded_Point_Multiply invalid h param"); + throw Invalid_Argument("Blinded_Point_Multiply invalid h param"); const CurveGFp& curve = base.get_curve(); @@ -362,7 +362,7 @@ PointGFp Blinded_Point_Multiply::blinded_multiply(const BigInt& scalar_in, RandomNumberGenerator& rng) { if(scalar_in.is_negative()) - throw std::invalid_argument("Blinded_Point_Multiply scalar must be positive"); + throw Invalid_Argument("Blinded_Point_Multiply scalar must be positive"); #if BOTAN_POINTGFP_SCALAR_BLINDING_BITS > 0 // Choose a small mask m and use k' = k + m*order (Coron's 1st countermeasure) diff --git a/src/lib/math/mp/mp_misc.cpp b/src/lib/math/mp/mp_misc.cpp index 542b0509e..adf4a0a6b 100644 --- a/src/lib/math/mp/mp_misc.cpp +++ b/src/lib/math/mp/mp_misc.cpp @@ -43,7 +43,7 @@ s32bit bigint_cmp(const word x[], size_t x_size, word bigint_divop(word n1, word n0, word d) { if(d == 0) - throw std::runtime_error("bigint_divop divide by zero"); + throw Exception("bigint_divop divide by zero"); word high = n1 % d, quotient = 0; diff --git a/src/lib/math/numbertheory/numthry.cpp b/src/lib/math/numbertheory/numthry.cpp index 900e61724..31dd72feb 100644 --- a/src/lib/math/numbertheory/numthry.cpp +++ b/src/lib/math/numbertheory/numthry.cpp @@ -177,7 +177,7 @@ BigInt inverse_mod(const BigInt& n, const BigInt& mod) word monty_inverse(word input) { if(input == 0) - throw std::runtime_error("monty_inverse: divide by zero"); + throw Exception("monty_inverse: divide by zero"); word b = input; word x2 = 1, x1 = 0, y2 = 0, y1 = 1; |