if (rsa->dmp1 == NULL)
rsa->dmp1 = BN_secure_new();
if (rsa->dmp1 == NULL)
- goto err;
+ goto err;
BN_set_flags(rsa->dmp1, BN_FLG_CONSTTIME);
if (!BN_mod(rsa->dmp1, rsa->d, p1, ctx))
goto err;
if (rsa->dmq1 == NULL)
rsa->dmq1 = BN_secure_new();
if (rsa->dmq1 == NULL)
- goto err;
+ goto err;
BN_set_flags(rsa->dmq1, BN_FLG_CONSTTIME);
if (!BN_mod(rsa->dmq1, rsa->d, q1, ctx))
goto err;
BN_free(rsa->iqmp);
rsa->iqmp = BN_secure_new();
if (rsa->iqmp == NULL)
- goto err;
+ goto err;
BN_set_flags(rsa->iqmp, BN_FLG_CONSTTIME);
if (BN_mod_inverse(rsa->iqmp, rsa->q, rsa->p, ctx) == NULL)
goto err;
BN_set_flags(k, BN_FLG_CONSTTIME);
ret = (BN_set_word(k, 2)
- && BN_mod_exp(tmp, k, rsa->e, rsa->n, ctx)
- && BN_mod_exp(tmp, tmp, rsa->d, rsa->n, ctx)
- && BN_cmp(k, tmp) == 0);
+ && BN_mod_exp(tmp, k, rsa->e, rsa->n, ctx)
+ && BN_mod_exp(tmp, tmp, rsa->d, rsa->n, ctx)
+ && BN_cmp(k, tmp) == 0);
if (ret == 0)
ERR_raise(ERR_LIB_RSA, RSA_R_PAIRWISE_TEST_FAILURE);
err: