Home
last modified time | relevance | path

Searched full:dh (Results 1 – 25 of 736) sorted by relevance

12345678910>>...30

/freebsd/crypto/heimdal/doc/doxyout/hcrypto/man/man3/
H A Dhcrypto_dh.313 .RI "DH * \fBDH_new\fP (void)"
16 .RI "DH * \fBDH_new_method\fP (ENGINE *engine)"
19 .RI "void \fBDH_free\fP (DH *dh)"
22 .RI "int \fBDH_up_ref\fP (DH *dh)"
25 .RI "int \fBDH_size\fP (const DH *dh)"
28 .RI "int \fBDH_set_ex_data\fP (DH *dh, int idx, void *data)"
31 .RI "void * \fBDH_get_ex_data\fP (DH *dh, int idx)"
34 .RI "int \fBDH_generate_parameters_ex\fP (DH *dh, int prime_len, int generator, BN_GENCB *cb)"
37 .RI "int \fBDH_check_pubkey\fP (const DH *dh, const BIGNUM *pub_key, int *codes)"
40 .RI "int \fBDH_generate_key\fP (DH *dh)"
[all …]
/freebsd/crypto/openssl/crypto/dh/
H A Ddh_lib.c11 * DH low level APIs are deprecated for public use, but still ok for
26 #include "crypto/dh.h"
29 static DH *dh_new_intern(ENGINE *engine, OSSL_LIB_CTX *libctx);
32 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()
[all …]
H A Ddh_key.c11 * DH low level APIs are deprecated for public use, but still ok for
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);
38 * Finite Field Cryptography Diffie-Hellman (FFC DH) Primitive
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()
[all …]
H A Ddh_ameth.c11 * DH low level APIs are deprecated for public use, but still ok for
25 #include "crypto/dh.h"
30 * i2d/d2i like DH parameter functions which use the appropriate routine for
31 * PKCS#3 DH or X9.42 DH.
34 static DH *d2i_dhp(const EVP_PKEY *pkey, const unsigned char **pp, in d2i_dhp()
37 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()
48 static int i2d_dhp(const EVP_PKEY *pkey, const DH *a, unsigned char **pp) in i2d_dhp()
[all …]
H A Ddh_check.c11 * DH low level APIs are deprecated for public use, but still ok for
21 #include "crypto/dh.h"
29 int DH_check_params_ex(const DH *dh) in DH_check_params_ex() argument
33 if (!DH_check_params(dh, &errflags)) in DH_check_params_ex()
49 int DH_check_params(const DH *dh, int *ret) in DH_check_params() argument
58 nid = DH_get_nid((DH *)dh); in DH_check_params()
66 return ossl_ffc_params_FIPS186_4_validate(dh->libctx, &dh->params, in DH_check_params()
70 int DH_check_params(const DH *dh, int *ret) in DH_check_params() argument
77 ctx = BN_CTX_new_ex(dh->libctx); in DH_check_params()
85 if (!BN_is_odd(dh->params.p)) in DH_check_params()
[all …]
H A Ddh_backend.c11 * DH low level APIs are deprecated for public use, but still ok for
22 #include "crypto/dh.h"
31 static int dh_ffc_params_fromdata(DH *dh, const OSSL_PARAM params[]) in dh_ffc_params_fromdata() argument
34 FFC_PARAMS *ffc = ossl_dh_get0_params(dh); in dh_ffc_params_fromdata()
38 ossl_dh_cache_named_group(dh); /* This increments dh->dirty_cnt */ in dh_ffc_params_fromdata()
42 int ossl_dh_params_fromdata(DH *dh, const OSSL_PARAM params[]) in ossl_dh_params_fromdata() argument
47 if (!dh_ffc_params_fromdata(dh, params)) in ossl_dh_params_fromdata()
54 || !DH_set_length(dh, priv_len))) in ossl_dh_params_fromdata()
60 int ossl_dh_key_fromdata(DH *dh, const OSSL_PARAM params[], int include_private) in ossl_dh_key_fromdata() argument
65 if (dh == NULL) in ossl_dh_key_fromdata()
[all …]
H A Ddh_group_params.c10 /* DH parameters from RFC7919 and RFC3526 */
13 * DH low level APIs are deprecated for public use, but still ok for
25 #include "crypto/dh.h"
27 static DH *dh_param_init(OSSL_LIB_CTX *libctx, const DH_NAMED_GROUP *group) in dh_param_init()
29 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()
[all …]
H A Ddh_asn1.c11 * DH low level APIs are deprecated for public use, but still ok for
22 #include "crypto/dh.h"
34 DH_free((DH *)*pval); in dh_cb()
38 DH *dh = (DH *)*pval; in dh_cb() local
40 DH_clear_flags(dh, DH_FLAG_TYPE_MASK); in dh_cb()
41 DH_set_flags(dh, DH_FLAG_TYPE_DH); in dh_cb()
42 ossl_dh_cache_named_group(dh); in dh_cb()
43 dh->dirty_cnt++; in dh_cb()
49 ASN1_SIMPLE(DH, params.p, BIGNUM),
50 ASN1_SIMPLE(DH, params.g, BIGNUM),
[all …]
H A Ddh_rfc5114.c11 * DH low level APIs are deprecated for public use, but still ok for
23 * Macro to make a DH structure from BIGNUM data. NB: although just copying
29 DH *DH_get_##x(void) \
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); \
[all …]
/freebsd/crypto/openssl/include/openssl/
H A Ddh.h29 * DH parameter generation types used by EVP_PKEY_CTX_set_dh_paramgen_type()
123 * If this flag is set the DH method is FIPS compliant and can be used in
141 /* typedef struct dh_st DH; */
178 (DH *)ASN1_d2i_fp((char *(*)())DH_new, \
185 ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, bp, x)
187 ASN1_i2d_bio_of(DH, i2d_DHparams, bp, x)
190 (DH *)ASN1_d2i_fp((char *(*)())DH_new, \
197 ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, bp, x)
199 ASN1_i2d_bio_of(DH, i2d_DHxparams, bp, x)
201 DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, DH, DHparams)
[all …]
/freebsd/crypto/openssl/include/crypto/
H A Ddh.h16 # include <openssl/dh.h>
19 DH *ossl_dh_new_by_nid_ex(OSSL_LIB_CTX *libctx, int nid);
20 DH *ossl_dh_new_ex(OSSL_LIB_CTX *libctx);
21 void ossl_dh_set0_libctx(DH *d, OSSL_LIB_CTX *libctx);
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);
[all …]
/freebsd/sys/ufs/ufs/
H A Dufs_dirhash.c94 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) \ argument
111 sx_assert(&(dh)->dh_lock, SA_LOCKED)
153 ufsdirhash_hold(struct dirhash *dh) in ufsdirhash_hold() argument
156 refcount_acquire(&dh->dh_refcount); in ufsdirhash_hold()
160 ufsdirhash_drop(struct dirhash *dh) in ufsdirhash_drop() argument
163 if (refcount_release(&dh->dh_refcount)) { in ufsdirhash_drop()
[all …]
/freebsd/secure/lib/libcrypto/man/man3/
H A DDH_get0_pqg.368 DH_get_length, DH_set_length \- Routines for getting and setting data in a DH object
72 \& #include <openssl/dh.h>
80 \& void DH_get0_pqg(const DH *dh,
82 \& int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
83 \& void DH_get0_key(const DH *dh,
85 \& int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
86 \& const BIGNUM *DH_get0_p(const DH *dh);
87 \& const BIGNUM *DH_get0_q(const DH *dh);
88 \& const BIGNUM *DH_get0_g(const DH *dh);
89 \& const BIGNUM *DH_get0_priv_key(const DH *dh);
[all …]
H A DSSL_CTX_set_tmp_dh_callback.367 \&\- handle DH keys for ephemeral key exchange
85 \& DH *(*tmp_dh_callback)(SSL *ssl, int is_export,
87 \& long SSL_CTX_set_tmp_dh(SSL_CTX *ctx, DH *dh);
90 \& DH *(*tmp_dh_callback)(SSL *ssl, int is_export,
92 \& long SSL_set_tmp_dh(SSL *ssl, DH *dh);
98 Some ciphersuites may use ephemeral Diffie-Hellman (DH) key exchange. In these
99 cases, the session data is negotiated using the ephemeral/temporary DH key and
104 Using ephemeral DH key exchange yields forward secrecy as the connection
105 can only be decrypted when the DH key is known. By generating a temporary
111 In order to perform a DH key exchange the server must use a DH group
[all …]
H A DDH_meth_new.370 DH_meth_set_generate_params \- Routines to build up DH methods
74 \& #include <openssl/dh.h>
97 \& int (*DH_meth_get_generate_key(const DH_METHOD *dhm))(DH *);
98 \& int DH_meth_set_generate_key(DH_METHOD *dhm, int (*generate_key)(DH *));
101 \& (unsigned char *key, const BIGNUM *pub_key, DH *dh);
103 \& int (*compute_key)(unsigned char *key, const BIGNUM *pub_key, DH *dh));
106 \& (const DH *dh, BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
109 \& int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a,
113 \& int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *);
114 \& int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *));
[all …]
/freebsd/crypto/openssl/doc/man3/
H A DDH_get0_pqg.pod9 DH_get_length, DH_set_length - Routines for getting and setting data in a DH object
13 #include <openssl/dh.h>
19 void DH_get0_pqg(const DH *dh,
21 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
22 void DH_get0_key(const DH *dh,
24 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
25 const BIGNUM *DH_get0_p(const DH *dh);
26 const BIGNUM *DH_get0_q(const DH *dh);
27 const BIGNUM *DH_get0_g(const DH *dh);
28 const BIGNUM *DH_get0_priv_key(const DH *dh);
[all …]
H A DSSL_CTX_set_tmp_dh_callback.pod8 - handle DH keys for ephemeral key exchange
24 DH *(*tmp_dh_callback)(SSL *ssl, int is_export,
26 long SSL_CTX_set_tmp_dh(SSL_CTX *ctx, DH *dh);
29 DH *(*tmp_dh_callback)(SSL *ssl, int is_export,
31 long SSL_set_tmp_dh(SSL *ssl, DH *dh);
37 Some ciphersuites may use ephemeral Diffie-Hellman (DH) key exchange. In these
38 cases, the session data is negotiated using the ephemeral/temporary DH key and
41 DH keys.
43 Using ephemeral DH key exchange yields forward secrecy as the connection
44 can only be decrypted when the DH key is known. By generating a temporary
[all …]
H A DDH_meth_new.pod11 DH_meth_set_generate_params - Routines to build up DH methods
15 #include <openssl/dh.h>
36 int (*DH_meth_get_generate_key(const DH_METHOD *dhm))(DH *);
37 int DH_meth_set_generate_key(DH_METHOD *dhm, int (*generate_key)(DH *));
40 (unsigned char *key, const BIGNUM *pub_key, DH *dh);
42 int (*compute_key)(unsigned char *key, const BIGNUM *pub_key, DH *dh));
45 (const DH *dh, BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
48 int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a,
52 int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *);
53 int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *));
[all …]
H A DDH_generate_key.pod10 #include <openssl/dh.h>
16 int DH_generate_key(DH *dh);
18 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
20 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
29 exchange by generating private and public DH values. By calling
33 DH_generate_key() expects B<dh> to contain the shared parameters
34 B<dh-E<gt>p> and B<dh-E<gt>g>. It generates a random private DH value
35 unless B<dh-E<gt>priv_key> is already set, and computes the
36 corresponding public value B<dh-E<gt>pub_key>, which can then be
39 DH_compute_key() computes the shared secret from the private DH value
[all …]
/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()
60 memcpy(dh->dh_magic, hdr, 2); in libpe_parse_msdos_header()
62 PE_READ16(hdr, dh->dh_lastsize); in libpe_parse_msdos_header()
63 PE_READ16(hdr, dh->dh_nblock); in libpe_parse_msdos_header()
64 PE_READ16(hdr, dh->dh_nreloc); in libpe_parse_msdos_header()
65 PE_READ16(hdr, dh->dh_hdrsize); in libpe_parse_msdos_header()
66 PE_READ16(hdr, dh->dh_minalloc); in libpe_parse_msdos_header()
67 PE_READ16(hdr, dh->dh_maxalloc); in libpe_parse_msdos_header()
[all …]
/freebsd/crypto/openssl/test/recipes/
H A D15-test_gendhparam.t21 expect => [ 'BEGIN X9.42 DH PARAMETERS', 'gindex:', 'pcounter:', 'SEED:' ],
22 message => 'DH fips186_4 param gen with verifiable g',
25 algorithm => 'DH',
33 expect => [ 'BEGIN X9.42 DH PARAMETERS', 'gindex:', 'pcounter:', 'SEED:' ],
34 message => 'DH fips186_4 param gen with verifiable g and truncated digest',
39 expect => [ 'BEGIN X9.42 DH PARAMETERS', 'h:', 'pcounter:', 'SEED:' ],
46 expect => [ "BEGIN X9.42 DH PARAMETERS" ],
49 algorithm => 'DH',
51 … message => 'DH fips186_2 param gen with a selected p and q size using aliases should fail',
55 algorithm => 'DH',
[all …]
H A D15-test_gendh.t19 plan skip_all => "This test is unsupported in a no-dh build" if disabled("dh");
23 ok(run(app([ 'openssl', 'genpkey', '-algorithm', 'DH',
26 "genpkey DH default group");
28 ok(run(app([ 'openssl', 'genpkey', '-algorithm', 'DH',
32 "genpkey DH group ffdhe2048");
39 "genpkey DH params fips186_4 PEM");
49 "genpkey DH fips186_4 with PEM params");
52 '-algorithm', 'DH'])),
53 "genpkey DH with no params should fail");
55 ok(!run(app([ 'openssl', 'genpkey', '-algorithm', 'DH', '-pkeyopt',
[all …]
/freebsd/crypto/openssl/providers/implementations/keymgmt/
H A Ddh_kmgmt.c11 * DH low level APIs are deprecated for public use, but still ok for
26 #include "crypto/dh.h"
103 DH *dh = NULL; in dh_newdata() local
106 dh = ossl_dh_new_ex(PROV_LIBCTX_OF(provctx)); in dh_newdata()
107 if (dh != NULL) { in dh_newdata()
108 DH_clear_flags(dh, DH_FLAG_TYPE_MASK); in dh_newdata()
109 DH_set_flags(dh, DH_FLAG_TYPE_DH); in dh_newdata()
112 return dh; in dh_newdata()
117 DH *dh = NULL; in dhx_newdata() local
119 dh = ossl_dh_new_ex(PROV_LIBCTX_OF(provctx)); in dhx_newdata()
[all …]
/freebsd/crypto/heimdal/doc/doxyout/hcrypto/html/
H A Dgroup__hcrypto__dh.html27 <tr><td class="memItemLeft" nowrap align="right" valign="top">DH *&nbsp;</td><td class="memItemRigh…
29 <tr><td class="memItemLeft" nowrap align="right" valign="top">DH *&nbsp;</td><td class="memItemRigh…
31 …el" href="group__hcrypto__dh.html#g1f15312ca21e290ee714e86578820c35">DH_free</a> (DH *dh)</td></tr>
33 …" href="group__hcrypto__dh.html#gf7c3e51cba326865c3684012c2337df1">DH_up_ref</a> (DH *dh)</td></tr>
35 …ef="group__hcrypto__dh.html#g9e1fdd62e3bfe4b671dbfc363f0e6297">DH_size</a> (const DH *dh)</td></tr>
37 …_hcrypto__dh.html#g7a03e7589a8473ed34cf2a4177709c0e">DH_set_ex_data</a> (DH *dh, int idx, void *da…
39 …_hcrypto__dh.html#g25fff6e977829c49410f046b8cc3471d">DH_get_ex_data</a> (DH *dh, int idx)</td></tr>
41 …h.html#g11ef051e93bc408f3e7ba77d44c5d3cb">DH_generate_parameters_ex</a> (DH *dh, int prime_len, in…
43 …o__dh.html#g8995ef180ab448fdedde5da65f6ea249">DH_check_pubkey</a> (const DH *dh, const BIGNUM *pub…
45 …="group__hcrypto__dh.html#gb90ec6b9e64f62c05754731c0c13ea01">DH_generate_key</a> (DH *dh)</td></tr>
[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 …]

12345678910>>...30