bn/bn_exp.c: harmonize BN_mod_exp_mont_consttime with negative input.
authorAndy Polyakov <appro@openssl.org>
Sun, 5 Nov 2017 19:35:47 +0000 (20:35 +0100)
committerAndy Polyakov <appro@openssl.org>
Fri, 17 Nov 2017 11:12:19 +0000 (12:12 +0100)
commitc1ec4db33d0a0d95b1d7ff1cf0536df768e7c790
treee34355a84a4bd76d80c635a90a57264329561b19
parent899e62d1866bc108f488f74e85dcc5a0d6e7ca99
bn/bn_exp.c: harmonize BN_mod_exp_mont_consttime with negative input.

All exponentiation subroutines but BN_mod_exp_mont_consttime produce
non-negative result for negative input, which is confusing for fuzzer.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/4676)
crypto/bn/bn_exp.c