Home
last modified time | relevance | path

Searched refs:dh (Results 1 – 25 of 209) sorted by relevance

123456789

/freebsd/sys/ufs/ufs/
H A Dufs_dirhash.c268 return (dh); in ufsdirhash_create()
382 memreqd = sizeof(*dh) + narrays * sizeof(*dh->dh_hash) + in ufsdirhash_build()
416 dh->dh_hash = malloc(narrays * sizeof(dh->dh_hash[0]), in ufsdirhash_build()
561 KASSERT(dh != NULL && dh->dh_hash != NULL, in ufsdirhash_lookup()
712 KASSERT(dh != NULL && dh->dh_hash != NULL, in ufsdirhash_findfree()
786 KASSERT(dh != NULL && dh->dh_hash != NULL, in ufsdirhash_enduseful()
819 if (dh->dh_hused >= (dh->dh_hlen * 3) / 4) { in ufsdirhash_add()
941 if (block < dh->dh_nblk / 8 && dh->dh_narrays > 1) { in ufsdirhash_dirtrunc()
1044 hash = fnv_32_buf(&dh, sizeof(dh), hash); in ufsdirhash_hash()
1224 if (dh == NULL || --dh->dh_score > 0) { in ufsdirhash_recycle()
[all …]
/freebsd/crypto/openssl/crypto/dh/
H A Ddh_key.c79 dh->lock, dh->params.p, ctx); in ossl_dh_compute_key()
86 if (!dh->meth->bn_mod_exp(dh, z, pub_key, dh->priv_key, dh->params.p, ctx, in ossl_dh_compute_key()
123 ret = dh->meth->compute_key(key, pub_key, dh); in DH_compute_key()
152 rv = dh->meth->compute_key(key, pub_key, dh); in DH_compute_key_padded()
199 dh->dirty_cnt++; in dh_init()
221 return dh->meth->generate_key(dh); in DH_generate_key()
252 if (!dh->meth->bn_mod_exp(dh, pub_key, dh->params.g, prk, dh->params.p, in ossl_dh_generate_public_key()
314 || dh->length > BN_num_bits(dh->params.q)) in generate_key()
328 && dh->length >= BN_num_bits(dh->params.p)) in generate_key()
330 l = dh->length ? dh->length : BN_num_bits(dh->params.p) - 1; in generate_key()
[all …]
H A Ddh_lib.c39 mtmp = dh->meth; in DH_set_method()
41 mtmp->finish(dh); in DH_set_method()
44 dh->engine = NULL; in DH_set_method()
46 dh->meth = meth; in DH_set_method()
48 meth->init(dh); in DH_set_method()
54 return dh->meth; in ossl_dh_get_method()
239 dh->dirty_cnt++; in DH_set0_pqg()
245 return dh->length; in DH_get_length()
251 dh->dirty_cnt++; in DH_set_length()
274 dh->dirty_cnt++; in DH_set0_key()
[all …]
H A Ddh_check.c57 nid = DH_get_nid((DH *)dh); in DH_check_params()
65 return ossl_ffc_params_FIPS186_4_validate(dh->libctx, &dh->params, in DH_check_params()
111 int DH_check_ex(const DH *dh) in DH_check_ex() argument
175 if (BN_ucmp(dh->params.p, dh->params.q) > 0) in DH_check()
184 else if (BN_cmp(dh->params.g, dh->params.p) >= 0) in DH_check()
188 if (!BN_mod_exp(t1, dh->params.g, dh->params.q, dh->params.p, ctx)) in DH_check()
199 if (!BN_div(t1, t2, dh->params.p, dh->params.q, ctx)) in DH_check()
259 if (dh->params.q != NULL && BN_ucmp(dh->params.p, dh->params.q) < 0) { in DH_check_pub_key()
313 if (DH_get_nid((DH *)dh) != NID_undef && dh->length != 0) { in ossl_dh_check_priv_key()
338 if (dh->params.p == NULL in ossl_dh_check_pairwise()
[all …]
H A Ddh_ameth.c45 return dh; in d2i_dhp()
113 DH *dh; in dh_pub_encode() local
120 dh = pkey->pkey.dh; in dh_pub_encode()
230 DH *dh; in dh_param_decode() local
399 DH *dh; in dh_pkey_ctrl() local
430 DH *dh = pkey->pkey.dh; in dh_pkey_public_check() local
437 return DH_check_pub_key_ex(dh, dh->pub_key); in dh_pkey_public_check()
442 DH *dh = pkey->pkey.dh; in dh_pkey_param_check() local
456 DH *dh = from->pkey.dh; in dh_pkey_export_to() local
458 const BIGNUM *p = DH_get0_p(dh), *g = DH_get0_g(dh), *q = DH_get0_q(dh); in dh_pkey_export_to()
[all …]
H A Ddh_group_params.c31 if (dh == NULL) in dh_param_init()
36 dh->dirty_cnt++; in dh_param_init()
37 return dh; in dh_param_init()
60 if (dh == NULL) in ossl_dh_cache_named_group()
66 if (dh->params.p == NULL in ossl_dh_cache_named_group()
67 || dh->params.g == NULL) in ossl_dh_cache_named_group()
78 dh->dirty_cnt++; in ossl_dh_cache_named_group()
84 int id = DH_get_nid(dh); in ossl_dh_is_named_safe_prime_group()
93 int DH_get_nid(const DH *dh) in DH_get_nid() argument
95 if (dh == NULL) in DH_get_nid()
[all …]
H A Ddh_backend.c36 if (dh == NULL) in dh_ffc_params_fromdata()
71 if (dh == NULL) in ossl_dh_key_fromdata()
114 if (dh == NULL) in ossl_dh_key_todata()
132 if (dh->engine != NULL || ossl_dh_get_method(dh) != DH_OpenSSL()) in ossl_dh_is_foreign()
161 dupkey->flags = dh->flags; in ossl_dh_dup()
198 DH *dh = NULL; in ossl_dh_key_from_pkcs8() local
223 if (dh == NULL) in ossl_dh_key_from_pkcs8()
236 if (!DH_generate_key(dh)) in ossl_dh_key_from_pkcs8()
244 DH_free(dh); in ossl_dh_key_from_pkcs8()
245 dh = NULL; in ossl_dh_key_from_pkcs8()
[all …]
H A Ddh_rfc5114.c31 DH *dh = DH_new(); \
33 if (dh == NULL) \
35 dh->params.p = BN_dup(&ossl_bignum_dh##x##_p); \
36 dh->params.g = BN_dup(&ossl_bignum_dh##x##_g); \
37 dh->params.q = BN_dup(&ossl_bignum_dh##x##_q); \
38 if (dh->params.p == NULL || dh->params.q == NULL || dh->params.g == NULL) {\
39 DH_free(dh); \
42 return dh; \
H A Ddh_asn1.c38 DH *dh = (DH *)*pval; in dh_cb() local
42 ossl_dh_cache_named_group(dh); in dh_cb()
43 dh->dirty_cnt++; in dh_cb()
97 DH *dh = NULL; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() local
99 dh = DH_new(); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname()
100 if (dh == NULL) in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname()
104 DH_free(dh); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname()
110 *a = dh; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname()
113 params = &dh->params; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname()
131 DH_set_flags(dh, DH_FLAG_TYPE_DHX); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname()
[all …]
H A Ddh_pmeth.c325 DH *dh = NULL; in pkey_dh_paramgen() local
356 if (dh == NULL) in pkey_dh_paramgen()
361 dh = DH_new(); in pkey_dh_paramgen()
362 if (dh == NULL) { in pkey_dh_paramgen()
370 EVP_PKEY_assign_DH(pkey, dh); in pkey_dh_paramgen()
372 DH_free(dh); in pkey_dh_paramgen()
379 DH *dh = NULL; in pkey_dh_keygen() local
388 dh = DH_new(); in pkey_dh_keygen()
389 if (dh == NULL) in pkey_dh_keygen()
402 DH *dh; in pkey_dh_derive() local
[all …]
H A Ddh_gen.c38 int ossl_dh_generate_ffc_parameters(DH *dh, int type, int pbits, int qbits, in ossl_dh_generate_ffc_parameters() argument
45 ret = ossl_ffc_params_FIPS186_2_generate(dh->libctx, &dh->params, in ossl_dh_generate_ffc_parameters()
50 ret = ossl_ffc_params_FIPS186_4_generate(dh->libctx, &dh->params, in ossl_dh_generate_ffc_parameters()
54 dh->dirty_cnt++; in ossl_dh_generate_ffc_parameters()
96 DH *dh; in dh_gen_named_group() local
103 dh = ossl_dh_new_by_nid_ex(libctx, nid); in dh_gen_named_group()
104 if (dh != NULL in dh_gen_named_group()
105 && ossl_ffc_params_copy(&ret->params, &dh->params)) { in dh_gen_named_group()
109 DH_free(dh); in dh_gen_named_group()
H A Ddh_local.h46 int (*generate_key) (DH *dh);
47 int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
50 int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
53 int (*init) (DH *dh);
54 int (*finish) (DH *dh);
58 int (*generate_params) (DH *dh, int prime_len, int generator,
/freebsd/contrib/elftoolchain/libpe/
H A Dlibpe_dos.c42 PE_DosHdr *dh; in libpe_parse_msdos_header() local
53 if ((dh = malloc(sizeof(*dh))) == NULL) { in libpe_parse_msdos_header()
57 pe->pe_dh = dh; in libpe_parse_msdos_header()
199 dh->dh_nblock = 3; in init_dos_header()
200 dh->dh_hdrsize = 4; in init_dos_header()
202 dh->dh_sp = 184; in init_dos_header()
204 dh->dh_lfanew = 0x80; in init_dos_header()
210 PE_DosHdr *dh; in libpe_write_msdos_stub() local
309 pe->pe_dh = dh; in libpe_write_msdos_stub()
311 init_dos_header(dh); in libpe_write_msdos_stub()
[all …]
/freebsd/crypto/openssl/include/crypto/
H A Ddh.h24 int ossl_dh_generate_public_key(BN_CTX *ctx, const DH *dh,
29 void ossl_dh_cache_named_group(DH *dh);
30 int ossl_dh_is_named_safe_prime_group(const DH *dh);
32 FFC_PARAMS *ossl_dh_get0_params(DH *dh);
33 int ossl_dh_get0_nid(const DH *dh);
34 int ossl_dh_params_fromdata(DH *dh, const OSSL_PARAM params[]);
37 int ossl_dh_key_todata(DH *dh, OSSL_PARAM_BLD *bld, OSSL_PARAM params[],
45 int ossl_dh_check_pairwise(const DH *dh);
47 const DH_METHOD *ossl_dh_get_method(const DH *dh);
59 int ossl_dh_is_foreign(const DH *dh);
[all …]
/freebsd/crypto/openssl/providers/implementations/keymgmt/
H A Ddh_kmgmt.c100 DH *dh = NULL; in dh_newdata() local
109 return dh; in dh_newdata()
114 DH *dh = NULL; in dhx_newdata() local
117 if (dh != NULL) { in dhx_newdata()
121 return dh; in dhx_newdata()
144 ok = ok && (DH_get0_p(dh) != NULL && DH_get0_g(dh) != NULL); in dh_has()
316 DH *dh = key; in dh_get_params() local
369 DH *dh = key; in dh_set_params() local
694 DH *dh = NULL; in dh_gen() local
786 dh = NULL; in dh_gen()
[all …]
/freebsd/contrib/tcpdump/
H A Dprint-dccp.c78 #define DCCPH_CCVAL(dh) ((GET_U_1((dh)->dccph_ccval_cscov) >> 4) & 0xF) argument
79 #define DCCPH_CSCOV(dh) (GET_U_1((dh)->dccph_ccval_cscov) & 0xF) argument
81 #define DCCPH_X(dh) (GET_U_1((dh)->dccph_xtr) & 1) argument
82 #define DCCPH_TYPE(dh) ((GET_U_1((dh)->dccph_xtr) >> 1) & 0xF) argument
196 if (DCCPH_CSCOV(dh) == 0) in dccp_csum_coverage()
198 cov = (GET_U_1(dh->dccph_doff) + DCCPH_CSCOV(dh) - 1) * sizeof(uint32_t); in dccp_csum_coverage()
229 if (DCCPH_X(dh) != 0) { in dccp_seqno()
251 if (DCCPH_X(dh) != 0) { in dccp_print_ack_no()
272 const struct dccp_hdr *dh; in dccp_print() local
336 ND_PRINT(" (CCVal %u, CsCov %u", DCCPH_CCVAL(dh), DCCPH_CSCOV(dh)); in dccp_print()
[all …]
/freebsd/crypto/openssl/include/openssl/
H A Ddh.h204 OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
205 OSSL_DEPRECATEDIN_3_0 int DH_up_ref(DH *dh);
206 OSSL_DEPRECATEDIN_3_0 int DH_bits(const DH *dh);
207 OSSL_DEPRECATEDIN_3_0 int DH_size(const DH *dh);
208 OSSL_DEPRECATEDIN_3_0 int DH_security_bits(const DH *dh);
220 OSSL_DEPRECATEDIN_3_0 int DH_check_params_ex(const DH *dh);
221 OSSL_DEPRECATEDIN_3_0 int DH_check_ex(const DH *dh);
227 OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh);
248 OSSL_DEPRECATEDIN_3_0 int DH_get_nid(const DH *dh);
270 OSSL_DEPRECATEDIN_3_0 void DH_set_flags(DH *dh, int flags);
[all …]
/freebsd/contrib/wpa/src/crypto/
H A Ddh_groups.c1198 if (dh == NULL) in dh_init()
1202 *priv = wpabuf_alloc(dh->prime_len); in dh_init()
1206 pv_len = dh->prime_len; in dh_init()
1213 if (crypto_dh_init(*dh->generator, dh->prime, dh->prime_len, in dh_init()
1221 wpabuf_put(*priv, dh->prime_len); in dh_init()
1222 wpabuf_put(pv, dh->prime_len); in dh_init()
1239 const struct dh_group *dh) in dh_derive_shared() argument
1244 if (dh == NULL || peer_public == NULL || own_private == NULL) in dh_derive_shared()
1247 shared_len = dh->prime_len; in dh_derive_shared()
1251 if (crypto_dh_derive_secret(*dh->generator, dh->prime, dh->prime_len, in dh_derive_shared()
[all …]
/freebsd/crypto/openssh/
H A Dkexdh.c52 kex->dh = dh_new_group1(); in kex_dh_keygen()
56 kex->dh = dh_new_group14(); in kex_dh_keygen()
59 kex->dh = dh_new_group16(); in kex_dh_keygen()
62 kex->dh = dh_new_group18(); in kex_dh_keygen()
67 if (kex->dh == NULL) in kex_dh_keygen()
85 DHparams_print_fp(stderr, kex->dh); in kex_dh_compute_key()
93 klen = DH_size(kex->dh); in kex_dh_compute_key()
168 DH_free(kex->dh); in kex_dh_enc()
169 kex->dh = NULL; in kex_dh_enc()
198 DH_free(kex->dh); in kex_dh_dec()
[all …]
H A Ddh.c284 dh_gen_key(DH *dh, int need) in dh_gen_key() argument
304 if (DH_generate_key(dh) == 0) in dh_gen_key()
306 DH_get0_key(dh, &pub_key, NULL); in dh_gen_key()
315 DH *dh; in dh_new_group_asc() local
318 if ((dh = DH_new()) == NULL) in dh_new_group_asc()
325 return dh; in dh_new_group_asc()
327 DH_free(dh); in dh_new_group_asc()
340 DH *dh; in dh_new_group() local
342 if ((dh = DH_new()) == NULL) in dh_new_group()
345 DH_free(dh); in dh_new_group()
[all …]
/freebsd/sys/crypto/openssl/i386/
H A Dcast-586.S35 movb %dh,%cl
39 movb %dh,%al
56 movb %dh,%cl
60 movb %dh,%al
77 movb %dh,%cl
81 movb %dh,%al
98 movb %dh,%cl
102 movb %dh,%al
119 movb %dh,%cl
123 movb %dh,%al
[all …]
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/
H A Ddrti.c106 dof_helper_t dh; in dtrace_dof_init() local
153 dh.dofhp_dof = (uintptr_t)dof; in dtrace_dof_init()
155 dh.dofhp_addr = elf->e_type == ET_DYN ? (uintptr_t) lmp->l_base : 0; in dtrace_dof_init()
156 dh.dofhp_pid = getpid(); in dtrace_dof_init()
158 dh.dofhp_addr = elf->e_type == ET_DYN ? (uintptr_t) lmp->l_addr : 0; in dtrace_dof_init()
162 (void) snprintf(dh.dofhp_mod, sizeof (dh.dofhp_mod), in dtrace_dof_init()
165 (void) snprintf(dh.dofhp_mod, sizeof (dh.dofhp_mod), in dtrace_dof_init()
192 if ((gen = ioctl(fd, DTRACEHIOC_ADDDOF, &dh)) == -1) in dtrace_dof_init()
197 gen = dh.dofhp_gen; in dtrace_dof_init()
/freebsd/crypto/openssl/test/
H A Ddhtest.c39 DH *dh = NULL; in dh_test() local
57 if (!TEST_ptr(dh = DH_new()) in dh_test()
76 if (!TEST_true(DH_check(dh, &i))) in dh_test()
92 DH_get0_pqg(dh, &p2, &q2, &g2); in dh_test()
252 DH_free(dh); in dh_test()
265 DH *dh = NULL; in dh_computekey_range_test() local
272 || !TEST_ptr(dh = DH_new()) in dh_computekey_range_test()
316 DH_free(dh); in dh_computekey_range_test()
734 DH *dh = NULL; in dh_test_prime_groups() local
739 DH_get0_pqg(dh, &p, &q, &g); in dh_test_prime_groups()
[all …]
/freebsd/crypto/openssl/doc/man3/
H A DDH_size.pod10 #include <openssl/dh.h>
16 int DH_bits(const DH *dh);
18 int DH_size(const DH *dh);
20 int DH_security_bits(const DH *dh);
30 B<dh> and B<dh-E<gt>p> must not be B<NULL>.
36 DH_security_bits() returns the number of security bits of the given B<dh>
42 B<dh> doesn't hold any key parameters.
45 B<dh> doesn't hold any key parameters.
48 B<dh> doesn't hold any key parameters.
/freebsd/crypto/openssl/providers/implementations/encode_decode/
H A Dencode_key2any.c1318 MAKE_ENCODER(dh, dh, EVP_PKEY_DH, type_specific_params, der);
1337 MAKE_ENCODER(dh, dh, EVP_PKEY_DH, type_specific_params, pem);
1371 MAKE_ENCODER(dh, dh, EVP_PKEY_DH, EncryptedPrivateKeyInfo, der);
1372 MAKE_ENCODER(dh, dh, EVP_PKEY_DH, EncryptedPrivateKeyInfo, pem);
1373 MAKE_ENCODER(dh, dh, EVP_PKEY_DH, PrivateKeyInfo, der);
1374 MAKE_ENCODER(dh, dh, EVP_PKEY_DH, PrivateKeyInfo, pem);
1375 MAKE_ENCODER(dh, dh, EVP_PKEY_DH, SubjectPublicKeyInfo, der);
1376 MAKE_ENCODER(dh, dh, EVP_PKEY_DH, SubjectPublicKeyInfo, pem);
1444 MAKE_ENCODER(dh, dh, EVP_PKEY_DH, DH, der);
1445 MAKE_ENCODER(dh, dh, EVP_PKEY_DH, DH, pem);
[all …]

123456789