Searched refs:dh (Results 1 - 25 of 225) sorted by relevance

123456789

/macosx-10.10/Security-57031.1.35/Security/libsecurity_apple_csp/open_ssl/dh/
H A Ddh_key.c18 /* crypto/dh/dh_key.c */
80 #include <openssl/dh.h>
82 static int generate_key(DH *dh);
83 static int compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh);
84 static int dh_bn_mod_exp(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
87 static int dh_init(DH *dh);
88 static int dh_finish(DH *dh);
90 int DH_generate_key(DH *dh) argument
92 return dh->meth->generate_key(dh);
95 DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh) argument
116 generate_key(DH *dh) argument
168 compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh) argument
205 dh_bn_mod_exp(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) argument
219 dh_init(DH *dh) argument
225 dh_finish(DH *dh) argument
[all...]
H A Ddh_check.c18 /* crypto/dh/dh_check.c */
79 #include <openssl/dh.h>
90 int DH_check(DH *dh, int *ret) argument
103 if (BN_is_word(dh->g,DH_GENERATOR_2))
105 l=BN_mod_word(dh->p,24);
109 else if (BN_is_word(dh->g,DH_GENERATOR_3))
111 l=BN_mod_word(dh->p,12);
115 else if (BN_is_word(dh->g,DH_GENERATOR_5))
117 l=BN_mod_word(dh->p,10);
124 if (!BN_is_prime(dh
[all...]
/macosx-10.10/Heimdal-398.1.2/lib/hcrypto/
H A Ddh.c41 #include <dh.h>
84 DH *dh; local
86 dh = calloc(1, sizeof(*dh));
87 if (dh == NULL)
90 dh->references = 1;
94 dh->engine = engine;
96 dh->engine = ENGINE_get_default_DH();
99 if (dh->engine) {
100 dh
126 DH_free(DH *dh) argument
166 DH_up_ref(DH *dh) argument
182 DH_size(const DH *dh) argument
200 DH_set_ex_data(DH *dh, int idx, void *data) argument
218 DH_get_ex_data(DH *dh, int idx) argument
237 DH_generate_parameters_ex(DH *dh, int prime_len, int generator, BN_GENCB *cb) argument
258 DH_check_pubkey(const DH *dh, const BIGNUM *pub_key, int *codes) argument
341 DH_generate_key(DH *dh) argument
360 DH_compute_key(unsigned char *shared_key, const BIGNUM *peer_pub_key, DH *dh) argument
388 DH_set_method(DH *dh, const DH_METHOD *method) argument
405 dh_null_generate_key(DH *dh) argument
411 dh_null_compute_key(unsigned char *shared,const BIGNUM *pub, DH *dh) argument
417 dh_null_init(DH *dh) argument
423 dh_null_finish(DH *dh) argument
429 dh_null_generate_params(DH *dh, int prime_num, int len, BN_GENCB *cb) argument
524 i2d_DHparams(DH *dh, unsigned char **pp) argument
[all...]
H A Ddh-ltm.c40 #include <dh.h>
85 ltm_dh_generate_key(DH *dh) argument
88 int have_private_key = (dh->priv_key != NULL);
92 if (dh->p == NULL || dh->g == NULL)
97 size_t bits = BN_num_bits(dh->p);
99 if (dh->priv_key)
100 BN_free(dh->priv_key);
102 dh->priv_key = BN_new();
103 if (dh
153 ltm_dh_compute_key(unsigned char *shared, const BIGNUM * pub, DH *dh) argument
193 ltm_dh_generate_params(DH *dh, int a, int b, BN_GENCB *callback) argument
200 ltm_dh_init(DH *dh) argument
206 ltm_dh_finish(DH *dh) argument
[all...]
H A Ddh-tfm.c38 #include <dh.h>
85 tfm_dh_generate_key(DH *dh) argument
88 int have_private_key = (dh->priv_key != NULL);
92 if (dh->p == NULL || dh->g == NULL)
97 size_t bits = BN_num_bits(dh->p);
99 if (dh->priv_key)
100 BN_free(dh->priv_key);
102 dh->priv_key = BN_new();
103 if (dh
155 tfm_dh_compute_key(unsigned char *shared, const BIGNUM * pub, DH *dh) argument
202 tfm_dh_generate_params(DH *dh, int a, int b, BN_GENCB *callback) argument
209 tfm_dh_init(DH *dh) argument
215 tfm_dh_finish(DH *dh) argument
[all...]
H A Ddh-sf.c42 #include <dh.h>
59 sf_dh_generate_key(DH *dh) argument
61 struct dh_sf *sf = DH_get_ex_data(dh, 0);
67 if (dh->p == NULL || dh->g == NULL)
72 ret = _hc_BN_to_integer(dh->p, &dp.prime);
74 ret = _hc_BN_to_integer(dh->g, &dp.base);
100 length = BN_num_bytes(dh->p);
109 dh->pub_key = BN_bin2bn(data, length, NULL);
110 if (dh
128 sf_dh_compute_key(unsigned char *shared, const BIGNUM * pub, DH *dh) argument
154 sf_dh_generate_params(DH *dh, int a, int b, BN_GENCB *callback) argument
160 sf_dh_init(DH *dh) argument
174 sf_dh_finish(DH *dh) argument
[all...]
H A Ddh-cdsa.c40 #include <dh.h>
60 dh_generate_key(DH *dh) argument
63 struct dh_cdsa *cdsa = DH_get_ex_data(dh, 0);
72 if (dh->p == NULL || dh->g == NULL)
80 ret = _hc_BN_to_integer(dh->p, &dp.prime);
82 ret = _hc_BN_to_integer(dh->g, &dp.base);
99 BN_num_bits(dh->p) - 1,
127 dh->pub_key = BN_bin2bn(cdsa->pub_key.KeyData.Data, cdsa->pub_key.KeyData.Length, NULL);
128 if (dh
135 dh_compute_key(unsigned char *shared, const BIGNUM * pub, DH *dh) argument
198 dh_generate_params(DH *dh, int a, int b, BN_GENCB *callback) argument
205 dh_init(DH *dh) argument
219 dh_finish(DH *dh) argument
[all...]
/macosx-10.10/OpenSSH-189/osslshim/ossl/
H A Dossl-dh.c67 #include "ossl-dh.h"
104 DH *dh; local
106 dh = calloc(1, sizeof(*dh));
107 if (dh == NULL) {
111 dh->references = 1;
115 dh->engine = engine;
117 dh->engine = ENGINE_get_default_DH();
120 if (dh->engine) {
121 dh
147 DH_free(DH *dh) argument
189 DH_up_ref(DH *dh) argument
204 DH_size(const DH *dh) argument
221 DH_set_ex_data(DH *dh, int idx, void *data) argument
238 DH_get_ex_data(DH *dh, int idx) argument
256 DH_generate_parameters_ex(DH *dh, int prime_len, int generator, BN_GENCB *cb) argument
277 DH_check_pubkey(const DH *dh, const BIGNUM *pub_key, int *codes) argument
370 DH_generate_key(DH *dh) argument
386 DH_compute_key(unsigned char *shared_key, const BIGNUM *peer_pub_key, DH *dh) argument
414 DH_set_method(DH *dh, const DH_METHOD *method) argument
431 dh_null_generate_key(DH *dh) argument
438 dh_null_compute_key(unsigned char *shared, const BIGNUM *pub, DH *dh) argument
445 dh_null_init(DH *dh) argument
452 dh_null_finish(DH *dh) argument
459 dh_null_generate_params(DH *dh, int prime_num, int len, BN_GENCB *cb) argument
562 i2d_DHparams(DH *dh, unsigned char **pp) argument
[all...]
H A Dossl-dh-eay.c89 #include "ossl-dh.h"
99 static int eay_dh_generate_key(DH *dh);
100 static int eay_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
101 static int eay_dh_bn_mod_exp(const DH *dh, BIGNUM *r,
105 static int eay_dh_init(DH *dh);
106 static int eay_dh_finish(DH *dh);
109 eay_dh_generate_key(DH *dh) argument
126 if (dh->priv_key == NULL) {
133 priv_key = dh->priv_key;
136 if (dh
203 eay_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) argument
267 eay_dh_bn_mod_exp(const DH *dh, BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx ) argument
287 eay_dh_generate_params(DH *dh, int a, int b, BN_GENCB *callback) argument
295 eay_dh_init(DH *dh) argument
305 eay_dh_finish(DH *dh) argument
[all...]
H A Dossl-dh-cc.c31 #include "ossl-dh.h"
63 loadkeys(DH *dh) argument
70 plen = BN_num_bytes(dh->p);
71 glen = BN_num_bytes(dh->g);
79 if (!BN_bn2bin(dh->p, (unsigned char *)p)) {
82 if (!BN_bn2bin(dh->g, (unsigned char *)g)) {
107 if (NULL != dh->priv_key) {
111 priv_keylen = BN_num_bytes(dh->priv_key);
116 if (!BN_bn2bin(dh->priv_key, (unsigned char *)priv_key)) {
128 if (NULL != dh
172 cc_dh_generate_key(DH *dh) argument
225 cc_dh_compute_key(unsigned char *shared, const BIGNUM *peer, DH *dh) argument
322 cc_dh_generate_key(DH *dh) argument
403 cc_dh_compute_key(unsigned char *shared, const BIGNUM *pub, DH *dh) argument
446 cc_dh_generate_params(DH *dh, int a, int b, BN_GENCB *callback) argument
454 cc_dh_init(DH *dh) argument
462 cc_dh_finish(DH *dh) argument
[all...]
/macosx-10.10/ruby-106/ruby/test/openssl/
H A Dtest_pkey_dh.rb10 dh = OpenSSL::PKey::DH.new(NEW_KEYLEN)
11 assert_key(dh)
22 dh = OpenSSL::TestUtils::TEST_KEY_DH1024
23 der = dh.to_der
25 assert_equal_params(dh, dh2)
30 dh = OpenSSL::TestUtils::TEST_KEY_DH1024
31 pem = dh.to_pem
33 assert_equal_params(dh, dh2)
38 dh = OpenSSL::TestUtils::TEST_KEY_DH1024
39 public_key = dh
[all...]
/macosx-10.10/OpenSSL098-52/src/fips/dh/
H A Dfips_dh_key.c1 /* crypto/dh/dh_key.c */
66 #include <openssl/dh.h>
71 static int generate_key(DH *dh);
72 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
73 static int dh_bn_mod_exp(const DH *dh, BIGNUM *r,
77 static int dh_init(DH *dh);
78 static int dh_finish(DH *dh);
80 int DH_generate_key(DH *dh) argument
82 return dh->meth->generate_key(dh);
85 DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) argument
106 generate_key(DH *dh) argument
186 compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) argument
243 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
261 dh_init(DH *dh) argument
268 dh_finish(DH *dh) argument
[all...]
H A Dfips_dh_check.c1 /* crypto/dh/dh_check.c */
61 #include <openssl/dh.h>
76 int DH_check(const DH *dh, int *ret) argument
89 if (BN_is_word(dh->g,DH_GENERATOR_2))
91 l=BN_mod_word(dh->p,24);
95 else if (BN_is_word(dh->g,DH_GENERATOR_3))
97 l=BN_mod_word(dh->p,12);
101 else if (BN_is_word(dh->g,DH_GENERATOR_5))
103 l=BN_mod_word(dh->p,10);
110 if (!BN_is_prime_ex(dh
125 DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) argument
[all...]
/macosx-10.10/OpenSSL098-52/src/crypto/dh/
H A Ddh_key.c1 /* crypto/dh/dh_key.c */
63 #include <openssl/dh.h>
67 static int generate_key(DH *dh);
68 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
69 static int dh_bn_mod_exp(const DH *dh, BIGNUM *r,
73 static int dh_init(DH *dh);
74 static int dh_finish(DH *dh);
76 int DH_generate_key(DH *dh) argument
78 return dh->meth->generate_key(dh);
81 DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) argument
103 generate_key(DH *dh) argument
176 compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) argument
236 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
254 dh_init(DH *dh) argument
260 dh_finish(DH *dh) argument
[all...]
H A Dp192.c1 /* crypto/dh/p192.c */
62 #include <openssl/dh.h>
73 DH *dh; local
75 dh=DH_new();
76 dh->p=BN_bin2bn(data,sizeof(data),NULL);
77 dh->g=BN_new();
78 BN_set_word(dh->g,3);
79 PEM_write_DHparams(stdout,dh);
H A Ddh_check.c1 /* crypto/dh/dh_check.c */
62 #include <openssl/dh.h>
75 int DH_check(const DH *dh, int *ret) argument
88 if (BN_is_word(dh->g,DH_GENERATOR_2))
90 l=BN_mod_word(dh->p,24);
94 else if (BN_is_word(dh->g,DH_GENERATOR_3))
96 l=BN_mod_word(dh->p,12);
100 else if (BN_is_word(dh->g,DH_GENERATOR_5))
102 l=BN_mod_word(dh->p,10);
109 if (!BN_is_prime_ex(dh
124 DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) argument
[all...]
H A Dp512.c1 /* crypto/dh/p512.c */
62 #include <openssl/dh.h>
78 DH *dh; local
80 dh=DH_new();
81 dh->p=BN_bin2bn(data,sizeof(data),NULL);
82 dh->g=BN_new();
83 BN_set_word(dh->g,2);
84 PEM_write_DHparams(stdout,dh);
/macosx-10.10/bind9-45.101/bind9/lib/dns/
H A Dopenssldh_link.c85 REQUIRE(pub->keydata.dh != NULL);
86 REQUIRE(priv->keydata.dh != NULL);
88 dhpub = pub->keydata.dh;
89 dhpriv = priv->keydata.dh;
107 dh1 = key1->keydata.dh;
108 dh2 = key2->keydata.dh;
136 dh1 = key1->keydata.dh;
137 dh2 = key2->keydata.dh;
172 DH *dh = NULL; local
189 dh
243 DH *dh = key->keydata.dh; local
249 DH *dh = key->keydata.dh; local
282 DH *dh; local
335 DH *dh; local
453 DH *dh; local
513 DH *dh = NULL; local
[all...]
/macosx-10.10/tcpdump-61/tcpdump/
H A Ddccp.h39 #define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov >> 4) & 0xF)
40 #define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov) & 0xF)
42 #define DCCPH_X(dh) ((dh)->dccph_xtrs.dccph_xtr & 1)
43 #define DCCPH_TYPE(dh) (((dh)->dccph_xtrs.dccph_xtr >> 1) & 0xF)
44 #define DCCPH_SEQ(dh) (((dh)
[all...]
H A Dprint-dccp.c63 static inline u_int dccp_csum_coverage(const struct dccp_hdr* dh, u_int len) argument
67 if (DCCPH_CSCOV(dh) == 0)
69 cov = (dh->dccph_doff + DCCPH_CSCOV(dh) - 1) * sizeof(u_int32_t);
74 const struct dccp_hdr *dh, u_int len)
76 return nextproto4_cksum(ip, (const u_int8_t *)(void *)dh,
77 dccp_csum_coverage(dh, len), IPPROTO_DCCP);
81 static int dccp6_cksum(const struct ip6_hdr *ip6, const struct dccp_hdr *dh, u_int len) argument
83 return nextproto6_cksum(ip6, (const u_int8_t *)(void *)dh,
84 dccp_csum_coverage(dh, le
73 dccp_cksum(const struct ip *ip, const struct dccp_hdr *dh, u_int len) argument
95 dccp_seqno(const struct dccp_hdr *dh) argument
110 dccp_basic_hdr_len(const struct dccp_hdr *dh) argument
117 const struct dccp_hdr *dh = (const struct dccp_hdr *)bp; local
170 const struct dccp_hdr *dh; local
[all...]
/macosx-10.10/ICU-531.30/icuSources/common/
H A Durbtok.cpp140 DataHeader *dh = (DataHeader *)uprv_malloc(totalLength); local
141 if (dh == 0)
150 uprv_free(dh);
153 dh->dataHeader.headerSize = ds->readUInt16(sizeof(DataHeader));
154 dh->dataHeader.magic1 = 0xda;
155 dh->dataHeader.magic2 = 0x27;
156 dh->info.size = ds->readUInt16(sizeof(UDataInfo));
157 dh->info.reservedWord = 0;
158 dh->info.isBigEndian = inIsBigEndian;
159 dh
[all...]
/macosx-10.10/ruby-106/ruby/ext/openssl/
H A Dossl_pkey_dh.c22 #define DH_HAS_PRIVATE(dh) ((dh)->priv_key)
25 # define DH_PRIVATE(dh) (DH_HAS_PRIVATE(dh) || (dh)->engine)
27 # define DH_PRIVATE(dh) DH_HAS_PRIVATE(dh)
41 dh_instance(VALUE klass, DH *dh) argument
46 if (!dh) {
52 if (!EVP_PKEY_assign_DH(pkey, dh)) {
86 DH *dh; member in struct:dh_blocking_gen_arg
109 DH *dh = DH_new(); local
164 DH *dh ; local
208 DH *dh; local
415 DH *dh; local
440 DH *dh; local
473 DH *dh; local
498 DH *dh; local
572 DH *dh; local
[all...]
/macosx-10.10/OpenSSH-189/openssh/
H A Dkexdhc.c31 #include "ossl-dh.h"
33 #include <openssl/dh.h>
48 #include "dh.h"
55 DH *dh; local
65 dh = dh_new_group1();
68 dh = dh_new_group14();
73 dh_gen_key(dh, kex->we_need * 8);
75 packet_put_bignum2(dh->pub_key);
80 DHparams_print_fp(stderr, dh);
82 BN_print_fp(stderr, dh
[all...]
H A Ddh.c1 /* $OpenBSD: dh.c,v 1.49 2011/12/07 05:44:38 djm Exp $ */
32 #include "ossl-dh.h"
35 #include <openssl/dh.h>
43 #include "dh.h"
198 dh_pub_is_valid(DH *dh, BIGNUM *dh_pub) argument
218 if (!BN_sub(tmp, dh->p, BN_value_one()) ||
229 debug2("bits set: %d/%d", bits_set, BN_num_bits(dh->p));
235 logit("invalid public DH value (%d/%d)", bits_set, BN_num_bits(dh->p));
240 dh_gen_key(DH *dh, int need) argument
246 if (dh
274 DH *dh; local
295 DH *dh; local
[all...]
/macosx-10.10/Security-57031.1.35/Security/sec/Security/
H A DSecDH.h54 @param dh (output) pointer to a SecDHContext
57 @result On success, a newly allocated SecDHContext is returned in dh and
58 errSecSuccess is returned. On failure, NULL is returned in dh and an OSStatus error
64 const uint8_t *recip, size_t recip_len, SecDHContext *dh);
71 @param dh (output) A pointer to a SecDHContext
72 @result On success, a newly allocated SecDHContext is returned in dh and
73 errSecSuccess is returned. On failure, NULL is returned in dh and an OSStatus error
79 SecDHContext *dh);
86 @param dh (output) A pointer to a SecDHContext
87 @result On success, a newly allocated SecDHContext is returned in dh an
[all...]

Completed in 298 milliseconds

123456789