Home
last modified time | relevance | path

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

12345678

/external/boringssl/src/crypto/dh/
Ddh.c77 DH *dh = (DH *)OPENSSL_malloc(sizeof(DH)); in DH_new() local
78 if (dh == NULL) { in DH_new()
83 memset(dh, 0, sizeof(DH)); in DH_new()
85 CRYPTO_MUTEX_init(&dh->method_mont_p_lock); in DH_new()
87 dh->references = 1; in DH_new()
88 CRYPTO_new_ex_data(&dh->ex_data); in DH_new()
90 return dh; in DH_new()
93 void DH_free(DH *dh) { in DH_free() argument
94 if (dh == NULL) { in DH_free()
98 if (!CRYPTO_refcount_dec_and_test_zero(&dh->references)) { in DH_free()
[all …]
Dcheck.c64 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) { in DH_check_pub_key() argument
77 if (!BN_copy(&q, dh->p) || in DH_check_pub_key()
93 int DH_check(const DH *dh, int *ret) { in DH_check() argument
121 if (dh->q) { in DH_check()
122 if (BN_cmp(dh->g, BN_value_one()) <= 0) { in DH_check()
124 } else if (BN_cmp(dh->g, dh->p) >= 0) { in DH_check()
128 if (!BN_mod_exp(t1, dh->g, dh->q, dh->p, ctx)) { in DH_check()
135 if (!BN_is_prime_ex(dh->q, BN_prime_checks, ctx, NULL)) { in DH_check()
139 if (!BN_div(t1, t2, dh->p, dh->q, ctx)) { in DH_check()
145 if (dh->j && BN_cmp(dh->j, t1)) { in DH_check()
[all …]
Dparams.c254 DH *dh = DH_new(); in get_standard_parameters() local
255 if (!dh) { in get_standard_parameters()
259 dh->p = BN_dup(&params->p); in get_standard_parameters()
260 dh->q = BN_dup(&params->q); in get_standard_parameters()
261 dh->g = BN_dup(&params->g); in get_standard_parameters()
262 if (!dh->p || !dh->q || !dh->g) { in get_standard_parameters()
263 DH_free(dh); in get_standard_parameters()
267 return dh; in get_standard_parameters()
282 void DH_check_standard_parameters(DH *dh) { in DH_check_standard_parameters() argument
285 if (dh->p == NULL || in DH_check_standard_parameters()
[all …]
/external/tcpdump/
Dprint-dccp.c80 #define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov >> 4) & 0xF) argument
81 #define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov) & 0xF) argument
83 #define DCCPH_X(dh) ((dh)->dccph_xtr & 1) argument
84 #define DCCPH_TYPE(dh) (((dh)->dccph_xtr >> 1) & 0xF) argument
191 static inline u_int dccp_csum_coverage(const struct dccp_hdr* dh, u_int len) in dccp_csum_coverage() argument
195 if (DCCPH_CSCOV(dh) == 0) in dccp_csum_coverage()
197 cov = (dh->dccph_doff + DCCPH_CSCOV(dh) - 1) * sizeof(uint32_t); in dccp_csum_coverage()
202 const struct dccp_hdr *dh, u_int len) in dccp_cksum() argument
204 return nextproto4_cksum(ndo, ip, (const uint8_t *)(void *)dh, len, in dccp_cksum()
205 dccp_csum_coverage(dh, len), IPPROTO_DCCP); in dccp_cksum()
[all …]
Dprint-wb.c314 const struct dophdr *dh = (const struct dophdr *)((const u_char *)dop + sizeof(*dop)); in wb_dops() local
320 if (!ND_TTEST(*dh)) { in wb_dops()
324 t = dh->dh_type; in wb_dops()
331 uint32_t ts = EXTRACT_32BITS(&dh->dh_ts); in wb_dops()
341 dh = DOP_NEXT(dh); in wb_dops()
/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 if (random_get_bytes(wpabuf_put(*priv, dh->prime_len), dh->prime_len)) in dh_init()
1213 if (os_memcmp(wpabuf_head(*priv), dh->prime, dh->prime_len) > 0) { in dh_init()
1219 pv_len = dh->prime_len; in dh_init()
1226 if (crypto_mod_exp(dh->generator, dh->generator_len, in dh_init()
1228 dh->prime, dh->prime_len, wpabuf_mhead(pv), in dh_init()
1252 const struct dh_group *dh) in dh_derive_shared() argument
1257 if (dh == NULL || peer_public == NULL || own_private == NULL) in dh_derive_shared()
[all …]
Dcrypto_openssl.c605 DH *dh; in dh5_init() local
612 dh = DH_new(); in dh5_init()
613 if (dh == NULL) in dh5_init()
616 dh->g = BN_new(); in dh5_init()
617 if (dh->g == NULL || BN_set_word(dh->g, 2) != 1) in dh5_init()
620 dh->p = get_group5_prime(); in dh5_init()
621 if (dh->p == NULL) in dh5_init()
624 if (DH_generate_key(dh) != 1) in dh5_init()
627 publen = BN_num_bytes(dh->pub_key); in dh5_init()
631 privlen = BN_num_bytes(dh->priv_key); in dh5_init()
[all …]
/external/boringssl/src/include/openssl/
Ddh.h82 OPENSSL_EXPORT void DH_free(DH *dh);
85 OPENSSL_EXPORT int DH_up_ref(DH *dh);
113 OPENSSL_EXPORT int DH_generate_parameters_ex(DH *dh, int prime_bits,
121 OPENSSL_EXPORT int DH_generate_key(DH *dh);
128 DH *dh);
134 OPENSSL_EXPORT int DH_size(const DH *dh);
138 OPENSSL_EXPORT unsigned DH_num_bits(const DH *dh);
157 OPENSSL_EXPORT int DH_check(const DH *dh, int *out_flags);
166 OPENSSL_EXPORT int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key,
171 OPENSSL_EXPORT DH *DHparams_dup(const DH *dh);
/external/clang/test/CodeGenCUDA/
Dfunction-overload.cu35 __device__ int dh(void) { return 1; } in dh() function
37 __host__ int dh(void) { return 2; } in dh() function
88 fp_t dhp = dh; // CHECK-HOST: store {{.*}} @_Z2dhv, {{.*}} %dhp, in hostf()
100 dh(); // CHECK-HOST: call i32 @_Z2dhv() in hostf()
113 fp_t dhp = dh; // CHECK-DEVICE: store {{.*}} @_Z2dhv, {{.*}} %dhp, in devicef()
124 dh(); // CHECK-DEVICE: call i32 @_Z2dhv() in devicef()
136 fp_t dhp = dh; // CHECK-BOTH: store {{.*}} @_Z2dhv, {{.*}} %dhp, in hostdevicef()
150 dh(); // CHECK-BOTH: call i32 @_Z2dhv() in hostdevicef()
160 fp_t dhp = dh;
/external/clang/test/SemaCUDA/
Dfunction-overload.cu27 __host__ int dh(void) { return 2; } in dh() function
28 __device__ int dh(void) { return 2; } in dh() function
82 fp_t dhp = dh; in hostf()
96 dh(); in hostf()
114 fp_t dhp = dh; in devicef()
129 dh(); in devicef()
148 fp_t dhp = dh; in globalf()
163 dh(); in globalf()
189 fp_t dhp = dh; in hostdevicef()
215 dh(); in hostdevicef()
[all …]
/external/e2fsprogs/lib/quota/
Dquotaio_tree.c91 struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; in get_free_dqblk() local
101 info->dqi_free_blk = ext2fs_le32_to_cpu(dh->dqdh_next_free); in get_free_dqblk()
121 struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; in put_free_dqblk() local
124 dh->dqdh_next_free = ext2fs_cpu_to_le32(info->dqi_free_blk); in put_free_dqblk()
125 dh->dqdh_prev_free = ext2fs_cpu_to_le32(0); in put_free_dqblk()
126 dh->dqdh_entries = ext2fs_cpu_to_le16(0); in put_free_dqblk()
136 struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; in remove_free_dqentry() local
137 uint nextblk = ext2fs_le32_to_cpu(dh->dqdh_next_free), prevblk = in remove_free_dqentry()
139 ext2fs_le32_to_cpu(dh->dqdh_prev_free); in remove_free_dqentry()
147 dh->dqdh_prev_free; in remove_free_dqentry()
[all …]
/external/wpa_supplicant_8/src/eap_common/
Deap_eke_common.c163 const struct dh_group *dh; in eap_eke_dh_init() local
167 dh = eap_eke_dh_group(group); in eap_eke_dh_init()
168 if (generator < 0 || generator > 255 || !dh) in eap_eke_dh_init()
173 if (random_get_bytes(ret_priv, dh->prime_len)) in eap_eke_dh_init()
175 if (os_memcmp(ret_priv, dh->prime, dh->prime_len) > 0) { in eap_eke_dh_init()
179 for (i = 0; i < dh->prime_len - 1; i++) { in eap_eke_dh_init()
183 if (i == dh->prime_len - 1 && (ret_priv[i] == 0 || ret_priv[i] == 1)) in eap_eke_dh_init()
186 ret_priv, dh->prime_len); in eap_eke_dh_init()
189 pub_len = dh->prime_len; in eap_eke_dh_init()
190 if (crypto_mod_exp(&gen, 1, ret_priv, dh->prime_len, in eap_eke_dh_init()
[all …]
/external/libpcap/
Dpcap-canusb-linux.c119 libusb_device_handle *dh = NULL; in canusb_findalldevs() local
121 if ((ret = libusb_open(devs[i],&dh)) == 0) in canusb_findalldevs()
125 int n = libusb_get_string_descriptor_ascii(dh,desc.iSerialNumber,sernum,64); in canusb_findalldevs()
131 libusb_close(dh); in canusb_findalldevs()
165 libusb_device_handle *dh = NULL; in canusb_opendevice() local
167 if (libusb_open(devs[i],&dh) != 0) continue; in canusb_opendevice()
169 n = libusb_get_string_descriptor_ascii(dh,desc.iSerialNumber,serial,64); in canusb_opendevice()
174 libusb_close(dh); in canusb_opendevice()
178 if ((libusb_kernel_driver_active(dh,0)) && (libusb_detach_kernel_driver(dh,0) != 0)) in canusb_opendevice()
180 libusb_close(dh); in canusb_opendevice()
[all …]
/external/libvpx/libvpx/vpx_scale/generic/
Dvpx_scale.c493 int dh = (vscale - 1 + src->y_height * vratio) / vscale; in vpx_scale_frame() local
497 (unsigned char *) dst->y_buffer, dst->y_stride, dw, dh, in vpx_scale_frame()
501 for (i = 0; i < dh; i++) in vpx_scale_frame()
504 if (dh < (int)dst->y_height) in vpx_scale_frame()
505 for (i = dh - 1; i < (int)dst->y_height; i++) in vpx_scale_frame()
506 …memcpy(dst->y_buffer + i * dst->y_stride, dst->y_buffer + (dh - 2) * dst->y_stride, dst->y_width +… in vpx_scale_frame()
509 (unsigned char *) dst->u_buffer, dst->uv_stride, dw / 2, dh / 2, in vpx_scale_frame()
516 if (dh / 2 < (int)dst->uv_height) in vpx_scale_frame()
517 for (i = dh / 2 - 1; i < (int)dst->y_height / 2; i++) in vpx_scale_frame()
518 …memcpy(dst->u_buffer + i * dst->uv_stride, dst->u_buffer + (dh / 2 - 2)*dst->uv_stride, dst->uv_wi… in vpx_scale_frame()
[all …]
/external/libvpx/libvpx/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.cc146 int dw, int dh) { in MJPGToI420() argument
162 I420Buffers bufs = { y, y_stride, u, u_stride, v, v_stride, dw, dh }; in MJPGToI420()
173 ret = mjpeg_decoder.DecodeToCallback(&JpegCopyI420, &bufs, dw, dh); in MJPGToI420()
184 ret = mjpeg_decoder.DecodeToCallback(&JpegI422ToI420, &bufs, dw, dh); in MJPGToI420()
195 ret = mjpeg_decoder.DecodeToCallback(&JpegI444ToI420, &bufs, dw, dh); in MJPGToI420()
206 ret = mjpeg_decoder.DecodeToCallback(&JpegI411ToI420, &bufs, dw, dh); in MJPGToI420()
213 ret = mjpeg_decoder.DecodeToCallback(&JpegI400ToI420, &bufs, dw, dh); in MJPGToI420()
308 int dw, int dh) { in MJPGToARGB() argument
324 ARGBBuffers bufs = { argb, argb_stride, dw, dh }; in MJPGToARGB()
335 ret = mjpeg_decoder.DecodeToCallback(&JpegI420ToARGB, &bufs, dw, dh); in MJPGToARGB()
[all …]
/external/boringssl/src/ssl/
Dssl_ecdh.c216 DH *dh = (DH *)ctx->data; in ssl_dhe_generate_keypair() local
218 assert(dh != NULL); in ssl_dhe_generate_keypair()
219 assert(dh->priv_key == NULL); in ssl_dhe_generate_keypair()
223 return DH_generate_key(dh) && in ssl_dhe_generate_keypair()
224 BN_bn2cbb_padded(out, BN_num_bytes(dh->p), dh->pub_key); in ssl_dhe_generate_keypair()
231 DH *dh = (DH *)ctx->data; in ssl_dhe_compute_secret() local
232 assert(dh != NULL); in ssl_dhe_compute_secret()
233 assert(dh->priv_key != NULL); in ssl_dhe_compute_secret()
243 secret = OPENSSL_malloc(DH_size(dh)); in ssl_dhe_compute_secret()
247 secret_len = DH_compute_key(secret, peer_point, dh); in ssl_dhe_compute_secret()
/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/opencv/cvaux/src/
Dcvsegment.cpp265 int dh[3];
267 dh[0] = src[0] - src[-3];
269 dh[1] = src[1] - src[-2];
271 dh[2] = src[2] - src[-1];
274 m[0] = dh[0]*dh[0] + dh[1]*dh[1] + dh[2]*dh[2];
275 m[2] = dh[0]*dv[0] + dh[1]*dv[1] + dh[2]*dv[2];
276 m[1] = dv[0]*dv[0] + dv[1]*dv[1] + dh[2]*dh[2];
/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/curl/tests/
Dmem-include-scan.pl84 opendir(my $dh, $dir) || die "can't opendir $dir: $!";
85 my @cfiles = grep { /\.c\z/ && -f "$dir/$_" } readdir($dh);
86 closedir $dh;
/external/icu/icu4c/source/common/
Drbbidata.cpp64 const DataHeader *dh = udm->pHeader; in RBBIDataWrapper() local
65 int32_t headerSize = dh->dataHeader.headerSize; in RBBIDataWrapper()
67 dh->info.isBigEndian == U_IS_BIG_ENDIAN && in RBBIDataWrapper()
68 dh->info.charsetFamily == U_CHARSET_FAMILY && in RBBIDataWrapper()
69 dh->info.dataFormat[0] == 0x42 && // dataFormat="Brk " in RBBIDataWrapper()
70 dh->info.dataFormat[1] == 0x72 && in RBBIDataWrapper()
71 dh->info.dataFormat[2] == 0x6b && in RBBIDataWrapper()
72 dh->info.dataFormat[3] == 0x20) in RBBIDataWrapper()
79 const char *dataAsBytes = reinterpret_cast<const char *>(dh); in RBBIDataWrapper()
/external/wpa_supplicant_8/src/eap_peer/
Dikev2.c54 data->dh); in ikev2_derive_keys()
78 pad_len = data->dh->prime_len - wpabuf_len(shared); 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()
348 data->proposal.integ, data->proposal.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()
[all …]
/external/wpa_supplicant_8/src/eap_server/
Dikev2.c58 data->dh); in ikev2_derive_keys()
83 pad_len = data->dh->prime_len - wpabuf_len(shared); in ikev2_derive_keys()
200 transform_id == data->proposal.dh) in ikev2_parse_transform()
201 prop->dh = transform_id; in ikev2_parse_transform()
328 prop.dh = -1; in ikev2_process_sar1()
334 prop.encr != -1 && prop.dh != -1) { in ikev2_process_sar1()
357 data->proposal.integ, data->proposal.dh); in ikev2_process_sar1()
388 if (group != data->proposal.dh) { in ikev2_process_ker()
391 group, data->proposal.dh); in ikev2_process_ker()
395 if (data->dh == NULL) { in ikev2_process_ker()
[all …]
/external/icu/icu4c/source/data/rbnf/
Dga.txt86 "12: >> dh\u00E9ag;",
104 "12: >> dh\u00E9ag;",
129 "12: d\u00F3 dh\u00E9ag;",
137 "2: dh\u00E1;",
168 "2: dh\u00E1 ch\u00E9ad;",
182 "11: =%%thousand= dh\u00E9ag;",

12345678