/freebsd-current/crypto/openssl/crypto/dh/ |
H A D | dh_group_params.c | 25 #include "crypto/dh.h" 29 DH *dh = ossl_dh_new_ex(libctx); local 31 if (dh == NULL) 34 ossl_ffc_named_group_set(&dh->params, group); 35 dh->params.nid = ossl_ffc_named_group_get_uid(group); 36 dh->dirty_cnt++; 37 return dh; 56 void ossl_dh_cache_named_group(DH *dh) argument 60 if (dh == NULL) 63 dh 82 ossl_dh_is_named_safe_prime_group(const DH *dh) argument 93 DH_get_nid(const DH *dh) argument [all...] |
H A D | dh_lib.c | 26 #include "crypto/dh.h" 32 int DH_set_method(DH *dh, const DH_METHOD *meth) argument 39 mtmp = dh->meth; 41 mtmp->finish(dh); 43 ENGINE_finish(dh->engine); 44 dh->engine = NULL; 46 dh->meth = meth; 48 meth->init(dh); 52 const DH_METHOD *ossl_dh_get_method(const DH *dh) argument 54 return dh 192 DH_bits(const DH *dh) argument 199 DH_size(const DH *dh) argument 206 DH_security_bits(const DH *dh) argument 221 DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) argument 227 DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) argument 243 DH_get_length(const DH *dh) argument 248 DH_set_length(DH *dh, long length) argument 255 DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) argument 263 DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) argument 278 DH_get0_p(const DH *dh) argument 283 DH_get0_q(const DH *dh) argument 288 DH_get0_g(const DH *dh) argument 293 DH_get0_priv_key(const DH *dh) argument 298 DH_get0_pub_key(const DH *dh) argument 303 DH_clear_flags(DH *dh, int flags) argument 308 DH_test_flags(const DH *dh, int flags) argument 313 DH_set_flags(DH *dh, int flags) argument 319 DH_get0_engine(DH *dh) argument 325 ossl_dh_get0_params(DH *dh) argument 329 ossl_dh_get0_nid(const DH *dh) argument [all...] |
H A D | dh_rfc5114.c | 31 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; \ [all...] |
H A D | dh_check.c | 20 #include "crypto/dh.h" 28 int DH_check_params_ex(const DH *dh) argument 32 if (!DH_check_params(dh, &errflags)) 48 int DH_check_params(const DH *dh, int *ret) argument 57 nid = DH_get_nid((DH *)dh); 65 return ossl_ffc_params_FIPS186_4_validate(dh->libctx, &dh->params, 69 int DH_check_params(const DH *dh, int *ret) argument 76 ctx = BN_CTX_new_ex(dh->libctx); 84 if (!BN_is_odd(dh 111 DH_check_ex(const DH *dh) argument 141 DH_check(const DH *dh, int *ret) argument 230 DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key) argument 250 DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) argument 272 ossl_dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret) argument 278 ossl_dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret) argument 332 ossl_dh_check_pairwise(const DH *dh) argument [all...] |
H A D | dh_key.c | 20 #include "crypto/dh.h" 29 static int generate_key(DH *dh); 30 static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, 33 static int dh_init(DH *dh); 34 static int dh_finish(DH *dh); 40 int ossl_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) argument 47 if (BN_num_bits(dh->params.p) > OPENSSL_DH_MAX_MODULUS_BITS) { 52 if (dh->params.q != NULL 53 && BN_num_bits(dh->params.q) > OPENSSL_DH_MAX_MODULUS_BITS) { 58 if (BN_num_bits(dh 114 DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) argument 144 DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh) argument 189 dh_bn_mod_exp(const DH *dh, BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) argument 196 dh_init(DH *dh) argument 203 dh_finish(DH *dh) argument 216 DH_generate_key(DH *dh) argument 225 ossl_dh_generate_public_key(BN_CTX *ctx, const DH *dh, const BIGNUM *priv_key, BIGNUM *pub_key) argument 261 generate_key(DH *dh) argument 384 ossl_dh_buf2key(DH *dh, const unsigned char *buf, size_t len) argument 412 ossl_dh_key2buf(const DH *dh, unsigned char **pbuf_out, size_t size, int alloc) argument [all...] |
H A D | dh_local.h | 10 #include <openssl/dh.h> 46 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,
|
H A D | dh_backend.c | 22 #include "crypto/dh.h" 31 static int dh_ffc_params_fromdata(DH *dh, const OSSL_PARAM params[]) argument 36 if (dh == NULL) 38 ffc = ossl_dh_get0_params(dh); 44 ossl_dh_cache_named_group(dh); /* This increments dh->dirty_cnt */ 48 int ossl_dh_params_fromdata(DH *dh, const OSSL_PARAM params[]) argument 53 if (!dh_ffc_params_fromdata(dh, params)) 60 || !DH_set_length(dh, priv_len))) 66 int ossl_dh_key_fromdata(DH *dh, cons argument 97 ossl_dh_params_todata(DH *dh, OSSL_PARAM_BLD *bld, OSSL_PARAM params[]) argument 109 ossl_dh_key_todata(DH *dh, OSSL_PARAM_BLD *bld, OSSL_PARAM params[], int include_private) argument 129 ossl_dh_is_foreign(const DH *dh) argument 145 ossl_dh_dup(const DH *dh, int selection) argument 198 DH *dh = NULL; local [all...] |
H A D | dh_ameth.c | 25 #include "crypto/dh.h" 37 DH *dh = NULL; local 41 dh = d2i_DHxparams(NULL, pp, length); 43 dh = d2i_DHparams(NULL, pp, length); 45 return dh; 57 DH_free(pkey->pkey.dh); 70 DH *dh = NULL; local 85 if ((dh = d2i_dhp(pkey, &pm, pmlen)) == NULL) { 96 if ((dh->pub_key = ASN1_INTEGER_to_BN(public_key, NULL)) == NULL) { 102 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, dh); 113 DH *dh; local 167 DH *dh = ossl_dh_key_from_pkcs8(p8, NULL, NULL); local 230 DH *dh; local 333 DHparams_dup(const DH *dh) argument 399 DH *dh; local 430 DH *dh = pkey->pkey.dh; local 442 DH *dh = pkey->pkey.dh; local 456 DH *dh = from->pkey.dh; local 514 DH *dh = ossl_dh_new_ex(pctx->libctx); local 544 DH *dh = from->pkey.dh; local [all...] |
H A D | dh_asn1.c | 22 #include "crypto/dh.h" 38 DH *dh = (DH *)*pval; local 40 DH_clear_flags(dh, DH_FLAG_TYPE_MASK); 41 DH_set_flags(dh, DH_FLAG_TYPE_DH); 42 ossl_dh_cache_named_group(dh); 43 dh->dirty_cnt++; 97 DH *dh = NULL; local 99 dh = DH_new(); 100 if (dh == NULL) 104 DH_free(dh); 135 i2d_DHxparams(const DH *dh, unsigned char **pp) argument [all...] |
H A D | dh_gen.c | 30 #include "crypto/dh.h" 38 int ossl_dh_generate_ffc_parameters(DH *dh, int type, int pbits, int qbits, argument 45 ret = ossl_ffc_params_FIPS186_2_generate(dh->libctx, &dh->params, 50 ret = ossl_ffc_params_FIPS186_4_generate(dh->libctx, &dh->params, 54 dh->dirty_cnt++; 96 DH *dh; local 103 dh = ossl_dh_new_by_nid_ex(libctx, nid); 104 if (dh ! [all...] |
/freebsd-current/sys/ufs/ufs/ |
H A D | ufs_dirhash.c | 94 static int ufsdirhash_hash(struct dirhash *dh, char *name, int namelen); 95 static void ufsdirhash_adjfree(struct dirhash *dh, doff_t offset, int diff); 96 static void ufsdirhash_delslot(struct dirhash *dh, int slot); 97 static int ufsdirhash_findslot(struct dirhash *dh, char *name, int namelen, 110 #define DIRHASH_ASSERT_LOCKED(dh) \ 111 sx_assert(&(dh)->dh_lock, SA_LOCKED) 153 ufsdirhash_hold(struct dirhash *dh) argument 156 refcount_acquire(&dh->dh_refcount); 160 ufsdirhash_drop(struct dirhash *dh) argument 163 if (refcount_release(&dh 173 ufsdirhash_release(struct dirhash *dh) argument 190 struct dirhash *dh; local 279 struct dirhash *dh; local 300 struct dirhash *dh; local 344 struct dirhash *dh; local 483 struct dirhash *dh; local 552 struct dirhash *dh, *dh_next; local 706 struct dirhash *dh; local 781 struct dirhash *dh; local 807 struct dirhash *dh; local 848 struct dirhash *dh; local 875 struct dirhash *dh; local 897 struct dirhash *dh; local 926 struct dirhash *dh; local 975 struct dirhash *dh; local 1033 ufsdirhash_hash(struct dirhash *dh, char *name, int namelen) argument 1057 ufsdirhash_adjfree(struct dirhash *dh, doff_t offset, int diff) argument 1093 ufsdirhash_findslot(struct dirhash *dh, char *name, int namelen, doff_t offset) argument 1117 ufsdirhash_delslot(struct dirhash *dh, int slot) argument 1179 ufsdirhash_destroy(struct dirhash *dh) argument 1218 struct dirhash *dh; local 1252 struct dirhash *dh, *dh_temp; local [all...] |
/freebsd-current/crypto/openssl/include/crypto/ |
H A D | dh.h | 16 # include <openssl/dh.h> 22 int ossl_dh_generate_ffc_parameters(DH *dh, int type, int pbits, int qbits, 24 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[]); 35 int ossl_dh_key_fromdata(DH *dh, const OSSL_PARAM params[], int include_private); 36 int ossl_dh_params_todata(DH *dh, OSSL_PARAM_BL [all...] |
/freebsd-current/contrib/elftoolchain/libpe/ |
H A D | libpe_dos.c | 42 PE_DosHdr *dh; local 53 if ((dh = malloc(sizeof(*dh))) == NULL) { 57 pe->pe_dh = dh; 60 memcpy(dh->dh_magic, hdr, 2); 62 PE_READ16(hdr, dh->dh_lastsize); 63 PE_READ16(hdr, dh->dh_nblock); 64 PE_READ16(hdr, dh->dh_nreloc); 65 PE_READ16(hdr, dh->dh_hdrsize); 66 PE_READ16(hdr, dh 193 init_dos_header(PE_DosHdr *dh) argument 210 PE_DosHdr *dh; local [all...] |
/freebsd-current/crypto/openssh/ |
H A D | kexdh.c | 37 #include <openssl/dh.h> 44 #include "dh.h" 52 kex->dh = dh_new_group1(); 56 kex->dh = dh_new_group14(); 59 kex->dh = dh_new_group16(); 62 kex->dh = dh_new_group18(); 67 if (kex->dh == NULL) 69 return (dh_gen_key(kex->dh, kex->we_need * 8)); 85 DHparams_print_fp(stderr, kex->dh); 89 if (!dh_pub_is_valid(kex->dh, dh_pu [all...] |
H A D | dh.c | 1 /* $OpenBSD: dh.c,v 1.74 2021/04/03 06:18:40 djm Exp $ */ 38 #include <openssl/dh.h> 40 #include "dh.h" 236 dh_pub_is_valid(const DH *dh, const BIGNUM *dh_pub) argument 244 DH_get0_pqg(dh, &dh_p, NULL, NULL); 284 dh_gen_key(DH *dh, int need) argument 289 DH_get0_pqg(dh, &dh_p, NULL, NULL); 301 if (!DH_set_length(dh, MINIMUM(need * 2, pbits - 1))) 304 if (DH_generate_key(dh) == 0) 306 DH_get0_key(dh, 315 DH *dh; local 340 DH *dh; local [all...] |
/freebsd-current/contrib/wpa/src/crypto/ |
H A D | dh_groups.h | 24 struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv); 27 const struct dh_group *dh);
|
/freebsd-current/contrib/tcpdump/ |
H A D | print-dccp.c | 78 #define DCCPH_CCVAL(dh) ((GET_U_1((dh)->dccph_ccval_cscov) >> 4) & 0xF) 79 #define DCCPH_CSCOV(dh) (GET_U_1((dh)->dccph_ccval_cscov) & 0xF) 81 #define DCCPH_X(dh) (GET_U_1((dh)->dccph_xtr) & 1) 82 #define DCCPH_TYPE(dh) ((GET_U_1((dh)->dccph_xtr) >> 1) & 0xF) 192 const struct dccp_hdr *dh, u_int len) 196 if (DCCPH_CSCOV(dh) 191 dccp_csum_coverage(netdissect_options *ndo, const struct dccp_hdr *dh, u_int len) argument 202 dccp_cksum(netdissect_options *ndo, const struct ip *ip, const struct dccp_hdr *dh, u_int len) argument 209 dccp6_cksum(netdissect_options *ndo, const struct ip6_hdr *ip6, const struct dccp_hdr *dh, u_int len) argument 226 const struct dccp_hdr *dh = (const struct dccp_hdr *)bp; local 240 dccp_basic_hdr_len(netdissect_options *ndo, const struct dccp_hdr *dh) argument 247 const struct dccp_hdr *dh = (const struct dccp_hdr *)bp; local 272 const struct dccp_hdr *dh; local [all...] |
/freebsd-current/contrib/bearssl/src/int/ |
H A D | i32_montmul.c | 33 uint64_t dh; local 37 dh = 0; 59 zh = dh + r1 + r2; 61 dh = zh >> 32; 66 * 'dh' word may be non-zero. 68 br_i32_sub(d, m, NEQ(dh, 0) | NOT(br_i32_sub(d, m, 0)));
|
H A D | i15_mulacc.c | 32 unsigned dl, dh; local 42 dh = (a[0] >> 4) + (b[0] >> 4); 43 d[0] = (dh << 4) + dl + (~(uint32_t)(dl - 15) >> 31);
|
H A D | i31_mulacc.c | 32 uint32_t dl, dh; local 42 dh = (a[0] >> 5) + (b[0] >> 5); 43 d[0] = (dh << 5) + dl + (~(uint32_t)(dl - 31) >> 31);
|
/freebsd-current/lib/libsecureboot/ |
H A D | veta.c | 74 DIR *dh; local 80 if (!(dh = opendir(trust))) 82 for (num = 0, de = readdir(dh); de; de = readdir(dh)) { 92 closedir(dh);
|
/freebsd-current/crypto/openssl/include/openssl/ |
H A D | dh.h | 200 OSSL_DEPRECATEDIN_3_0 int DH_set_method(DH *dh, const DH_METHOD *meth); 204 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); 216 OSSL_DEPRECATEDIN_3_0 int DH_generate_parameters_ex(DH *dh, int prime_len, 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); 222 OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key_ex(const DH *dh, cons [all...] |
/freebsd-current/crypto/openssl/providers/implementations/keymgmt/ |
H A D | dh_kmgmt.c | 24 #include "crypto/dh.h" 100 DH *dh = NULL; local 103 dh = ossl_dh_new_ex(PROV_LIBCTX_OF(provctx)); 104 if (dh != NULL) { 105 DH_clear_flags(dh, DH_FLAG_TYPE_MASK); 106 DH_set_flags(dh, DH_FLAG_TYPE_DH); 109 return dh; 114 DH *dh = NULL; local 116 dh = ossl_dh_new_ex(PROV_LIBCTX_OF(provctx)); 117 if (dh ! 131 const DH *dh = keydata; local 192 DH *dh = keydata; local 217 DH *dh = keydata; local 316 DH *dh = key; local 369 DH *dh = key; local 381 dh_validate_public(const DH *dh, int checktype) argument 398 dh_validate_private(const DH *dh) argument 411 const DH *dh = keydata; local 500 DH *dh = templ; local 694 DH *dh = NULL; local 807 DH *dh = NULL; local [all...] |
/freebsd-current/cddl/contrib/opensolaris/lib/libdtrace/common/ |
H A D | drti.c | 106 dof_helper_t dh; local 153 dh.dofhp_dof = (uintptr_t)dof; 155 dh.dofhp_addr = elf->e_type == ET_DYN ? (uintptr_t) lmp->l_base : 0; 156 dh.dofhp_pid = getpid(); 158 dh.dofhp_addr = elf->e_type == ET_DYN ? (uintptr_t) lmp->l_addr : 0; 162 (void) snprintf(dh.dofhp_mod, sizeof (dh.dofhp_mod), 165 (void) snprintf(dh.dofhp_mod, sizeof (dh.dofhp_mod), 192 if ((gen = ioctl(fd, DTRACEHIOC_ADDDOF, &dh)) [all...] |
/freebsd-current/crypto/openssl/test/ |
H A D | pem_read_depr_test.c | 18 #include <openssl/dh.h> 45 DH *dh = NULL; local 50 dh = PEM_read_bio_DHparams(infile, NULL, NULL, NULL); 51 if (!TEST_ptr(dh)) 58 DH_free(dh); 66 DH *dh = NULL; local 71 dh = PEM_read_bio_DHparams(infile, NULL, NULL, NULL); 72 if (!TEST_ptr(dh)) 79 DH_free(dh);
|