/dragonfly/sys/vfs/ufs/ |
H A D | ufs_dirhash.c | 139 memreqd = sizeof(*dh) + narrays * sizeof(*dh->dh_hash) + in ufsdirhash_build() 157 dh = kmalloc(sizeof *dh, M_DIRHASH, M_NOWAIT | M_ZERO); in ufsdirhash_build() 164 if (dh->dh_hash == NULL || dh->dh_blkfree == NULL) in ufsdirhash_build() 262 mem += dh->dh_narrays * sizeof(*dh->dh_hash) + in ufsdirhash_free() 264 dh->dh_nblk * sizeof(*dh->dh_blkfree); in ufsdirhash_free() 394 if (dh->dh_seqopt == 0 && dh->dh_seqoff == offset) in ufsdirhash_lookup() 564 if (dh->dh_hused >= (dh->dh_hlen * 3) / 4) { in ufsdirhash_add() 695 if (block < dh->dh_nblk / 8 && dh->dh_narrays > 1) { in ufsdirhash_dirtrunc() 800 hash = fnv_32_buf(&dh, sizeof(dh), hash); in ufsdirhash_hash() 817 KASSERT(block < dh->dh_nblk && block < dh->dh_dirblks, in ufsdirhash_adjfree() [all …]
|
/dragonfly/crypto/libressl/crypto/dh/ |
H A D | dh_lib.c | 108 meth->init(dh); in DH_set_method() 271 *p = dh->p; in DH_get0_pqg() 273 *q = dh->q; in DH_get0_pqg() 275 *g = dh->g; in DH_get0_pqg() 286 dh->p = p; in DH_set0_pqg() 290 dh->q = q; in DH_set0_pqg() 291 dh->length = BN_num_bits(dh->q); in DH_set0_pqg() 295 dh->g = g; in DH_set0_pqg() 328 return dh->p; in DH_get0_p() 334 return dh->q; in DH_get0_q() [all …]
|
H A D | dh_key.c | 76 DH_generate_key(DH *dh) in DH_generate_key() argument 78 return dh->meth->generate_key(dh); in DH_generate_key() 84 return dh->meth->compute_key(key, pub_key, dh); in DH_compute_key() 103 generate_key(DH *dh) in generate_key() argument 138 if (dh->q) { in generate_key() 147 l = dh->length ? dh->length : BN_num_bits(dh->p) - 1; in generate_key() 153 if (!dh->meth->bn_mod_exp(dh, pub_key, dh->g, priv_key, dh->p, ctx, in generate_key() 157 dh->pub_key = pub_key; in generate_key() 214 if (!dh->meth->bn_mod_exp(dh, tmp, pub_key, dh->priv_key, dh->p, ctx, in compute_key() 237 dh_init(DH *dh) in dh_init() argument [all …]
|
H A D | dh_ameth.c | 125 DH_free(dh); in dh_pub_decode() 132 DH *dh; in dh_pub_encode() local 139 dh=pkey->pkey.dh; in dh_pub_encode() 231 DH_free(dh); in dh_priv_decode() 297 DH *dh; in dh_param_decode() local 409 if (BN_cmp(a->pkey.dh->p, b->pkey.dh->p) || in dh_cmp_parameters() 410 BN_cmp(a->pkey.dh->g, b->pkey.dh->g)) in dh_cmp_parameters() 437 if (!a->pkey.dh->p || !a->pkey.dh->g) in dh_missing_parameters() 480 DH *dh = pkey->pkey.dh; in dh_pkey_public_check() local 487 return DH_check_pub_key_ex(dh, dh->pub_key); in dh_pkey_public_check() [all …]
|
H A D | dh_check.c | 99 if (!BN_is_odd(dh->p)) in DH_check_params() 131 DH_check_ex(const DH *dh) in DH_check_ex() argument 135 if (!DH_check(dh, &flags)) in DH_check_ex() 173 if (dh->q != NULL) { in DH_check() 182 if (!BN_mod_exp_ct(residue, dh->g, dh->q, dh->p, ctx)) in DH_check() 194 if (!BN_div_ct(quotient, residue, dh->p, dh->q, ctx)) in DH_check() 198 if (dh->j != NULL && BN_cmp(dh->j, quotient) != 0) in DH_check() 208 else if (dh->q == NULL) { in DH_check() 213 if (!BN_rshift1(q, dh->p)) in DH_check() 282 if (dh->q != NULL) { in DH_check_pub_key() [all …]
|
H A D | dh_local.h | 67 int (*generate_key)(DH *dh); 68 int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh); 69 int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a, 71 int (*init)(DH *dh); 72 int (*finish)(DH *dh); 76 int (*generate_params)(DH *dh, int prime_len, int generator, 110 int DH_check_params_ex(const DH *dh); 111 int DH_check_params(const DH *dh, int *flags); 112 int DH_check_ex(const DH *dh); 113 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key);
|
H A D | dh_pmeth.c | 192 DH *dh = NULL; in pkey_dh_paramgen() local 202 dh = DH_new(); in pkey_dh_paramgen() 203 if (!dh) in pkey_dh_paramgen() 208 EVP_PKEY_assign_DH(pkey, dh); in pkey_dh_paramgen() 210 DH_free(dh); in pkey_dh_paramgen() 217 DH *dh = NULL; in pkey_dh_keygen() local 223 dh = DH_new(); in pkey_dh_keygen() 224 if (!dh) in pkey_dh_keygen() 226 EVP_PKEY_assign_DH(pkey, dh); in pkey_dh_keygen() 230 return DH_generate_key(pkey->pkey.dh); in pkey_dh_keygen() [all …]
|
/dragonfly/crypto/libressl/include/openssl/ |
H A D | dh.h | 138 void DH_free(DH *dh); 139 int DH_up_ref(DH *dh); 140 int DH_size(const DH *dh); 141 int DH_bits(const DH *dh); 146 int DH_security_bits(const DH *dh); 154 const BIGNUM *DH_get0_p(const DH *dh); 155 const BIGNUM *DH_get0_q(const DH *dh); 156 const BIGNUM *DH_get0_g(const DH *dh); 161 void DH_set_flags(DH *dh, int flags); 162 long DH_get_length(const DH *dh); [all …]
|
/dragonfly/contrib/tcpdump/ |
H A D | print-dccp.c | 78 #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 …]
|
/dragonfly/contrib/gmp/mpn/generic/ |
H A D | hgcd2.c | 101 dh = (dh << 1) | (dl >> (GMP_LIMB_BITS - 1)); in div2() 108 if (nh > dh || (nh == dh && nl >= dl)) in div2() 114 dh = dh >> 1; in div2() 121 for (cnt = 0; nh > dh || (nh == dh && nl >= dl); cnt++) in div2() 123 dh = (dh << 1) | (dl >> (GMP_LIMB_BITS - 1)); in div2() 130 dh = dh >> 1; in div2() 132 if (nh > dh || (nh == dh && nl >= dl)) in div2() 163 dh = (dh << dcnt) + (-(dcnt > 0) & (dl >> (GMP_LIMB_BITS - dcnt))); 170 if (UNLIKELY (nh == dh)) 173 bit = (nh > dh); [all …]
|
H A D | div_q.c | 95 mp_limb_t cy, dh, qh; in mpn_div_q() local 125 dh = dp[dn - 1]; in mpn_div_q() 126 if (LIKELY ((dh & GMP_NUMB_HIGHBIT) == 0)) in mpn_div_q() 128 count_leading_zeros (cnt, dh); in mpn_div_q() 186 invert_pi1 (dinv, dh, dp[dn - 2]); in mpn_div_q() 194 invert_pi1 (dinv, dh, dp[dn - 2]); in mpn_div_q() 220 dh = dp[dn - 1]; in mpn_div_q() 221 if (LIKELY ((dh & GMP_NUMB_HIGHBIT) == 0)) in mpn_div_q() 223 count_leading_zeros (cnt, dh); in mpn_div_q() 279 invert_pi1 (dinv, dh, new_dp[qn - 1]); in mpn_div_q() [all …]
|
/dragonfly/contrib/wpa_supplicant/src/crypto/ |
H A D | dh_groups.c | 1198 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 …]
|
H A D | crypto_openssl.c | 752 DH *dh; in dh5_init() local 765 if (dh->g == NULL || BN_set_word(dh->g, 2) != 1) in dh5_init() 793 return dh; in dh5_init() 801 DH *dh; in dh5_init() 843 return dh; in dh5_init() 862 DH *dh; in dh5_init_fixed() local 869 if (dh->g == NULL || BN_set_word(dh->g, 2) != 1) in dh5_init_fixed() 887 return dh; in dh5_init_fixed() 893 DH *dh; in dh5_init_fixed() 970 DH *dh; in dh5_free() local [all …]
|
H A D | crypto_wolfssl.c | 654 if (!dh) in dh5_init() 680 ret = dh; in dh5_init() 683 dh = NULL; in dh5_init() 689 if (dh) { in dh5_init() 701 DhKey *dh; in dh5_init_fixed() local 706 if (!dh) in dh5_init_fixed() 728 ret = dh; in dh5_init_fixed() 729 dh = NULL; in dh5_init_fixed() 731 if (dh) { in dh5_init_fixed() 790 if (!dh) in crypto_dh_init() [all …]
|
/dragonfly/crypto/openssh/ |
H A D | kexdh.c | 52 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 D | dh.c | 284 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 …]
|
H A D | kexgexs.c | 102 kex->dh = PRIVSEP(choose_dh(min, nbits, max)); in input_kex_dh_gex_request() 103 if (kex->dh == NULL) { in input_kex_dh_gex_request() 109 DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g); in input_kex_dh_gex_request() 117 if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0) in input_kex_dh_gex_request() 166 DH_get0_key(kex->dh, &pub_key, NULL); in input_kex_dh_gex_init() 167 DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g); in input_kex_dh_gex_init() 209 DH_free(kex->dh); in input_kex_dh_gex_init() 210 kex->dh = NULL; in input_kex_dh_gex_init()
|
H A D | kexgexc.c | 114 if ((kex->dh = dh_new_group(g, p)) == NULL) { in input_kex_dh_gex_group() 121 if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0) in input_kex_dh_gex_group() 123 DH_get0_key(kex->dh, &pub_key, NULL); in input_kex_dh_gex_group() 130 DHparams_print_fp(stderr, kex->dh); in input_kex_dh_gex_group() 187 DH_get0_key(kex->dh, &pub_key, NULL); in input_kex_dh_gex_reply() 188 DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g); in input_kex_dh_gex_reply() 231 DH_free(kex->dh); in input_kex_dh_gex_reply() 232 kex->dh = NULL; in input_kex_dh_gex_reply()
|
/dragonfly/crypto/libressl/ssl/ |
H A D | ssl_kex.c | 42 if (!DH_set0_pqg(dh, p, NULL, g)) in ssl_kex_generate_dhe() 47 if (!DH_generate_key(dh)) in ssl_kex_generate_dhe() 86 if (!DH_set0_pqg(dh, p, NULL, g)) in ssl_kex_generate_dhe_params_auto() 91 if (!DH_generate_key(dh)) in ssl_kex_generate_dhe_params_auto() 104 ssl_kex_params_dhe(DH *dh, CBB *cbb) in ssl_kex_params_dhe() argument 136 ssl_kex_public_dhe(DH *dh, CBB *cbb) in ssl_kex_public_dhe() argument 183 if (!DH_set0_pqg(dh, p, NULL, g)) in ssl_kex_peer_params_dhe() 190 if (DH_bits(dh) < DHE_MINIMUM_BITS) in ssl_kex_peer_params_dhe() 223 if (!DH_set0_key(dh, pub_key, NULL)) in ssl_kex_peer_public_dhe() 227 if (!DH_check_pub_key(dh, DH_get0_pub_key(dh), &check_flags)) in ssl_kex_peer_public_dhe() [all …]
|
/dragonfly/crypto/libressl/apps/openssl/ |
H A D | dhparam.c | 242 DH *dh = NULL; in dhparam_main() local 304 dh = DSA_dup_DH(dsa); in dhparam_main() 306 if (dh == NULL) { in dhparam_main() 311 dh = DH_new(); in dhparam_main() 314 if (!dh || !DH_generate_parameters_ex(dh, num, dhparam_config.g, cb)) { in dhparam_main() 353 dh = DSA_dup_DH(dsa); in dhparam_main() 355 if (dh == NULL) { in dhparam_main() 366 if (dh == NULL) { in dhparam_main() 392 DHparams_print(out, dh); in dhparam_main() 395 if (!DH_check(dh, &i)) { in dhparam_main() [all …]
|
H A D | dh.c | 156 DH *dh = NULL; in dh_main() local 202 dh = d2i_DHparams_bio(in, NULL); in dh_main() 209 if (dh == NULL) { in dh_main() 215 DHparams_print(out, dh); in dh_main() 218 if (!DH_check(dh, &i)) { in dh_main() 237 len = BN_num_bytes(DH_get0_p(dh)); in dh_main() 238 bits = BN_num_bits(DH_get0_p(dh)); in dh_main() 244 l = BN_bn2bin(DH_get0_p(dh), data); in dh_main() 253 l = BN_bn2bin(DH_get0_g(dh), data); in dh_main() 278 i = i2d_DHparams_bio(out, dh); in dh_main() [all …]
|
H A D | gendh.c | 132 DH *dh = NULL; in gendh_main() local 187 if (((dh = DH_new()) == NULL) || in gendh_main() 188 !DH_generate_parameters_ex(dh, numbits, gendh_config.g, cb)) in gendh_main() 191 if (!PEM_write_bio_DHparams(out, dh)) in gendh_main() 199 DH_free(dh); in gendh_main()
|
/dragonfly/contrib/wpa_supplicant/src/eap_common/ |
H A D | eap_eke_common.c | 163 const struct dh_group *dh; in eap_eke_dh_init() local 166 dh = eap_eke_dh_group(group); in eap_eke_dh_init() 171 if (crypto_dh_init(gen, dh->prime, dh->prime_len, ret_priv, in eap_eke_dh_init() 175 ret_priv, dh->prime_len); in eap_eke_dh_init() 177 ret_pub, dh->prime_len); in eap_eke_dh_init() 384 const struct dh_group *dh; in eap_eke_shared_secret() local 397 peer_pub, dh->prime_len); in eap_eke_shared_secret() 400 len = dh->prime_len; in eap_eke_shared_secret() 401 if (crypto_dh_derive_secret(*dh->generator, dh->prime, dh->prime_len, in eap_eke_shared_secret() 405 if (len < dh->prime_len) { in eap_eke_shared_secret() [all …]
|
/dragonfly/stand/boot/pc32/boot2/ |
H A D | boot1.S | 130 movb %dh,%al // blocks to 176 movb $0x1,%dh // Block count 180 movb $0x1,%dh // Partition 189 incb %dh // Partition 190 cmpb $0x1+PRT_NUM,%dh // In table? 229 movb $NSECT,%dh // Sector count 381 movb %dh,%ch // Max head number 407 movb %bh,%dh // Head number
|
/dragonfly/contrib/wpa_supplicant/src/eap_peer/ |
H A D | ikev2.c | 54 data->dh); in ikev2_derive_keys() 192 prop->dh = transform_id; in ikev2_parse_transform() 320 prop.dh = -1; in ikev2_process_sai1() 326 prop.encr != -1 && prop.dh != -1) { in ikev2_process_sai1() 328 data->dh = dh_groups_get(prop.dh); in ikev2_process_sai1() 379 if (group != data->proposal.dh) { in ikev2_process_kei() 382 group, data->proposal.dh); in ikev2_process_kei() 390 if (data->dh == NULL) { in ikev2_process_kei() 399 if (kei_len - 4 != data->dh->prime_len) { in ikev2_process_kei() 1043 if (data->proposal.dh == -1) { in ikev2_build_notification() [all …]
|