Home
last modified time | relevance | path

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

12345678910>>...14

/netbsd-src/sys/ufs/lfs/
H A Dulfs_dirhash.c82 static int ulfsdirhash_hash(struct dirhash *dh, const char *name, int namelen);
83 static void ulfsdirhash_adjfree(struct dirhash *dh, doff_t offset, int diff,
85 static void ulfsdirhash_delslot(struct dirhash *dh, int slot);
86 static int ulfsdirhash_findslot(struct dirhash *dh, const char *name,
97 #define DIRHASH_LOCK(dh) mutex_enter(&(dh)->dh_lock) argument
98 #define DIRHASH_UNLOCK(dh) mutex_exit(&(dh)->dh_lock) argument
130 struct dirhash *dh; in ulfsdirhash_build() local
172 memreqd = sizeof(*dh) + narrays * sizeof(*dh->dh_hash) + in ulfsdirhash_build()
173 narrays * DH_NBLKOFF * sizeof(**dh->dh_hash) + in ulfsdirhash_build()
174 nblocks * sizeof(*dh->dh_blkfree); in ulfsdirhash_build()
[all …]
/netbsd-src/sys/ufs/ufs/
H A Dufs_dirhash.c81 static int ufsdirhash_hash(struct dirhash *dh, const char *name, int namelen);
82 static void ufsdirhash_adjfree(struct dirhash *dh, doff_t offset, int diff,
84 static void ufsdirhash_delslot(struct dirhash *dh, int slot);
85 static int ufsdirhash_findslot(struct dirhash *dh, const char *name,
96 #define DIRHASH_LOCK(dh) mutex_enter(&(dh)->dh_lock) argument
97 #define DIRHASH_UNLOCK(dh) mutex_exit(&(dh)->dh_lock) argument
126 struct dirhash *dh; in ufsdirhash_build() local
169 memreqd = sizeof(*dh) + narrays * sizeof(*dh->dh_hash) + in ufsdirhash_build()
170 narrays * DH_NBLKOFF * sizeof(**dh->dh_hash) + in ufsdirhash_build()
171 nblocks * sizeof(*dh->dh_blkfree); in ufsdirhash_build()
[all …]
/netbsd-src/crypto/external/bsd/heimdal/dist/lib/hcrypto/
H A Ddh.c85 DH *dh; in DH_new_method() local
87 dh = calloc(1, sizeof(*dh)); in DH_new_method()
88 if (dh == NULL) in DH_new_method()
91 dh->references = 1; in DH_new_method()
95 dh->engine = engine; in DH_new_method()
97 dh->engine = ENGINE_get_default_DH(); in DH_new_method()
100 if (dh->engine) { in DH_new_method()
101 dh->meth = ENGINE_get_DH(dh->engine); in DH_new_method()
102 if (dh->meth == NULL) { in DH_new_method()
104 free(dh); in DH_new_method()
[all …]
H A Ddh-ltm.c84 ltm_dh_generate_key(DH *dh) in ltm_dh_generate_key() argument
87 int have_private_key = (dh->priv_key != NULL); in ltm_dh_generate_key()
91 if (dh->p == NULL || dh->g == NULL) in ltm_dh_generate_key()
96 size_t bits = BN_num_bits(dh->p); in ltm_dh_generate_key()
98 if (dh->priv_key) in ltm_dh_generate_key()
99 BN_free(dh->priv_key); in ltm_dh_generate_key()
101 dh->priv_key = BN_new(); in ltm_dh_generate_key()
102 if (dh->priv_key == NULL) in ltm_dh_generate_key()
104 if (!BN_rand(dh->priv_key, bits - 1, 0, 0)) { in ltm_dh_generate_key()
105 BN_clear_free(dh->priv_key); in ltm_dh_generate_key()
[all …]
H A Ddh-tfm.c84 tfm_dh_generate_key(DH *dh) in tfm_dh_generate_key() argument
87 int have_private_key = (dh->priv_key != NULL); in tfm_dh_generate_key()
91 if (dh->p == NULL || dh->g == NULL) in tfm_dh_generate_key()
96 size_t bits = BN_num_bits(dh->p); in tfm_dh_generate_key()
98 if (dh->priv_key) in tfm_dh_generate_key()
99 BN_free(dh->priv_key); in tfm_dh_generate_key()
101 dh->priv_key = BN_new(); in tfm_dh_generate_key()
102 if (dh->priv_key == NULL) in tfm_dh_generate_key()
104 if (!BN_rand(dh->priv_key, bits - 1, 0, 0)) { in tfm_dh_generate_key()
105 BN_clear_free(dh->priv_key); in tfm_dh_generate_key()
[all …]
/netbsd-src/crypto/external/bsd/openssl/dist/crypto/dh/
H A Ddh_key.c29 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) in ossl_dh_compute_key() argument
47 if (BN_num_bits(dh->params.p) > OPENSSL_DH_MAX_MODULUS_BITS) { in ossl_dh_compute_key()
52 if (dh->params.q != NULL in ossl_dh_compute_key()
53 && BN_num_bits(dh->params.q) > OPENSSL_DH_MAX_MODULUS_BITS) { in ossl_dh_compute_key()
58 if (BN_num_bits(dh->params.p) < DH_MIN_MODULUS_BITS) { in ossl_dh_compute_key()
63 ctx = BN_CTX_new_ex(dh->libctx); in ossl_dh_compute_key()
[all …]
H A Ddh_lib.c32 int DH_set_method(DH *dh, const DH_METHOD *meth) in DH_set_method() argument
39 mtmp = dh->meth; in DH_set_method()
41 mtmp->finish(dh); in DH_set_method()
43 ENGINE_finish(dh->engine); 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()
52 const DH_METHOD *ossl_dh_get_method(const DH *dh) in ossl_dh_get_method() argument
54 return dh->meth; in ossl_dh_get_method()
192 int DH_bits(const DH *dh) in DH_bits() argument
[all …]
H A Ddh_check.c28 int DH_check_params_ex(const DH *dh) in DH_check_params_ex() argument
32 if (!DH_check_params(dh, &errflags)) in DH_check_params_ex()
48 int DH_check_params(const DH *dh, int *ret) in DH_check_params() argument
57 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()
69 int DH_check_params(const DH *dh, int *ret) in DH_check_params() argument
76 ctx = BN_CTX_new_ex(dh->libctx); in DH_check_params()
84 if (!BN_is_odd(dh->params.p)) in DH_check_params()
86 if (BN_is_negative(dh->params.g) in DH_check_params()
87 || BN_is_zero(dh->params.g) in DH_check_params()
[all …]
H A Ddh_ameth.c37 DH *dh = NULL; in d2i_dhp() local
41 dh = d2i_DHxparams(NULL, pp, length); in d2i_dhp()
43 dh = d2i_DHparams(NULL, pp, length); in d2i_dhp()
45 return dh; in d2i_dhp()
57 DH_free(pkey->pkey.dh); in int_dh_free()
70 DH *dh = NULL; in dh_pub_decode() local
85 if ((dh = d2i_dhp(pkey, &pm, pmlen)) == NULL) { in dh_pub_decode()
96 if ((dh->pub_key = ASN1_INTEGER_to_BN(public_key, NULL)) == NULL) { in dh_pub_decode()
102 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, dh); in dh_pub_decode()
107 DH_free(dh); in dh_pub_decode()
[all …]
H A Ddh_group_params.c29 DH *dh = ossl_dh_new_ex(libctx); in dh_param_init() local
31 if (dh == NULL) in dh_param_init()
34 ossl_ffc_named_group_set(&dh->params, group); in dh_param_init()
35 dh->params.nid = ossl_ffc_named_group_get_uid(group); in dh_param_init()
36 dh->dirty_cnt++; in dh_param_init()
37 return dh; in dh_param_init()
56 void ossl_dh_cache_named_group(DH *dh) in ossl_dh_cache_named_group() argument
60 if (dh == NULL) in ossl_dh_cache_named_group()
63 dh->params.nid = NID_undef; /* flush cached value */ in ossl_dh_cache_named_group()
66 if (dh->params.p == NULL in ossl_dh_cache_named_group()
[all …]
H A Ddh_backend.c31 static int dh_ffc_params_fromdata(DH *dh, const OSSL_PARAM params[]) in dh_ffc_params_fromdata() argument
36 if (dh == NULL) in dh_ffc_params_fromdata()
38 ffc = ossl_dh_get0_params(dh); in dh_ffc_params_fromdata()
44 ossl_dh_cache_named_group(dh); /* This increments dh->dirty_cnt */ in dh_ffc_params_fromdata()
48 int ossl_dh_params_fromdata(DH *dh, const OSSL_PARAM params[]) in ossl_dh_params_fromdata() argument
53 if (!dh_ffc_params_fromdata(dh, params)) in ossl_dh_params_fromdata()
60 || !DH_set_length(dh, priv_len))) in ossl_dh_params_fromdata()
66 int ossl_dh_key_fromdata(DH *dh, const OSSL_PARAM params[], int include_private) in ossl_dh_key_fromdata() argument
71 if (dh == NULL) in ossl_dh_key_fromdata()
86 if (!DH_set0_key(dh, pub_key, priv_key)) in ossl_dh_key_fromdata()
[all …]
/netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/dh/
H A Ddh_key.c15 static int generate_key(DH *dh);
16 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
17 static int dh_bn_mod_exp(const DH *dh, BIGNUM *r,
20 static int dh_init(DH *dh);
21 static int dh_finish(DH *dh);
23 int DH_generate_key(DH *dh) in DH_generate_key() argument
25 return dh->meth->generate_key(dh); in DH_generate_key()
32 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) in DH_compute_key() argument
38 if ((ret = dh->meth->compute_key(key, pub_key, dh)) <= 0) in DH_compute_key()
57 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh) in DH_compute_key_padded() argument
[all …]
H A Ddh_lib.c17 int DH_set_method(DH *dh, const DH_METHOD *meth) in DH_set_method() argument
24 mtmp = dh->meth; in DH_set_method()
26 mtmp->finish(dh); in DH_set_method()
28 ENGINE_finish(dh->engine); in DH_set_method()
29 dh->engine = NULL; in DH_set_method()
31 dh->meth = meth; in DH_set_method()
33 meth->init(dh); in DH_set_method()
152 int DH_bits(const DH *dh) in DH_bits() argument
154 return BN_num_bits(dh->p); in DH_bits()
157 int DH_size(const DH *dh) in DH_size() argument
[all …]
H A Ddh_check.c23 int DH_check_params_ex(const DH *dh) in DH_check_params_ex() argument
27 if (!DH_check_params(dh, &errflags)) in DH_check_params_ex()
38 int DH_check_params(const DH *dh, int *ret) in DH_check_params() argument
53 if (!BN_is_odd(dh->p)) in DH_check_params()
55 if (BN_is_negative(dh->g) || BN_is_zero(dh->g) || BN_is_one(dh->g)) in DH_check_params()
57 if (BN_copy(tmp, dh->p) == NULL || !BN_sub_word(tmp, 1)) in DH_check_params()
59 if (BN_cmp(dh->g, tmp) >= 0) in DH_check_params()
73 int DH_check_ex(const DH *dh) in DH_check_ex() argument
77 if (!DH_check(dh, &errflags)) in DH_check_ex()
98 int DH_check(const DH *dh, int *ret) in DH_check() argument
[all …]
H A Ddh_asn1.c84 DH *dh = NULL; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname() local
85 dh = DH_new(); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname()
86 if (dh == NULL) in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname()
90 DH_free(dh); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname()
96 *a = dh; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname()
99 dh->p = dhx->p; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname()
100 dh->q = dhx->q; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname()
101 dh->g = dhx->g; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname()
102 dh->j = dhx->j; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname()
105 dh->seed = dhx->vparams->seed->data; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname()
[all …]
H A Ddh_rfc7919.c19 DH *dh = DH_new(); in dh_param_init() local
20 if (dh == NULL) in dh_param_init()
22 dh->p = (BIGNUM *)p; in dh_param_init()
23 dh->g = (BIGNUM *)&_bignum_const_2; in dh_param_init()
24 dh->length = nbits; in dh_param_init()
25 return dh; in dh_param_init()
47 int DH_get_nid(const DH *dh) in DH_get_nid() argument
51 if (BN_get_word(dh->g) != 2) in DH_get_nid()
53 if (!BN_cmp(dh->p, &_bignum_ffdhe2048_p)) in DH_get_nid()
55 else if (!BN_cmp(dh->p, &_bignum_ffdhe3072_p)) in DH_get_nid()
[all …]
H A Ddh_ameth.c42 DH_free(pkey->pkey.dh); in int_dh_free()
55 DH *dh = NULL; in dh_pub_decode() local
70 if ((dh = d2i_dhp(pkey, &pm, pmlen)) == NULL) { in dh_pub_decode()
81 if ((dh->pub_key = ASN1_INTEGER_to_BN(public_key, NULL)) == NULL) { in dh_pub_decode()
87 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, dh); in dh_pub_decode()
92 DH_free(dh); in dh_pub_decode()
99 DH *dh; in dh_pub_encode() local
106 dh = pkey->pkey.dh; in dh_pub_encode()
113 str->length = i2d_dhp(pkey, dh, &str->data); in dh_pub_encode()
120 pub_key = BN_to_ASN1_INTEGER(dh->pub_key, NULL); in dh_pub_encode()
[all …]
/netbsd-src/external/mpl/dhcp/bind/dist/lib/dns/
H A Dopenssldh_link.c85 DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) { in DH_get0_key() argument
87 *pub_key = dh->pub_key; in DH_get0_key()
90 *priv_key = dh->priv_key; in DH_get0_key()
95 DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { in DH_set0_key() argument
97 BN_free(dh->pub_key); in DH_set0_key()
98 dh->pub_key = pub_key; in DH_set0_key()
102 BN_free(dh->priv_key); in DH_set0_key()
103 dh->priv_key = priv_key; in DH_set0_key()
110 DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, in DH_get0_pqg() argument
113 *p = dh->p; in DH_get0_pqg()
[all …]
/netbsd-src/crypto/external/bsd/openssl/dist/providers/implementations/keymgmt/
H A Ddh_kmgmt.c100 DH *dh = NULL; in dh_newdata() local
103 dh = ossl_dh_new_ex(PROV_LIBCTX_OF(provctx)); in dh_newdata()
104 if (dh != NULL) { in dh_newdata()
105 DH_clear_flags(dh, DH_FLAG_TYPE_MASK); in dh_newdata()
106 DH_set_flags(dh, DH_FLAG_TYPE_DH); in dh_newdata()
109 return dh; in dh_newdata()
114 DH *dh = NULL; in dhx_newdata() local
116 dh = ossl_dh_new_ex(PROV_LIBCTX_OF(provctx)); in dhx_newdata()
117 if (dh != NULL) { in dhx_newdata()
118 DH_clear_flags(dh, DH_FLAG_TYPE_MASK); in dhx_newdata()
[all …]
/netbsd-src/crypto/external/bsd/openssl/dist/include/crypto/
H A Ddh.h22 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_BLD *bld, OSSL_PARAM params[]);
37 int ossl_dh_key_todata(DH *dh, OSSL_PARAM_BLD *bld, OSSL_PARAM params[],
[all …]
/netbsd-src/sys/arch/mac68k/dev/
H A Dsbc.c427 struct sbc_pdma_handle *dh = sr->sr_dma_hand; in sbc_drq_intr() local
438 if (sbc_ready(ncr_sc) || dh->dh_len == 0) in sbc_drq_intr()
444 device_xname(ncr_sc->sc_dev), dh->dh_len, dh->dh_flags); in sbc_drq_intr()
459 if ((dh->dh_flags & SBC_DH_DONE) == 0) { in sbc_drq_intr()
463 if ((count < 0) || (count > dh->dh_len)) { in sbc_drq_intr()
466 dh->dh_len); in sbc_drq_intr()
470 dh->dh_addr += count; in sbc_drq_intr()
471 dh->dh_len -= count; in sbc_drq_intr()
478 device_xname(ncr_sc->sc_dev), count, dh in sbc_drq_intr()
609 struct sbc_pdma_handle *dh; sbc_dma_alloc() local
654 struct sbc_pdma_handle *dh = sr->sr_dma_hand; sbc_dma_free() local
702 struct sbc_pdma_handle *dh = sr->sr_dma_hand; sbc_dma_start() local
745 struct sbc_pdma_handle *dh = sr->sr_dma_hand; sbc_dma_stop() local
[all...]
/netbsd-src/crypto/external/bsd/openssl.old/dist/include/openssl/
H A Ddh.h121 int DH_set_method(DH *dh, const DH_METHOD *meth);
125 void DH_free(DH *dh);
126 int DH_up_ref(DH *dh);
127 int DH_bits(const DH *dh);
128 int DH_size(const DH *dh);
129 int DH_security_bits(const DH *dh);
142 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator,
145 int DH_check_params_ex(const DH *dh);
146 int DH_check_ex(const DH *dh);
147 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key);
[all …]
/netbsd-src/crypto/external/bsd/openssl/dist/include/openssl/
H A Ddh.h200 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, const BIGNUM *pub_key);
[all …]
/netbsd-src/external/mpl/bind/dist/lib/dns/
H A Dopenssl_shim.c175 DH_get0_key(const DH * dh,const BIGNUM ** pub_key,const BIGNUM ** priv_key) DH_get0_key() argument
185 DH_set0_key(DH * dh,BIGNUM * pub_key,BIGNUM * priv_key) DH_set0_key() argument
200 DH_get0_pqg(const DH * dh,const BIGNUM ** p,const BIGNUM ** q,const BIGNUM ** g) DH_get0_pqg() argument
214 DH_set0_pqg(DH * dh,BIGNUM * p,BIGNUM * q,BIGNUM * g) DH_set0_pqg() argument
/netbsd-src/crypto/external/bsd/openssl.old/dist/apps/
H A Ddhparam.c68 DH *dh = NULL; in dhparam_main() local
187 dh = DSA_dup_DH(dsa); in dhparam_main()
189 if (dh == NULL) { in dhparam_main()
197 dh = DH_new(); in dhparam_main()
202 if (dh == NULL || !DH_generate_parameters_ex(dh, num, g, cb)) { in dhparam_main()
231 dh = DSA_dup_DH(dsa); in dhparam_main()
233 if (dh == NULL) { in dhparam_main()
245 dh = d2i_DHparams_bio(in, NULL); in dhparam_main()
247 if (dh == NULL && BIO_reset(in) == 0) in dhparam_main()
248 dh = d2i_DHxparams_bio(in, NULL); in dhparam_main()
[all …]

12345678910>>...14