Commit f7cbb8a4 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

rsa/rsa_ossl.c: fix and extend commentary [skip ci].



Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
Reviewed-by: default avatarNicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/7123)

(cherry picked from commit d1c008f6)
parent d39b2774
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -655,10 +655,11 @@ static int rsa_ossl_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;