/external/openssl/crypto/ec/ |
D | ec_key.c | 85 ret->pub_key = NULL; in EC_KEY_new() 129 if (r->pub_key != NULL) in EC_KEY_free() 130 EC_POINT_free(r->pub_key); in EC_KEY_free() 164 if (src->pub_key && src->group) in EC_KEY_copy() 166 if (dest->pub_key) in EC_KEY_copy() 167 EC_POINT_free(dest->pub_key); in EC_KEY_copy() 168 dest->pub_key = EC_POINT_new(src->group); in EC_KEY_copy() 169 if (dest->pub_key == NULL) in EC_KEY_copy() 171 if (!EC_POINT_copy(dest->pub_key, src->pub_key)) in EC_KEY_copy() 242 EC_POINT *pub_key = NULL; in EC_KEY_generate_key() local [all …]
|
D | ec_ameth.c | 269 EC_POINT *pub_key; in eckey_priv_decode() local 273 pub_key = EC_POINT_new(group); in eckey_priv_decode() 274 if (pub_key == NULL) in eckey_priv_decode() 279 if (!EC_POINT_copy(pub_key, EC_GROUP_get0_generator(group))) in eckey_priv_decode() 281 EC_POINT_free(pub_key); in eckey_priv_decode() 286 if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, NULL)) in eckey_priv_decode() 288 EC_POINT_free(pub_key); in eckey_priv_decode() 292 if (EC_KEY_set_public_key(eckey, pub_key) == 0) in eckey_priv_decode() 294 EC_POINT_free(pub_key); in eckey_priv_decode() 298 EC_POINT_free(pub_key); in eckey_priv_decode() [all …]
|
D | ec_asn1.c | 1189 if (ret->pub_key) in d2i_ECPrivateKey() 1190 EC_POINT_clear_free(ret->pub_key); in d2i_ECPrivateKey() 1191 ret->pub_key = EC_POINT_new(ret->group); in d2i_ECPrivateKey() 1192 if (ret->pub_key == NULL) in d2i_ECPrivateKey() 1201 if (!EC_POINT_oct2point(ret->group, ret->pub_key, in d2i_ECPrivateKey() 1288 tmp_len = EC_POINT_point2oct(a->group, a->pub_key, in i2d_ECPrivateKey() 1303 if (!EC_POINT_point2oct(a->group, a->pub_key, in i2d_ECPrivateKey() 1388 if (ret->pub_key == NULL && in o2i_ECPublicKey() 1389 (ret->pub_key = EC_POINT_new(ret->group)) == NULL) in o2i_ECPublicKey() 1394 if (!EC_POINT_oct2point(ret->group, ret->pub_key, *in, len, NULL)) in o2i_ECPublicKey() [all …]
|
/external/openssl/crypto/dh/ |
D | dh_key.c | 66 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); 87 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) in DH_compute_key() argument 97 return dh->meth->compute_key(key, pub_key, dh); in DH_compute_key() 124 BIGNUM *pub_key=NULL,*priv_key=NULL; in generate_key() local 138 if (dh->pub_key == NULL) in generate_key() 140 pub_key=BN_new(); in generate_key() 141 if (pub_key == NULL) goto err; in generate_key() 144 pub_key=dh->pub_key; in generate_key() 187 if (!dh->meth->bn_mod_exp(dh, pub_key, dh->g, prk, dh->p, ctx, mont)) goto err; in generate_key() 190 dh->pub_key=pub_key; in generate_key() [all …]
|
D | dh_ameth.c | 110 if (!(dh->pub_key = ASN1_INTEGER_to_BN(public_key, NULL))) in dh_pub_decode() 137 ASN1_INTEGER *pub_key = NULL; in dh_pub_encode() local 151 pub_key = BN_to_ASN1_INTEGER(dh->pub_key, NULL); in dh_pub_encode() 152 if (!pub_key) in dh_pub_encode() 155 penclen = i2d_ASN1_INTEGER(pub_key, &penc); in dh_pub_encode() 157 ASN1_INTEGER_free(pub_key); in dh_pub_encode() 325 BIGNUM *priv_key, *pub_key; in do_dh_print() local 333 pub_key = x->pub_key; in do_dh_print() 335 pub_key = NULL; in do_dh_print() 346 update_buflen(pub_key, &buf_len); in do_dh_print() [all …]
|
D | dh_check.c | 122 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) in DH_check_pub_key() argument 131 if (BN_cmp(pub_key,q)<=0) in DH_check_pub_key() 135 if (BN_cmp(pub_key,q)>=0) in DH_check_pub_key()
|
D | dh.h | 117 int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh); 139 BIGNUM *pub_key; /* g^x */ member 210 int DH_check_pub_key(const DH *dh,const BIGNUM *pub_key, int *codes); 212 int DH_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh);
|
D | dhtest.c | 156 BN_print(out,a->pub_key); in main() 163 BN_print(out,b->pub_key); in main() 168 aout=DH_compute_key(abuf,b->pub_key,a); in main() 180 bout=DH_compute_key(bbuf,a->pub_key,b); in main()
|
D | dh_lib.c | 163 ret->pub_key=NULL; in DH_new_method() 219 if (r->pub_key != NULL) BN_clear_free(r->pub_key); in DH_free()
|
/external/openssl/crypto/dsa/ |
D | dsa_key.c | 96 BIGNUM *pub_key=NULL,*priv_key=NULL; in dsa_builtin_keygen() local 111 if (dsa->pub_key == NULL) in dsa_builtin_keygen() 113 if ((pub_key=BN_new()) == NULL) goto err; in dsa_builtin_keygen() 116 pub_key=dsa->pub_key; in dsa_builtin_keygen() 131 if (!BN_mod_exp(pub_key,dsa->g,prk,dsa->p,ctx)) goto err; in dsa_builtin_keygen() 135 dsa->pub_key=pub_key; in dsa_builtin_keygen() 139 if ((pub_key != NULL) && (dsa->pub_key == NULL)) BN_free(pub_key); in dsa_builtin_keygen()
|
D | dsa_lib.c | 171 ret->pub_key=NULL; in DSA_new_method() 226 if (r->pub_key != NULL) BN_clear_free(r->pub_key); in DSA_free() 315 if (r->pub_key != NULL) in DSA_dup_DH() 316 if ((ret->pub_key = BN_dup(r->pub_key)) == NULL) in DSA_dup_DH()
|
D | dsa_ameth.c | 119 if (!(dsa->pub_key = ASN1_INTEGER_to_BN(public_key, NULL))) in dsa_pub_decode() 266 if (!(dsa->pub_key = BN_new())) in dsa_priv_decode() 277 if (!BN_mod_exp(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx)) in dsa_priv_decode() 410 if (BN_cmp(b->pkey.dsa->pub_key,a->pkey.dsa->pub_key) != 0) in dsa_pub_cmp() 437 const BIGNUM *priv_key, *pub_key; in do_dsa_print() local 445 pub_key = x->pub_key; in do_dsa_print() 447 pub_key = NULL; in do_dsa_print() 460 update_buflen(pub_key, &buf_len); in do_dsa_print() 479 if (!ASN1_bn_print(bp,"pub: ",pub_key,m,off)) in do_dsa_print()
|
D | dsa_asn1.c | 114 ASN1_SIMPLE(DSA, pub_key, BIGNUM), 135 ASN1_SIMPLE(DSA, pub_key, BIGNUM), 142 ASN1_SIMPLE(DSA, pub_key, BIGNUM),
|
/external/openssl/apps/ |
D | testdsa.h | 45 dsa->pub_key=BN_bin2bn(dsa512_pub,sizeof(dsa512_pub),NULL); in get_dsa512() 49 if ((dsa->priv_key == NULL) || (dsa->pub_key == NULL) || (dsa->p == NULL) || in get_dsa512() 109 dsa->pub_key=BN_bin2bn(dsa1024_pub,sizeof(dsa1024_pub),NULL); in get_dsa1024() 113 if ((dsa->priv_key == NULL) || (dsa->pub_key == NULL) || (dsa->p == NULL) || in get_dsa1024() 206 dsa->pub_key=BN_bin2bn(dsa2048_pub,sizeof(dsa2048_pub),NULL); in get_dsa2048() 210 if ((dsa->priv_key == NULL) || (dsa->pub_key == NULL) || (dsa->p == NULL) || in get_dsa2048()
|
/external/wpa_supplicant_8/src/crypto/ |
D | crypto_openssl.c | 431 publen = BN_num_bytes(dh->pub_key); in dh5_init() 440 BN_bn2bin(dh->pub_key, wpabuf_put(pubkey, publen)); in dh5_init() 458 BIGNUM *pub_key; in dh5_derive_shared() local 467 pub_key = BN_bin2bn(wpabuf_head(peer_public), wpabuf_len(peer_public), in dh5_derive_shared() 469 if (pub_key == NULL) in dh5_derive_shared() 477 keylen = DH_compute_key(wpabuf_mhead(res), pub_key, dh); in dh5_derive_shared() 481 BN_free(pub_key); in dh5_derive_shared() 486 BN_free(pub_key); in dh5_derive_shared()
|
/external/openssl/crypto/ecdh/ |
D | ech_key.c | 75 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, in ECDH_compute_key() argument 82 return ecdh->meth->compute_key(out, outlen, pub_key, eckey, KDF); in ECDH_compute_key()
|
D | ech_ossl.c | 82 static int ecdh_compute_key(void *out, size_t len, const EC_POINT *pub_key, 108 static int ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, in ecdh_compute_key() argument 146 if (!EC_POINT_mul(group, tmp, NULL, pub_key, priv_key, ctx)) in ecdh_compute_key()
|
/external/openssl/include/openssl/ |
D | dh.h | 117 int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh); 139 BIGNUM *pub_key; /* g^x */ member 210 int DH_check_pub_key(const DH *dh,const BIGNUM *pub_key, int *codes); 212 int DH_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh);
|
/external/chromium/net/base/ |
D | dnssec_keyset.cc | 212 SECKEYPublicKey* pub_key = SECKEY_ExtractPublicKey(spki); in VerifySignature() local 214 if (!pub_key) in VerifySignature() 219 SECKEY_DestroyPublicKey(pub_key); in VerifySignature() 232 SECKEY_DestroyPublicKey(pub_key); in VerifySignature() 243 VFY_CreateContextWithAlgorithmID(pub_key, &sig, in VerifySignature() 246 SECKEY_DestroyPublicKey(pub_key); in VerifySignature()
|
/external/openssh/ |
D | kexdhc.c | 71 packet_put_bignum2(dh->pub_key); in kexdh_client() 78 BN_print_fp(stderr, dh->pub_key); in kexdh_client() 137 dh->pub_key, in kexdh_client()
|
D | kexdhs.c | 103 BN_print_fp(stderr, dh->pub_key); in kexdh_server() 133 dh->pub_key, in kexdh_server() 156 packet_put_bignum2(dh->pub_key); /* f */ in kexdh_server()
|
D | kexgexs.c | 140 BN_print_fp(stderr, dh->pub_key); in kexgex_server() 176 dh->pub_key, in kexgex_server() 200 packet_put_bignum2(dh->pub_key); /* f */ in kexgex_server()
|
D | kexgexc.c | 110 BN_print_fp(stderr, dh->pub_key); in kexgex_client() 117 packet_put_bignum2(dh->pub_key); in kexgex_client() 181 dh->pub_key, in kexgex_client()
|
/external/chromium/net/socket/ |
D | dns_cert_provenance_checker.cc | 273 SECKEYPublicKey* pub_key = NULL; in BuildEncryptedReport() local 279 priv_key = SECKEY_CreateECPrivateKey(&ec_der_params, &pub_key, NULL); in BuildEncryptedReport() 322 SECItem* pub_key_serialized = SECKEY_EncodeDERSubjectPublicKeyInfo(pub_key); in BuildEncryptedReport() 330 SECKEY_DestroyPublicKey(pub_key); in BuildEncryptedReport()
|
/external/openssl/crypto/engine/ |
D | eng_cryptodev.c | 119 BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, 129 const BIGNUM *pub_key, DH *dh); 1148 BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, in cryptodev_dsa_dsa_mod_exp() argument 1164 if (!dsa->meth->bn_mod_exp(dsa,&t2,dsa->pub_key,u2,dsa->p,ctx,mont)) in cryptodev_dsa_dsa_mod_exp() 1244 if (bn2crparam(dsa->pub_key, &kop.crk_param[4])) in cryptodev_dsa_verify() 1288 cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) in cryptodev_dh_compute_key() argument 1297 return ((meth->compute_key)(key, pub_key, dh)); in cryptodev_dh_compute_key() 1308 if (bn2crparam(pub_key, &kop.crk_param[1])) in cryptodev_dh_compute_key() 1321 dhret = (meth->compute_key)(key, pub_key, dh); in cryptodev_dh_compute_key()
|