Home | History | Annotate | Download | only in rsa

Lines Matching defs:ap

737     RSA_additional_prime *ap =
740 BN_with_flags(exp, ap->exp, BN_FLG_CONSTTIME);
741 BN_with_flags(prime, ap->prime, BN_FLG_CONSTTIME);
749 !BN_MONT_CTX_set_locked(&ap->mont, &rsa->lock, prime, ctx)) {
753 if (!rsa->meth->bn_mod_exp(m1, r1, exp, prime, ctx, ap->mont)) {
760 !BN_mul(m1, m1, ap->coeff, ctx) ||
763 !BN_mul(m1, m1, ap->r, ctx) ||
846 RSA_additional_prime *ap = OPENSSL_malloc(sizeof(RSA_additional_prime));
847 if (ap == NULL) {
850 memset(ap, 0, sizeof(RSA_additional_prime));
851 ap->prime = BN_new();
852 ap->exp = BN_new();
853 ap->coeff = BN_new();
854 ap->r = BN_new();
855 if (ap->prime == NULL ||
856 ap->exp == NULL ||
857 ap->coeff == NULL ||
858 ap->r == NULL ||
859 !sk_RSA_additional_prime_push(additional_primes, ap)) {
860 RSA_additional_prime_free(ap);
947 RSA_additional_prime *ap =
953 if (!BN_generate_prime_ex(ap->prime, prime_bits, 0, NULL, NULL, cb)) {
956 if (BN_cmp(rsa->p, ap->prime) == 0 ||
957 BN_cmp(rsa->q, ap->prime) == 0) {
963 ap->prime) == 0) {
971 if (!BN_sub(r2, ap->prime, BN_value_one()) ||
987 if (!BN_mul(r1, rsa->n, ap->prime, ctx)) {
999 /* ap->r is is the product of all the primes prior to the current one
1001 if (!BN_copy(ap->r, rsa->n)) {
1010 } else if (!BN_mul(rsa->n, rsa->n, ap->prime, ctx)) {
1036 RSA_additional_prime *ap =
1038 if (!BN_sub(r3, ap->prime, BN_value_one()) ||
1072 RSA_additional_prime *ap =
1074 if (!BN_sub(ap->exp, ap->prime, BN_value_one()) ||
1075 !BN_mod(ap->exp, rsa->d, ap->exp, ctx) ||
1076 !BN_mod_inverse(ap->coeff, ap->r, ap->prime, ctx)) {