Home
last modified time | relevance | path

Searched refs:dmq1 (Results 1 – 25 of 29) sorted by relevance

12

/freebsd/contrib/ntp/libntp/
H A Dlibssl_compat.c202 BIGNUM * dmq1, in sslshim_RSA_set0_crt_params() argument
208 (prsa->dmq1 || dmq1) && in sslshim_RSA_set0_crt_params()
213 replace_bn_nn(&prsa->dmq1, dmq1); in sslshim_RSA_set0_crt_params()
/freebsd/crypto/openssl/crypto/rsa/
H A Drsa_sp800_56b_gen.c303 if (rsa->dmq1 == NULL) in ossl_rsa_sp800_56b_derive_params_from_pq()
304 rsa->dmq1 = BN_secure_new(); in ossl_rsa_sp800_56b_derive_params_from_pq()
305 if (rsa->dmq1 == NULL) in ossl_rsa_sp800_56b_derive_params_from_pq()
307 BN_set_flags(rsa->dmq1, BN_FLG_CONSTTIME); in ossl_rsa_sp800_56b_derive_params_from_pq()
308 if (!BN_mod(rsa->dmq1, rsa->d, q1, ctx)) in ossl_rsa_sp800_56b_derive_params_from_pq()
332 BN_free(rsa->dmq1); in ossl_rsa_sp800_56b_derive_params_from_pq()
333 rsa->dmq1 = NULL; in ossl_rsa_sp800_56b_derive_params_from_pq()
H A Drsa_lib.c173 BN_clear_free(r->dmq1); in RSA_free()
451 int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) in RSA_set0_crt_params() argument
457 || (r->dmq1 == NULL && dmq1 == NULL) in RSA_set0_crt_params()
466 if (dmq1 != NULL) { in RSA_set0_crt_params()
467 BN_clear_free(r->dmq1); in RSA_set0_crt_params()
468 r->dmq1 = dmq1; in RSA_set0_crt_params()
469 BN_set_flags(r->dmq1, BN_FLG_CONSTTIME); in RSA_set0_crt_params()
604 const BIGNUM **dmp1, const BIGNUM **dmq1, in RSA_get0_crt_params() argument
609 if (dmq1 != NULL) in RSA_get0_crt_params()
610 *dmq1 = r->dmq1; in RSA_get0_crt_params()
[all …]
H A Drsa_gen.c92 BIGNUM *dmp1 = NULL, *dmq1 = NULL, *iqmp = NULL; in DEFINE_STACK_OF() local
194 dmq1 = BN_secure_new(); in DEFINE_STACK_OF()
195 if (dmq1 == NULL) in DEFINE_STACK_OF()
204 if (!BN_mod(dmq1, rsa->d, r2, ctx)) in DEFINE_STACK_OF()
206 if (!sk_BIGNUM_insert(exps, dmq1, sk_BIGNUM_num(exps))) in DEFINE_STACK_OF()
208 dmq1 = NULL; in DEFINE_STACK_OF()
260 BN_clear_free(dmq1); in DEFINE_STACK_OF()
578 rsa->dmq1 = sk_BIGNUM_delete(exps, 0); in rsa_multiprime_keygen()
645 BN_clear_free(rsa->dmq1); in rsa_keygen()
651 rsa->dmq1 = NULL; in rsa_keygen()
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()
59 && (BN_cmp(rsa->dmq1, BN_value_one()) > 0) in ossl_rsa_check_crt_components()
60 && (BN_cmp(rsa->dmq1, q1) < 0) in ossl_rsa_check_crt_components()
68 && BN_mod_mul(r, rsa->dmq1, rsa->e, q1, ctx) in ossl_rsa_check_crt_components()
H A Drsa_x931g.c129 rsa->dmq1 = BN_new(); in RSA_X931_derive_ex()
130 if (rsa->dmq1 == NULL) in RSA_X931_derive_ex()
132 if (!BN_mod(rsa->dmq1, rsa->d, r2, ctx)) in RSA_X931_derive_ex()
H A Drsa_ossl.c378 … || ((rsa->p != NULL) && (rsa->q != NULL) && (rsa->dmp1 != NULL) && (rsa->dmq1 != NULL) && (rsa->i… in rsa_ossl_private_encrypt()
622 … || ((rsa->p != NULL) && (rsa->q != NULL) && (rsa->dmp1 != NULL) && (rsa->dmq1 != NULL) && (rsa->i… in rsa_ossl_private_decrypt()
891 || !BN_mod_exp_mont_consttime_x2(m1, m1, rsa->dmq1, rsa->q, in rsa_ossl_mod_exp()
930 BIGNUM *dmq1 = BN_new(); in rsa_ossl_mod_exp() local
931 if (dmq1 == NULL) { in rsa_ossl_mod_exp()
935 BN_with_flags(dmq1, rsa->dmq1, BN_FLG_CONSTTIME); in rsa_ossl_mod_exp()
938 if (!rsa->meth->bn_mod_exp(m1, r1, dmq1, rsa->q, ctx, in rsa_ossl_mod_exp()
941 BN_free(dmq1); in rsa_ossl_mod_exp()
945 BN_free(dmq1); in rsa_ossl_mod_exp()
1197 if (s390x_crt(r0, i, rsa->p, rsa->q, rsa->dmp1, rsa->dmq1, rsa->iqmp) == 1) in rsa_ossl_s390x_mod_exp()
H A Drsa_chk.c160 if (key->dmp1 != NULL && key->dmq1 != NULL && key->iqmp != NULL) { in rsa_validate_keypair_multiprime()
184 if (BN_cmp(j, key->dmq1) != 0) { in rsa_validate_keypair_multiprime()
H A Drsa_asn1.c65 ASN1_SIMPLE(RSA, dmq1, CBIGNUM),
H A Drsa_local.h68 BIGNUM *dmq1; member
H A Drsa_backend.c502 if (!rsa_bn_dup_check(&dupkey->dmq1, rsa->dmq1)) in ossl_rsa_dup()
/freebsd/crypto/openssl/test/
H A Drsa_mp_test.c94 static const unsigned char dmq1[] = "\x01\xa5\x6b\xbc\xcd\xe3\x0e\x46\xc6\x72\xf5\x04\x56\x28\x01\x… variable
154 BN_bin2bn(dmq1, sizeof(dmq1) - 1, NULL), in key2048p3_v1()
213 || !TEST_ptr(num = BN_bin2bn(dmq1, sizeof(dmq1) - 1, NULL)) in key2048p3_v2()
H A Drsa_test.c42 BN_bin2bn(dmq1, sizeof(dmq1) - 1, NULL), \
74 static unsigned char dmq1[] = "\x00\x8E\x3C\x05\x21\xFE\x15\xE0\xEA\x06\xA3\x6F\xF0\xF1\x0C\x99" in key1() local
112 static unsigned char dmq1[] = "\x00\x86\x55\x21\x4A\xC5\x4D\x8D\x4E\xCD\x61\x77\xF1\xC7\x36\x90" in key2() local
167 static unsigned char dmq1[] = "\x47\x1E\x02\x90\xFF\x0A\xF0\x75\x03\x51\xB7\xF8\x78\x86\x4C\xA9" in key3() local
H A Drsa_sp800_56b_test.c307 && TEST_BN_eq_word(key->dmq1, DQ) in test_check_crt_components()
317 && TEST_true(BN_set_word(key->dmq1, 1)) in test_check_crt_components()
319 && TEST_true(BN_set_word(key->dmq1, Q - 1)) in test_check_crt_components()
321 && TEST_true(BN_set_word(key->dmq1, DQ)) in test_check_crt_components()
333 && TEST_true(BN_set_word(key->dmq1, DQ - 1)) in test_check_crt_components()
335 && TEST_true(BN_set_word(key->dmq1, DQ)) in test_check_crt_components()
H A Devp_pkey_provided_test.c548 BIGNUM *dmp1 = NULL, *dmq1 = NULL, *iqmp = NULL; in test_fromdata_rsa_derive_from_pq_sp800() local
595 || !TEST_ptr(dmq1 = BN_bin2bn(dmq1_data, sizeof(dmq1_data), NULL)) in test_fromdata_rsa_derive_from_pq_sp800()
612 cdata[1].comparebn = dmq1; in test_fromdata_rsa_derive_from_pq_sp800()
627 BN_free(dmq1); in test_fromdata_rsa_derive_from_pq_sp800()
638 BIGNUM *dmp1 = NULL, *dmq1 = NULL, *iqmp = NULL; in test_fromdata_rsa_derive_from_pq_multiprime() local
770 || !TEST_ptr(dmq1 = BN_bin2bn(dmq1_data, sizeof(dmq1_data), NULL)) in test_fromdata_rsa_derive_from_pq_multiprime()
789 cdata[1].comparebn = dmq1; in test_fromdata_rsa_derive_from_pq_multiprime()
821 BN_free(dmq1); in test_fromdata_rsa_derive_from_pq_multiprime()
/freebsd/contrib/wpa/src/tls/
H A Drsa.c26 struct bignum *dmq1; /* d mod (q - 1); CRT exponent */ member
163 key->dmq1 = bignum_init(); in crypto_rsa_import_private_key()
168 key->dmq1 == NULL || key->iqmp == NULL) { in crypto_rsa_import_private_key()
214 pos = crypto_rsa_parse_integer(pos, end, key->dmq1); in crypto_rsa_import_private_key()
301 if (bignum_exptmod(tmp, key->dmq1, key->q, b) < 0) in crypto_rsa_exptmod()
362 bignum_deinit(key->dmq1); in crypto_rsa_free()
/freebsd/crypto/openssl/crypto/pem/
H A Dpvkfmt.c453 BIGNUM *p = NULL, *q = NULL, *dmp1 = NULL, *dmq1 = NULL, *iqmp = NULL; in ossl_b2i_RSA_after_header() local
475 if (!read_lebn(&pin, hnbyte, &dmq1)) in ossl_b2i_RSA_after_header()
484 if (!RSA_set0_crt_params(rsa, dmp1, dmq1, iqmp)) in ossl_b2i_RSA_after_header()
486 dmp1 = dmq1 = iqmp = NULL; in ossl_b2i_RSA_after_header()
507 BN_free(dmq1); in ossl_b2i_RSA_after_header()
651 const BIGNUM *d, *p, *q, *iqmp, *dmp1, *dmq1; in check_bitlen_rsa() local
662 RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp); in check_bitlen_rsa()
667 || (BN_num_bytes(dmq1) > hnbyte)) in check_bitlen_rsa()
679 const BIGNUM *n, *d, *e, *p, *q, *iqmp, *dmp1, *dmq1; in write_rsa() local
689 RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp); in write_rsa()
[all …]
/freebsd/crypto/openssl/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
63 B<dmq1> and B<iqmp> are the factors for the second representation of a
65 the first and second factor of B<n> and B<dmp1>, B<dmq1> and B<iqmp>
92 B<dmq1> and B<iqmp> parameters can be obtained and set with
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
H A DOSSL_PARAM_BLD.pod155 BIGNUM *dmp1, *dmq1; /* first two CRT exponents */
173 || !OSSL_PARAM_BLD_push_BN(bld, "rsa-exponent2", dmq1)
H A DRSA_check_key.pod32 and that B<dmp1>, B<dmq1> and B<iqmp> are set correctly or are B<NULL>.
H A DRSA_set_method.pod124 * operations, even if p,q,dmp1,dmq1,iqmp
/freebsd/contrib/ntp/include/
H A Dlibssl_compat.h67 BIGNUM *dmq1, BIGNUM *iqmp);
/freebsd/contrib/ldns/
H A Dkeys.c769 *dmp1=NULL, *dmq1=NULL, *iqmp=NULL; in ldns_key_new_frm_fp_rsa_l() local
848 dmq1 = BN_bin2bn((const char unsigned*)buf, i, NULL); in ldns_key_new_frm_fp_rsa_l()
849 if (!dmq1) { in ldns_key_new_frm_fp_rsa_l()
872 rsa->dmq1 = dmq1; in ldns_key_new_frm_fp_rsa_l()
885 if(!RSA_set0_crt_params(rsa, dmp1, dmq1, iqmp)) in ldns_key_new_frm_fp_rsa_l()
903 BN_free(dmq1); in ldns_key_new_frm_fp_rsa_l()
H A Dhost2str.c3099 *dmq1=NULL, *iqmp=NULL; in ldns_key2buffer_str() local
3107 dmq1 = rsa->dmq1; in ldns_key2buffer_str()
3113 &dmq1, &iqmp); in ldns_key2buffer_str()
3127 if(!ldns_print_bignum_b64_line(output, "Exponent2", dmq1)) in ldns_key2buffer_str()
/freebsd/crypto/openssl/include/openssl/
H A Drsa.h221 BIGNUM *dmp1, BIGNUM *dmq1,
238 const BIGNUM **dmq1,

12