Home
last modified time | relevance | path

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

12345678910>>...19

/external/boringssl/src/crypto/dh/
Ddh.c76 DH *dh = OPENSSL_malloc(sizeof(DH)); in DH_new() local
77 if (dh == NULL) { in DH_new()
82 OPENSSL_memset(dh, 0, sizeof(DH)); in DH_new()
84 CRYPTO_MUTEX_init(&dh->method_mont_p_lock); in DH_new()
86 dh->references = 1; in DH_new()
87 CRYPTO_new_ex_data(&dh->ex_data); in DH_new()
89 return dh; in DH_new()
92 void DH_free(DH *dh) { in DH_free() argument
93 if (dh == NULL) { in DH_free()
97 if (!CRYPTO_refcount_dec_and_test_zero(&dh->references)) { in DH_free()
[all …]
Dcheck.c62 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *out_flags) { in DH_check_pub_key() argument
84 if (!BN_copy(tmp, dh->p) || in DH_check_pub_key()
92 if (dh->q != NULL) { in DH_check_pub_key()
96 if (!BN_mod_exp_mont(tmp, pub_key, dh->q, dh->p, ctx, NULL)) { in DH_check_pub_key()
113 int DH_check(const DH *dh, int *out_flags) { in DH_check() argument
140 if (dh->q) { in DH_check()
141 if (BN_cmp(dh->g, BN_value_one()) <= 0) { in DH_check()
143 } else if (BN_cmp(dh->g, dh->p) >= 0) { in DH_check()
147 if (!BN_mod_exp_mont(t1, dh->g, dh->q, dh->p, ctx, NULL)) { in DH_check()
154 r = BN_is_prime_ex(dh->q, BN_prime_checks, ctx, NULL); in DH_check()
[all …]
Ddh_test.cc288 bssl::UniquePtr<DH> dh(DH_new()); in TestBadY() local
289 dh->p = BN_bin2bn(kRFC5114_2048_224P, sizeof(kRFC5114_2048_224P), nullptr); in TestBadY()
290 dh->g = BN_bin2bn(kRFC5114_2048_224G, sizeof(kRFC5114_2048_224G), nullptr); in TestBadY()
291 dh->q = BN_bin2bn(kRFC5114_2048_224Q, sizeof(kRFC5114_2048_224Q), nullptr); in TestBadY()
292 if (!dh->p || !dh->g || !dh->q) { in TestBadY()
298 if (!dh || !pub_key || !DH_generate_key(dh.get())) { in TestBadY()
303 if (!DH_check_pub_key(dh.get(), pub_key.get(), &flags)) { in TestBadY()
311 std::vector<uint8_t> result(DH_size(dh.get())); in TestBadY()
312 if (DH_compute_key(result.data(), pub_key.get(), dh.get()) >= 0) { in TestBadY()
342 bssl::UniquePtr<DH> dh(DH_parse_parameters(&cbs)); in TestASN1() local
[all …]
Ddh_asn1.c120 int DH_marshal_parameters(CBB *cbb, const DH *dh) { in DH_marshal_parameters() argument
123 !marshal_integer(&child, dh->p) || in DH_marshal_parameters()
124 !marshal_integer(&child, dh->g) || in DH_marshal_parameters()
125 (dh->priv_length != 0 && in DH_marshal_parameters()
126 !CBB_add_asn1_uint64(&child, dh->priv_length)) || in DH_marshal_parameters()
/external/tcpdump/
Dprint-dccp.c79 #define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov >> 4) & 0xF) argument
80 #define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov) & 0xF) argument
82 #define DCCPH_X(dh) ((dh)->dccph_xtr & 1) argument
83 #define DCCPH_TYPE(dh) (((dh)->dccph_xtr >> 1) & 0xF) argument
190 static inline u_int dccp_csum_coverage(const struct dccp_hdr* dh, u_int len) in dccp_csum_coverage() argument
194 if (DCCPH_CSCOV(dh) == 0) in dccp_csum_coverage()
196 cov = (dh->dccph_doff + DCCPH_CSCOV(dh) - 1) * sizeof(uint32_t); in dccp_csum_coverage()
201 const struct dccp_hdr *dh, u_int len) in dccp_cksum() argument
203 return nextproto4_cksum(ndo, ip, (const uint8_t *)(const void *)dh, len, in dccp_cksum()
204 dccp_csum_coverage(dh, len), IPPROTO_DCCP); in dccp_cksum()
[all …]
/external/wpa_supplicant_8/src/crypto/
Ddh_groups.c1193 struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv) in dh_init() argument
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()
[all …]
Dcrypto_openssl.c752 DH *dh; in dh5_init() local
760 dh = DH_new(); in dh5_init()
761 if (dh == NULL) in dh5_init()
764 dh->g = BN_new(); in dh5_init()
765 if (dh->g == NULL || BN_set_word(dh->g, 2) != 1) in dh5_init()
768 dh->p = get_group5_prime(); in dh5_init()
769 if (dh->p == NULL) in dh5_init()
772 dh->q = get_group5_order(); in dh5_init()
773 if (!dh->q) in dh5_init()
776 if (DH_generate_key(dh) != 1) in dh5_init()
[all …]
Dcrypto_wolfssl.c644 DhKey *dh = NULL; in dh5_init() local
653 dh = XMALLOC(sizeof(DhKey), NULL, DYNAMIC_TYPE_TMP_BUFFER); in dh5_init()
654 if (!dh) in dh5_init()
656 wc_InitDhKey(dh); in dh5_init()
659 XFREE(dh, NULL, DYNAMIC_TYPE_TMP_BUFFER); in dh5_init()
668 if (wc_DhSetKey(dh, RFC3526_PRIME_1536, sizeof(RFC3526_PRIME_1536), in dh5_init()
673 if (wc_DhGenerateKeyPair(dh, &rng, wpabuf_mhead(privkey), &priv_sz, in dh5_init()
680 ret = dh; in dh5_init()
683 dh = NULL; in dh5_init()
689 if (dh) { in dh5_init()
[all …]
/external/boringssl/src/include/openssl/
Ddh.h81 OPENSSL_EXPORT void DH_free(DH *dh);
84 OPENSSL_EXPORT int DH_up_ref(DH *dh);
92 OPENSSL_EXPORT void DH_get0_key(const DH *dh, const BIGNUM **out_pub_key,
98 OPENSSL_EXPORT int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
102 OPENSSL_EXPORT void DH_get0_pqg(const DH *dh, const BIGNUM **out_p,
109 OPENSSL_EXPORT int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
133 OPENSSL_EXPORT int DH_generate_parameters_ex(DH *dh, int prime_bits,
141 OPENSSL_EXPORT int DH_generate_key(DH *dh);
148 DH *dh);
154 OPENSSL_EXPORT int DH_size(const DH *dh);
[all …]
/external/openssh/
Ddh.c215 dh_pub_is_valid(DH *dh, BIGNUM *dh_pub) in dh_pub_is_valid() argument
235 if (!BN_sub(tmp, dh->p, BN_value_one()) || in dh_pub_is_valid()
246 debug2("bits set: %d/%d", bits_set, BN_num_bits(dh->p)); in dh_pub_is_valid()
253 bits_set, BN_num_bits(dh->p)); in dh_pub_is_valid()
260 dh_gen_key(DH *dh, int need) in dh_gen_key() argument
264 if (need < 0 || dh->p == NULL || in dh_gen_key()
265 (pbits = BN_num_bits(dh->p)) <= 0 || in dh_gen_key()
278 dh->length = MINIMUM(need * 2, pbits - 1); in dh_gen_key()
280 if (DH_generate_key(dh) == 0 || in dh_gen_key()
281 !dh_pub_is_valid(dh, dh->pub_key)) { in dh_gen_key()
[all …]
Dkexdhs.c63 kex->dh = dh_new_group1(); in kexdh_server()
67 kex->dh = dh_new_group14(); in kexdh_server()
70 kex->dh = dh_new_group16(); in kexdh_server()
73 kex->dh = dh_new_group18(); in kexdh_server()
79 if (kex->dh == NULL) { in kexdh_server()
83 if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0) in kexdh_server()
137 DHparams_print_fp(stderr, kex->dh); in input_kex_dh_init()
139 BN_print_fp(stderr, kex->dh->pub_key); in input_kex_dh_init()
142 if (!dh_pub_is_valid(kex->dh, dh_client_pub)) { in input_kex_dh_init()
148 klen = DH_size(kex->dh); in input_kex_dh_init()
[all …]
Dkexdhc.c63 kex->dh = dh_new_group1(); in kexdh_client()
67 kex->dh = dh_new_group14(); in kexdh_client()
70 kex->dh = dh_new_group16(); in kexdh_client()
73 kex->dh = dh_new_group18(); in kexdh_client()
79 if (kex->dh == NULL) { in kexdh_client()
84 if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0 || in kexdh_client()
86 (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || in kexdh_client()
90 DHparams_print_fp(stderr, kex->dh); in kexdh_client()
92 BN_print_fp(stderr, kex->dh->pub_key); in kexdh_client()
150 if (!dh_pub_is_valid(kex->dh, dh_server_pub)) { in input_kex_dh()
[all …]
Dkexgexs.c98 kex->dh = PRIVSEP(choose_dh(min, nbits, max)); in input_kex_dh_gex_request()
99 if (kex->dh == NULL) { in input_kex_dh_gex_request()
106 (r = sshpkt_put_bignum2(ssh, kex->dh->p)) != 0 || in input_kex_dh_gex_request()
107 (r = sshpkt_put_bignum2(ssh, kex->dh->g)) != 0 || in input_kex_dh_gex_request()
112 if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0) in input_kex_dh_gex_request()
166 DHparams_print_fp(stderr, kex->dh); in input_kex_dh_gex_init()
168 BN_print_fp(stderr, kex->dh->pub_key); in input_kex_dh_gex_init()
171 if (!dh_pub_is_valid(kex->dh, dh_client_pub)) { in input_kex_dh_gex_init()
177 klen = DH_size(kex->dh); in input_kex_dh_gex_init()
183 if ((kout = DH_compute_key(kbuf, dh_client_pub, kex->dh)) < 0 || in input_kex_dh_gex_init()
[all …]
Dkexgexc.c115 if ((kex->dh = dh_new_group(g, p)) == NULL) { in input_kex_dh_gex_group()
122 if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0 || in input_kex_dh_gex_group()
124 (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || in input_kex_dh_gex_group()
129 DHparams_print_fp(stderr, kex->dh); in input_kex_dh_gex_group()
131 BN_print_fp(stderr, kex->dh->pub_key); in input_kex_dh_gex_group()
198 if (!dh_pub_is_valid(kex->dh, dh_server_pub)) { in input_kex_dh_gex_reply()
204 klen = DH_size(kex->dh); in input_kex_dh_gex_reply()
210 if ((kout = DH_compute_key(kbuf, dh_server_pub, kex->dh)) < 0 || in input_kex_dh_gex_reply()
231 kex->dh->p, kex->dh->g, in input_kex_dh_gex_reply()
232 kex->dh->pub_key, in input_kex_dh_gex_reply()
[all …]
/external/e2fsprogs/lib/support/
Dquotaio_tree.c92 struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; in get_free_dqblk() local
102 info->dqi_free_blk = ext2fs_le32_to_cpu(dh->dqdh_next_free); in get_free_dqblk()
123 struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; in put_free_dqblk() local
126 dh->dqdh_next_free = ext2fs_cpu_to_le32(info->dqi_free_blk); in put_free_dqblk()
127 dh->dqdh_prev_free = ext2fs_cpu_to_le32(0); in put_free_dqblk()
128 dh->dqdh_entries = ext2fs_cpu_to_le16(0); in put_free_dqblk()
139 struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; in remove_free_dqentry() local
140 unsigned int nextblk = ext2fs_le32_to_cpu(dh->dqdh_next_free), prevblk = in remove_free_dqentry()
142 ext2fs_le32_to_cpu(dh->dqdh_prev_free); in remove_free_dqentry()
150 dh->dqdh_prev_free; in remove_free_dqentry()
[all …]
/external/f2fs-tools/fsck/
Dquotaio_tree.c93 struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; in get_free_dqblk() local
103 info->dqi_free_blk = le32_to_cpu(dh->dqdh_next_free); in get_free_dqblk()
124 struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; in put_free_dqblk() local
127 dh->dqdh_next_free = cpu_to_le32(info->dqi_free_blk); in put_free_dqblk()
128 dh->dqdh_prev_free = cpu_to_le32(0); in put_free_dqblk()
129 dh->dqdh_entries = cpu_to_le16(0); in put_free_dqblk()
140 struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; in remove_free_dqentry() local
141 unsigned int nextblk = le32_to_cpu(dh->dqdh_next_free), prevblk = in remove_free_dqentry()
142 le32_to_cpu(dh->dqdh_prev_free); in remove_free_dqentry()
150 dh->dqdh_prev_free; in remove_free_dqentry()
[all …]
/external/libvpx/libvpx/vpx_scale/generic/
Dvpx_scale.c481 int dh = (vscale - 1 + src->y_height * vratio) / vscale; in vpx_scale_frame() local
485 src->y_height, (unsigned char *)dst->y_buffer, dst->y_stride, dw, dh, in vpx_scale_frame()
489 for (i = 0; i < dh; i++) in vpx_scale_frame()
493 if (dh < (int)dst->y_height) in vpx_scale_frame()
494 for (i = dh - 1; i < (int)dst->y_height; i++) in vpx_scale_frame()
496 dst->y_buffer + (dh - 2) * dst->y_stride, dst->y_width + 1); in vpx_scale_frame()
500 dw / 2, dh / 2, temp_area, temp_height, hscale, hratio, vscale, in vpx_scale_frame()
509 if (dh / 2 < (int)dst->uv_height) in vpx_scale_frame()
510 for (i = dh / 2 - 1; i < (int)dst->y_height / 2; i++) in vpx_scale_frame()
512 dst->u_buffer + (dh / 2 - 2) * dst->uv_stride, dst->uv_width); in vpx_scale_frame()
[all …]
/external/wpa_supplicant_8/src/eap_common/
Deap_eke_common.c163 const struct dh_group *dh; in eap_eke_dh_init() local
166 dh = eap_eke_dh_group(group); in eap_eke_dh_init()
167 if (generator < 0 || generator > 255 || !dh) 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
386 dh = eap_eke_dh_group(sess->dhgroup); in eap_eke_shared_secret()
387 if (sess->encr != EAP_EKE_ENCR_AES128_CBC || !dh) in eap_eke_shared_secret()
391 os_memcpy(peer_pub, peer_dhcomp + AES_BLOCK_SIZE, dh->prime_len); in eap_eke_shared_secret()
[all …]
/external/clang/test/SemaCUDA/
Dfunction-overload.cu39 __host__ HostReturnTy dh() { return HostReturnTy(); } in dh() function
40 __device__ DeviceReturnTy dh() { return DeviceReturnTy(); } in dh() function
116 HostFnPtr fp_dh = dh; in hostf()
117 HostReturnTy ret_dh = dh(); in hostf()
137 DeviceFnPtr fp_dh = dh; in devicef()
138 DeviceReturnTy ret_dh = dh(); in devicef()
158 DeviceFnPtr fp_dh = dh; in globalf()
159 DeviceReturnTy ret_dh = dh(); in globalf()
179 CurrentFnPtr fp_dh = dh; in hostdevicef()
180 CurrentReturnTy ret_dh = dh(); in hostdevicef()
[all …]
/external/libaom/libaom/third_party/libyuv/source/
Dconvert_jpeg.cc145 int dw, int dh) { in MJPGToI420() argument
161 I420Buffers bufs = { y, y_stride, u, u_stride, v, v_stride, dw, dh }; in MJPGToI420()
172 ret = mjpeg_decoder.DecodeToCallback(&JpegCopyI420, &bufs, dw, dh); in MJPGToI420()
183 ret = mjpeg_decoder.DecodeToCallback(&JpegI422ToI420, &bufs, dw, dh); in MJPGToI420()
194 ret = mjpeg_decoder.DecodeToCallback(&JpegI444ToI420, &bufs, dw, dh); in MJPGToI420()
205 ret = mjpeg_decoder.DecodeToCallback(&JpegI411ToI420, &bufs, dw, dh); in MJPGToI420()
212 ret = mjpeg_decoder.DecodeToCallback(&JpegI400ToI420, &bufs, dw, dh); in MJPGToI420()
307 int dw, int dh) { in MJPGToARGB() argument
323 ARGBBuffers bufs = { argb, argb_stride, dw, dh }; in MJPGToARGB()
334 ret = mjpeg_decoder.DecodeToCallback(&JpegI420ToARGB, &bufs, dw, dh); in MJPGToARGB()
[all …]
/external/libyuv/files/source/
Dconvert_jpeg.cc117 int dh) { in MJPGToI420() argument
133 I420Buffers bufs = {y, y_stride, u, u_stride, v, v_stride, dw, dh}; in MJPGToI420()
143 ret = mjpeg_decoder.DecodeToCallback(&JpegCopyI420, &bufs, dw, dh); in MJPGToI420()
154 ret = mjpeg_decoder.DecodeToCallback(&JpegI422ToI420, &bufs, dw, dh); in MJPGToI420()
165 ret = mjpeg_decoder.DecodeToCallback(&JpegI444ToI420, &bufs, dw, dh); in MJPGToI420()
172 ret = mjpeg_decoder.DecodeToCallback(&JpegI400ToI420, &bufs, dw, dh); in MJPGToI420()
245 int dh) { in MJPGToARGB() argument
261 ARGBBuffers bufs = {argb, argb_stride, dw, dh}; in MJPGToARGB()
271 ret = mjpeg_decoder.DecodeToCallback(&JpegI420ToARGB, &bufs, dw, dh); in MJPGToARGB()
282 ret = mjpeg_decoder.DecodeToCallback(&JpegI422ToARGB, &bufs, dw, dh); in MJPGToARGB()
[all …]
/external/webrtc/talk/media/webrtc/
Dwebrtcvideoframe.cc65 int dh, in Init() argument
72 return Reset(format, w, h, dw, dh, sample, sample_size, pixel_width, in Init()
77 bool WebRtcVideoFrame::Init(const CapturedFrame* frame, int dw, int dh, in Init() argument
79 return Reset(frame->fourcc, frame->width, frame->height, dw, dh, in Init()
196 int dh, in Reset() argument
213 int new_height = dh; in Reset()
216 new_width = dh; in Reset()
227 int vert_crop = ((abs(h) - dh) / 2) & ~1; in Reset()
229 int idh = (h < 0) ? -dh : dh; in Reset()
/external/tcpdump/tests/
Dikev2pI2.out8 (t: #4 type=dh id=modp1536 ))
13 (t: #4 type=dh id=modp1536 ))
18 (t: #4 type=dh id=modp1536 ))
23 (t: #4 type=dh id=modp1536 ))
28 (t: #4 type=dh id=modp1024 ))
33 (t: #4 type=dh id=modp1024 )))
/external/icu/icu4c/source/common/
Drbbidata.cpp49 const DataHeader *dh = udm->pHeader; in RBBIDataWrapper() local
50 int32_t headerSize = dh->dataHeader.headerSize; in RBBIDataWrapper()
52 dh->info.isBigEndian == U_IS_BIG_ENDIAN && in RBBIDataWrapper()
53 dh->info.charsetFamily == U_CHARSET_FAMILY && in RBBIDataWrapper()
54 dh->info.dataFormat[0] == 0x42 && // dataFormat="Brk " in RBBIDataWrapper()
55 dh->info.dataFormat[1] == 0x72 && in RBBIDataWrapper()
56 dh->info.dataFormat[2] == 0x6b && in RBBIDataWrapper()
57 dh->info.dataFormat[3] == 0x20 && in RBBIDataWrapper()
58 isDataVersionAcceptable(dh->info.formatVersion)) in RBBIDataWrapper()
63 const char *dataAsBytes = reinterpret_cast<const char *>(dh); in RBBIDataWrapper()
/external/libvpx/libvpx/vpx_dsp/
Dpsnr.c86 const int dh = height % 16; in get_sse() local
98 if (dh > 0) { in get_sse()
99 encoder_variance(&a[(height - dh) * a_stride], a_stride, in get_sse()
100 &b[(height - dh) * b_stride], b_stride, width - dw, dh, in get_sse()
148 const int dh = height % 16; in highbd_get_sse() local
156 if (dh > 0) { in highbd_get_sse()
157 encoder_highbd_8_variance(&a[(height - dh) * a_stride], a_stride, in highbd_get_sse()
158 &b[(height - dh) * b_stride], b_stride, in highbd_get_sse()
159 width - dw, dh, &sse, &sum); in highbd_get_sse()

12345678910>>...19