Home
last modified time | relevance | path

Searched refs:dmp1 (Results 1 – 25 of 52) sorted by relevance

123

/netbsd/crypto/external/bsd/heimdal/dist/lib/hcrypto/
H A Drsa-gmp.c91 mpz_powm(vp, vp, dmp1, p); in rsa_private_calculate()
298 mpz_t p, q, dmp1, dmq1, iqmp; in gmp_rsa_private_encrypt() local
302 BN2mpz(dmp1, rsa->dmp1); in gmp_rsa_private_encrypt()
310 mpz_clear(dmp1); in gmp_rsa_private_encrypt()
366 mpz_t p, q, dmp1, dmq1, iqmp; in gmp_rsa_private_decrypt() local
370 BN2mpz(dmp1, rsa->dmp1); in gmp_rsa_private_decrypt()
378 mpz_clear(dmp1); in gmp_rsa_private_decrypt()
460 mpz_init(dmp1); in gmp_rsa_generate_key()
509 mpz_mod(dmp1, d, t1); in gmp_rsa_generate_key()
522 rsa->dmp1 = mpz2BN(dmp1); in gmp_rsa_generate_key()
[all …]
H A Drsa-tfm.c64 fp_int * dmp1, fp_int * dmq1, fp_int * iqmp, in tfm_rsa_private_calculate() argument
74 fp_exptmod(&u, dmp1, p, &vp); in tfm_rsa_private_calculate()
274 fp_int p, q, dmp1, dmq1, iqmp; in tfm_rsa_private_encrypt() local
278 BN2mpz(&dmp1, rsa->dmp1); in tfm_rsa_private_encrypt()
284 fp_zero_multi(&p, &q, &dmp1, &dmq1, &iqmp, NULL); in tfm_rsa_private_encrypt()
345 fp_int p, q, dmp1, dmq1, iqmp; in tfm_rsa_private_decrypt() local
349 BN2mpz(&dmp1, rsa->dmp1); in tfm_rsa_private_decrypt()
355 fp_zero_multi(&p, &q, &dmp1, &dmq1, &iqmp, NULL); in tfm_rsa_private_decrypt()
509 fp_mod(&d, &t1, &dmp1); in tfm_rsa_generate_key()
522 rsa->dmp1 = mpz2BN(&dmp1); in tfm_rsa_generate_key()
[all …]
H A Drsa-ltm.c106 mp_int * dmp1, mp_int * dmq1, mp_int * iqmp, in ltm_rsa_private_calculate() argument
116 mp_exptmod(&u, dmp1, p, &vp); in ltm_rsa_private_calculate()
341 mp_int p, q, dmp1, dmq1, iqmp; in ltm_rsa_private_encrypt() local
343 mp_init_multi(&p, &q, &dmp1, &dmq1, &iqmp, NULL); in ltm_rsa_private_encrypt()
347 BN2mpz(&dmp1, rsa->dmp1); in ltm_rsa_private_encrypt()
429 mp_int p, q, dmp1, dmq1, iqmp; in ltm_rsa_private_decrypt() local
435 BN2mpz(&dmp1, rsa->dmp1); in ltm_rsa_private_decrypt()
531 &dmp1, &dmq1, &iqmp, in ltm_rsa_generate_key()
582 mp_mod(&d, &t1, &dmp1); in ltm_rsa_generate_key()
595 rsa->dmp1 = mpz2BN(&dmp1); in ltm_rsa_generate_key()
[all …]
H A Drsa.c160 free_if(rsa->dmp1); in RSA_free()
278 (rsa->p == NULL || rsa->q || rsa->dmp1 == NULL || rsa->dmq1 == NULL || rsa->iqmp == NULL)) in RSA_check_key()
568 k->dmp1 = _hc_integer_to_BN(&data.exponent1, NULL); in d2i_RSAPrivateKey()
574 k->q == NULL || k->dmp1 == NULL || k->dmq1 == NULL || k->iqmp == NULL) in d2i_RSAPrivateKey()
591 rsa->q == NULL || rsa->dmp1 == NULL || rsa->dmq1 == NULL || in i2d_RSAPrivateKey()
602 ret |= _hc_BN_to_integer(rsa->dmp1, &data.exponent1); in i2d_RSAPrivateKey()
/netbsd/crypto/external/bsd/openssl.old/dist/crypto/rsa/
H A Drsa_lib.c133 BN_clear_free(r->dmp1); in RSA_free()
230 int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) in RSA_set0_crt_params() argument
235 if ((r->dmp1 == NULL && dmp1 == NULL) in RSA_set0_crt_params()
240 if (dmp1 != NULL) { in RSA_set0_crt_params()
241 BN_clear_free(r->dmp1); in RSA_set0_crt_params()
242 r->dmp1 = dmp1; in RSA_set0_crt_params()
243 BN_set_flags(r->dmp1, BN_FLG_CONSTTIME); in RSA_set0_crt_params()
377 const BIGNUM **dmp1, const BIGNUM **dmq1, in RSA_get0_crt_params() argument
380 if (dmp1 != NULL) in RSA_get0_crt_params()
381 *dmp1 = r->dmp1; in RSA_get0_crt_params()
[all …]
H A Drsa_ossl.c315 (rsa->dmp1 != NULL) && (rsa->dmq1 != NULL) && (rsa->iqmp != NULL))) { in rsa_ossl_private_encrypt()
437 (rsa->dmp1 != NULL) && (rsa->dmq1 != NULL) && (rsa->iqmp != NULL))) { in rsa_ossl_private_decrypt()
686 || !BN_mod_exp_mont_consttime(r1, r1, rsa->dmp1, rsa->p, ctx, in rsa_ossl_mod_exp()
750 BIGNUM *dmp1 = BN_new(); in rsa_ossl_mod_exp() local
751 if (dmp1 == NULL) in rsa_ossl_mod_exp()
753 BN_with_flags(dmp1, rsa->dmp1, BN_FLG_CONSTTIME); in rsa_ossl_mod_exp()
756 if (!rsa->meth->bn_mod_exp(r0, r1, dmp1, rsa->p, ctx, in rsa_ossl_mod_exp()
758 BN_free(dmp1); in rsa_ossl_mod_exp()
762 BN_free(dmp1); in rsa_ossl_mod_exp()
H A Drsa_x931g.c116 rsa->dmp1 = BN_new(); in RSA_X931_derive_ex()
117 if (rsa->dmp1 == NULL) in RSA_X931_derive_ex()
119 if (!BN_mod(rsa->dmp1, rsa->d, r1, ctx)) in RSA_X931_derive_ex()
/netbsd/external/mpl/bind/dist/lib/dns/
H A Dopensslrsa_link.c120 if ((r->dmp1 == NULL && dmp1 == NULL) || in RSA_set0_crt_params()
127 if (dmp1 != NULL) { in RSA_set0_crt_params()
128 BN_free(r->dmp1); in RSA_set0_crt_params()
129 r->dmp1 = dmp1; in RSA_set0_crt_params()
170 if (dmp1 != NULL) { in RSA_get0_crt_params()
171 *dmp1 = r->dmp1; in RSA_get0_crt_params()
783 if (dmp1 != NULL) { in opensslrsa_tofile()
786 BN_bn2bin(dmp1, bufs[i]); in opensslrsa_tofile()
1036 dmp1 = bn; in opensslrsa_parse()
1070 if (dmp1 != NULL) { in opensslrsa_parse()
[all …]
/netbsd/crypto/external/bsd/openssl.old/dist/test/
H A Drsa_test.c42 BN_bin2bn(dmp1, sizeof(dmp1)-1, NULL), \
76 static unsigned char dmp1[] = in key1() local
122 static unsigned char dmp1[] = in key2() local
183 static unsigned char dmp1[] = in key3() local
H A Drsa_mp_test.c85 static const unsigned char dmp1[] = in key2048p3() local
148 BN_bin2bn(dmp1, sizeof(dmp1) - 1, NULL), in key2048p3()
/netbsd/crypto/external/bsd/openssl/dist/test/
H A Drsa_test.c41 BN_bin2bn(dmp1, sizeof(dmp1)-1, NULL), \
75 static unsigned char dmp1[] = in key1() local
121 static unsigned char dmp1[] = in key2() local
182 static unsigned char dmp1[] = in key3() local
H A Drsa_mp_test.c91 static const unsigned char dmp1[] = variable
162 BN_bin2bn(dmp1, sizeof(dmp1) - 1, NULL), in key2048p3_v1()
219 if (!TEST_ptr(num = BN_bin2bn(dmp1, sizeof(dmp1) - 1, NULL)) in key2048p3_v2()
H A Drsa_sp800_56b_test.c305 && TEST_BN_eq_word(key->dmp1, DP) in test_check_crt_components()
310 && TEST_true(BN_set_word(key->dmp1, 1)) in test_check_crt_components()
312 && TEST_true(BN_set_word(key->dmp1, P-1)) in test_check_crt_components()
314 && TEST_true(BN_set_word(key->dmp1, DP)) in test_check_crt_components()
328 && TEST_true(BN_set_word(key->dmp1, DP+1)) in test_check_crt_components()
330 && TEST_true(BN_set_word(key->dmp1, DP)) in test_check_crt_components()
/netbsd/crypto/external/bsd/openssl/dist/crypto/rsa/
H A Drsa_sp800_56b_gen.c285 if (rsa->dmp1 == NULL) in ossl_rsa_sp800_56b_derive_params_from_pq()
286 rsa->dmp1 = BN_secure_new(); in ossl_rsa_sp800_56b_derive_params_from_pq()
287 if (rsa->dmp1 == NULL) in ossl_rsa_sp800_56b_derive_params_from_pq()
289 BN_set_flags(rsa->dmp1, BN_FLG_CONSTTIME); in ossl_rsa_sp800_56b_derive_params_from_pq()
290 if (!BN_mod(rsa->dmp1, rsa->d, p1, ctx)) in ossl_rsa_sp800_56b_derive_params_from_pq()
325 BN_free(rsa->dmp1); in ossl_rsa_sp800_56b_derive_params_from_pq()
326 rsa->dmp1 = NULL; in ossl_rsa_sp800_56b_derive_params_from_pq()
H A Drsa_lib.c163 BN_clear_free(r->dmp1); in RSA_free()
444 int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) in RSA_set0_crt_params() argument
449 if ((r->dmp1 == NULL && dmp1 == NULL) in RSA_set0_crt_params()
454 if (dmp1 != NULL) { in RSA_set0_crt_params()
455 BN_clear_free(r->dmp1); in RSA_set0_crt_params()
456 r->dmp1 = dmp1; in RSA_set0_crt_params()
457 BN_set_flags(r->dmp1, BN_FLG_CONSTTIME); in RSA_set0_crt_params()
597 const BIGNUM **dmp1, const BIGNUM **dmq1, in RSA_get0_crt_params() argument
600 if (dmp1 != NULL) in RSA_get0_crt_params()
601 *dmp1 = r->dmp1; in RSA_get0_crt_params()
[all …]
H A Drsa_gen.c139 if (!rsa->dmp1 && ((rsa->dmp1 = BN_secure_new()) == NULL)) in rsa_multiprime_keygen()
141 BN_set_flags(rsa->dmp1, BN_FLG_CONSTTIME); in rsa_multiprime_keygen()
365 if (!BN_mod(rsa->dmp1, d, r1, ctx) in rsa_multiprime_keygen()
457 BN_clear_free(rsa->dmp1); in rsa_keygen()
463 rsa->dmp1 = NULL; in rsa_keygen()
H A Drsa_ossl.c322 (rsa->dmp1 != NULL) && (rsa->dmq1 != NULL) && (rsa->iqmp != NULL))) { in rsa_ossl_private_encrypt()
447 (rsa->dmp1 != NULL) && (rsa->dmq1 != NULL) && (rsa->iqmp != NULL))) { in rsa_ossl_private_decrypt()
703 r1, r1, rsa->dmp1, rsa->p, in rsa_ossl_mod_exp()
768 BIGNUM *dmp1 = BN_new(); in rsa_ossl_mod_exp() local
769 if (dmp1 == NULL) in rsa_ossl_mod_exp()
771 BN_with_flags(dmp1, rsa->dmp1, BN_FLG_CONSTTIME); in rsa_ossl_mod_exp()
774 if (!rsa->meth->bn_mod_exp(r0, r1, dmp1, rsa->p, ctx, in rsa_ossl_mod_exp()
776 BN_free(dmp1); in rsa_ossl_mod_exp()
780 BN_free(dmp1); in rsa_ossl_mod_exp()
H A Drsa_sp800_56b_check.c30 if (rsa->dmp1 == NULL || rsa->dmq1 == NULL || rsa->iqmp == NULL) { in ossl_rsa_check_crt_components()
31 if (rsa->dmp1 != NULL || rsa->dmq1 != NULL || rsa->iqmp != NULL) in ossl_rsa_check_crt_components()
56 && (BN_cmp(rsa->dmp1, BN_value_one()) > 0) in ossl_rsa_check_crt_components()
57 && (BN_cmp(rsa->dmp1, p1) < 0) in ossl_rsa_check_crt_components()
65 && BN_mod_mul(r, rsa->dmp1, rsa->e, p1, ctx) in ossl_rsa_check_crt_components()
H A Drsa_x931g.c122 rsa->dmp1 = BN_new(); in RSA_X931_derive_ex()
123 if (rsa->dmp1 == NULL) in RSA_X931_derive_ex()
125 if (!BN_mod(rsa->dmp1, rsa->d, r1, ctx)) in RSA_X931_derive_ex()
/netbsd/external/bsd/ntp/dist/libntp/
H A Dlibssl_compat.c203 BIGNUM * dmp1, in sslshim_RSA_set0_crt_params() argument
209 if (!((prsa->dmp1 || dmp1) && in sslshim_RSA_set0_crt_params()
214 replace_bn_nn(&prsa->dmp1, dmp1); in sslshim_RSA_set0_crt_params()
/netbsd/external/bsd/wpa/dist/src/tls/
H A Drsa.c25 struct bignum *dmp1; /* d mod (p - 1); CRT exponent */ member
167 key->dmp1 = bignum_init(); in crypto_rsa_import_private_key()
172 key->p == NULL || key->q == NULL || key->dmp1 == NULL || in crypto_rsa_import_private_key()
222 pos = crypto_rsa_parse_integer(pos, end, key->dmp1); in crypto_rsa_import_private_key()
306 if (bignum_exptmod(tmp, key->dmp1, key->p, a) < 0) in crypto_rsa_exptmod()
370 bignum_deinit(key->dmp1); in crypto_rsa_free()
/netbsd/crypto/external/bsd/openssl.old/dist/crypto/pem/
H A Dpvkfmt.c325 BIGNUM *p = NULL, *q = NULL, *dmp1 = NULL, *dmq1 = NULL, *iqmp = NULL; in b2i_rsa() local
346 if (!read_lebn(&pin, hnbyte, &dmp1)) in b2i_rsa()
357 if (!RSA_set0_crt_params(rsa, dmp1, dmq1, iqmp)) in b2i_rsa()
359 dmp1 = dmq1 = iqmp = NULL; in b2i_rsa()
376 BN_free(dmp1); in b2i_rsa()
533 const BIGNUM *d, *p, *q, *iqmp, *dmp1, *dmq1; in check_bitlen_rsa() local
544 RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp); in check_bitlen_rsa()
548 || (BN_num_bytes(dmp1) > hnbyte) in check_bitlen_rsa()
561 const BIGNUM *n, *d, *e, *p, *q, *iqmp, *dmp1, *dmq1; in write_rsa() local
571 RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp); in write_rsa()
[all …]
/netbsd/crypto/external/bsd/openssl/dist/crypto/pem/
H A Dpvkfmt.c446 BIGNUM *p = NULL, *q = NULL, *dmp1 = NULL, *dmq1 = NULL, *iqmp = NULL; in ossl_b2i_RSA_after_header() local
466 if (!read_lebn(&pin, hnbyte, &dmp1)) in ossl_b2i_RSA_after_header()
477 if (!RSA_set0_crt_params(rsa, dmp1, dmq1, iqmp)) in ossl_b2i_RSA_after_header()
479 dmp1 = dmq1 = iqmp = NULL; in ossl_b2i_RSA_after_header()
493 BN_free(dmp1); in ossl_b2i_RSA_after_header()
639 const BIGNUM *d, *p, *q, *iqmp, *dmp1, *dmq1; in check_bitlen_rsa() local
650 RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp); in check_bitlen_rsa()
654 || (BN_num_bytes(dmp1) > hnbyte) in check_bitlen_rsa()
667 const BIGNUM *n, *d, *e, *p, *q, *iqmp, *dmp1, *dmq1; in write_rsa() local
677 RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp); in write_rsa()
[all …]
/netbsd/crypto/external/bsd/openssl.old/dist/doc/man3/
H A DRSA_get0_key.pod21 int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp);
26 const BIGNUM **dmp1, const BIGNUM **dmq1,
52 B<n>, B<e>, B<d>, B<p>, B<q>, B<dmp1>, B<dmq1> and B<iqmp>. B<n> is
54 exponent and B<d> is the private exponent. B<p>, B<q>, B<dmp1>,
57 the first and second factor of B<n> and B<dmp1>, B<dmq1> and B<iqmp>
83 set with RSA_get0_factors() and RSA_set0_factors(), and the B<dmp1>,
97 Any of the values B<n>, B<e>, B<d>, B<p>, B<q>, B<dmp1>, B<dmq1>, and B<iqmp> can also be
/netbsd/crypto/external/bsd/openssl/dist/doc/man3/
H A DRSA_get0_key.pod25 int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp);
30 const BIGNUM **dmp1, const BIGNUM **dmq1,
60 B<n>, B<e>, B<d>, B<p>, B<q>, B<dmp1>, B<dmq1> and B<iqmp>. B<n> is
62 exponent and B<d> is the private exponent. B<p>, B<q>, B<dmp1>,
65 the first and second factor of B<n> and B<dmp1>, B<dmq1> and B<iqmp>
91 set with RSA_get0_factors() and RSA_set0_factors(), and the B<dmp1>,
105 Any of the values B<n>, B<e>, B<d>, B<p>, B<q>, B<dmp1>, B<dmq1>, and B<iqmp> can also be

123