diff options
author | Andy Polyakov <appro@openssl.org> | 2018-09-05 14:33:21 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2018-10-12 22:38:10 +0200 |
commit | b1016c96dbb7a8d9b724f34656e0b2aae9e54cfe (patch) | |
tree | c28c48d7088a74d9c317e9e4f28743d0467cf5e9 /crypto/rsa | |
parent | 6be3286fee187edb3c133910c6ec27d21a75976b (diff) |
rsa/rsa_ossl.c: fix and extend commentary [skip ci].
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/7123)
(cherry picked from commit d1c008f66bad435b18aa45aa59f72bed7c682849)
Diffstat (limited to 'crypto/rsa')
-rw-r--r-- | crypto/rsa/rsa_eay.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/rsa/rsa_eay.c b/crypto/rsa/rsa_eay.c index 1bb121fa9d..be948a4cf8 100644 --- a/crypto/rsa/rsa_eay.c +++ b/crypto/rsa/rsa_eay.c @@ -783,10 +783,11 @@ static int RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) */ || !bn_mod_sub_fixed_top(r1, r1, m1, rsa->p) - /* r0 = r0 * iqmp mod p */ + /* r1 = r1 * iqmp mod p */ || !bn_to_mont_fixed_top(r1, r1, rsa->_method_mod_p, ctx) || !bn_mul_mont_fixed_top(r1, r1, rsa->iqmp, rsa->_method_mod_p, ctx) + /* r0 = r1 * q + m1 */ || !bn_mul_fixed_top(r0, r1, rsa->q, ctx) || !bn_mod_add_fixed_top(r0, r0, m1, rsa->n)) goto err; |