Home
last modified time | relevance | path

Searched refs:pub_key (Results 1 – 25 of 70) sorted by relevance

123

/external/chromium_org/third_party/boringssl/src/crypto/ec/
Dec_key.c153 if (r->pub_key != NULL) { in EC_KEY_free()
154 EC_POINT_free(r->pub_key); in EC_KEY_free()
189 if (src->pub_key && src->group) { in EC_KEY_copy()
190 if (dest->pub_key) { in EC_KEY_copy()
191 EC_POINT_free(dest->pub_key); in EC_KEY_copy()
193 dest->pub_key = EC_POINT_new(src->group); in EC_KEY_copy()
194 if (dest->pub_key == NULL) { in EC_KEY_copy()
197 if (!EC_POINT_copy(dest->pub_key, src->pub_key)) { in EC_KEY_copy()
275 return key->pub_key; in EC_KEY_get0_public_key()
278 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key) { in EC_KEY_set_public_key() argument
[all …]
Dec_asn1.c346 if (ret->pub_key) { in d2i_ECPrivateKey()
347 EC_POINT_free(ret->pub_key); in d2i_ECPrivateKey()
349 ret->pub_key = EC_POINT_new(ret->group); in d2i_ECPrivateKey()
350 if (ret->pub_key == NULL) { in d2i_ECPrivateKey()
358 if (!EC_POINT_oct2point(ret->group, ret->pub_key, pub_oct, pub_oct_len, in d2i_ECPrivateKey()
428 if (!(key->enc_flag & EC_PKEY_NO_PUBKEY) && key->pub_key != NULL) { in i2d_ECPrivateKey()
435 tmp_len = EC_POINT_point2oct(key->group, key->pub_key, key->conv_form, NULL, in i2d_ECPrivateKey()
448 if (!EC_POINT_point2oct(key->group, key->pub_key, key->conv_form, buffer, in i2d_ECPrivateKey()
524 if (ret->pub_key == NULL && in o2i_ECPublicKey()
525 (ret->pub_key = EC_POINT_new(ret->group)) == NULL) { in o2i_ECPublicKey()
[all …]
/external/openssl/crypto/ec/
Dec_key.c85 ret->pub_key = NULL; in EC_KEY_new()
130 if (r->pub_key != NULL) in EC_KEY_free()
131 EC_POINT_free(r->pub_key); in EC_KEY_free()
165 if (src->pub_key && src->group) in EC_KEY_copy()
167 if (dest->pub_key) in EC_KEY_copy()
168 EC_POINT_free(dest->pub_key); in EC_KEY_copy()
169 dest->pub_key = EC_POINT_new(src->group); in EC_KEY_copy()
170 if (dest->pub_key == NULL) in EC_KEY_copy()
172 if (!EC_POINT_copy(dest->pub_key, src->pub_key)) in EC_KEY_copy()
244 EC_POINT *pub_key = NULL; in EC_KEY_generate_key() local
[all …]
Dec_ameth.c269 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 …]
/external/openssl/crypto/dsa/
Ddsa_key.c96 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()
Ddsa_lib.c171 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()
Ddsa_ameth.c119 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()
416 if (BN_cmp(b->pkey.dsa->pub_key,a->pkey.dsa->pub_key) != 0) in dsa_pub_cmp()
443 const BIGNUM *priv_key, *pub_key; in do_dsa_print() local
451 pub_key = x->pub_key; in do_dsa_print()
453 pub_key = NULL; in do_dsa_print()
466 update_buflen(pub_key, &buf_len); in do_dsa_print()
485 if (!ASN1_bn_print(bp,"pub: ",pub_key,m,off)) in do_dsa_print()
/external/openssl/crypto/dh/
Ddh_key.c66 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 …]
Ddh_ameth.c110 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 …]
Ddh_check.c122 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()
Ddh.h117 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);
Ddhtest.c156 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()
/external/chromium_org/net/ssl/
Dopenssl_client_key_store.cc39 OpenSSLClientKeyStore::KeyPair::KeyPair(EVP_PKEY* pub_key, in KeyPair() argument
41 : public_key(EVP_PKEY_dup(pub_key)), in KeyPair()
74 void OpenSSLClientKeyStore::AddKeyPair(EVP_PKEY* pub_key, in AddKeyPair() argument
76 int index = FindKeyPairIndex(pub_key); in AddKeyPair()
78 pairs_.push_back(KeyPair(pub_key, private_key)); in AddKeyPair()
91 crypto::ScopedEVP_PKEY pub_key(GetOpenSSLPublicKey(client_cert)); in RecordClientCertPrivateKey() local
92 if (!pub_key.get()) in RecordClientCertPrivateKey()
95 AddKeyPair(pub_key.get(), private_key); in RecordClientCertPrivateKey()
104 crypto::ScopedEVP_PKEY pub_key(GetOpenSSLPublicKey(client_cert)); in FetchClientCertPrivateKey() local
105 if (!pub_key.get()) in FetchClientCertPrivateKey()
[all …]
/external/chromium_org/third_party/boringssl/src/crypto/dh/
Ddh_impl.c182 BIGNUM *pub_key = NULL, *priv_key = NULL; in generate_key() local
200 if (dh->pub_key == NULL) { in generate_key()
201 pub_key = BN_new(); in generate_key()
202 if (pub_key == NULL) { in generate_key()
206 pub_key = dh->pub_key; in generate_key()
232 if (!BN_mod_exp_mont(pub_key, dh->g, &local_priv, dh->p, ctx, mont)) { in generate_key()
236 dh->pub_key = pub_key; in generate_key()
245 if (pub_key != NULL && dh->pub_key == NULL) { in generate_key()
246 BN_free(pub_key); in generate_key()
255 static int compute_key(DH *dh, unsigned char *out, const BIGNUM *pub_key) { in compute_key() argument
[all …]
Ddh_test.c144 BN_print(out, a->pub_key); in main()
152 BN_print(out, b->pub_key); in main()
157 aout = DH_compute_key(abuf, b->pub_key, a); in main()
168 bout = DH_compute_key(bbuf, a->pub_key, b); in main()
439 dhA->pub_key = BN_bin2bn(td->yA, td->yA_len, NULL); in run_rfc5114_tests()
442 dhB->pub_key = BN_bin2bn(td->yB, td->yB_len, NULL); in run_rfc5114_tests()
444 if (!dhA->priv_key || !dhA->pub_key || !dhB->priv_key || !dhB->pub_key) in run_rfc5114_tests()
456 if (!DH_compute_key(Z1, dhB->pub_key, dhA)) in run_rfc5114_tests()
458 if (!DH_compute_key(Z2, dhA->pub_key, dhB)) in run_rfc5114_tests()
Dcheck.c64 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) { in DH_check_pub_key() argument
74 if (BN_cmp(pub_key, &q) <= 0) { in DH_check_pub_key()
81 if (BN_cmp(pub_key, &q) >= 0) { in DH_check_pub_key()
/external/chromium_org/tools/crx_id/
Dcrx_id.py75 pub_key = f.read(pub_key_len_bytes)
76 return pub_key
118 pub_key = ''
122 pub_key = GetPublicKeyUnpacked(f, filename)
127 pub_key = GetPublicKeyPacked(f)
129 return pub_key
132 pub_key = GetPublicKey(filename, from_file_path, is_win_path=is_win_path)
133 pub_key_hash = hashlib.sha256(pub_key).digest()
137 pub_key = GetPublicKey(filename, from_file_path, is_win_path=is_win_path)
138 pub_key_hash = hashlib.sha256(pub_key).digest()
/external/openssl/apps/
Dtestdsa.h45 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/chromium_org/third_party/boringssl/src/crypto/dsa/
Ddsa_impl.c369 if (!BN_mod_exp2_mont(&t1, dsa->g, &u1, dsa->pub_key, &u2, dsa->p, ctx, mont)) { in verify()
401 BIGNUM *pub_key = NULL, *priv_key = NULL; in keygen() local
423 pub_key = dsa->pub_key; in keygen()
424 if (pub_key == NULL) { in keygen()
425 pub_key = BN_new(); in keygen()
426 if (pub_key == NULL) { in keygen()
434 if (!BN_mod_exp(pub_key, dsa->g, &prk, dsa->p, ctx)) { in keygen()
439 dsa->pub_key = pub_key; in keygen()
443 if (pub_key != NULL && dsa->pub_key == NULL) { in keygen()
444 BN_free(pub_key); in keygen()
Ddsa_asn1.c115 ASN1_SIMPLE(DSA, pub_key, BIGNUM),
133 ASN1_SIMPLE(DSA, pub_key, BIGNUM),
140 ASN1_SIMPLE(DSA, pub_key, BIGNUM),
/external/chromium_org/third_party/boringssl/src/crypto/evp/
Dp_ec_asn1.c251 EC_POINT *pub_key; in eckey_priv_decode() local
255 pub_key = EC_POINT_new(group); in eckey_priv_decode()
256 if (pub_key == NULL) { in eckey_priv_decode()
260 if (!EC_POINT_copy(pub_key, EC_GROUP_get0_generator(group))) { in eckey_priv_decode()
261 EC_POINT_free(pub_key); in eckey_priv_decode()
266 if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, NULL)) { in eckey_priv_decode()
267 EC_POINT_free(pub_key); in eckey_priv_decode()
271 if (EC_KEY_set_public_key(eckey, pub_key) == 0) { in eckey_priv_decode()
272 EC_POINT_free(pub_key); in eckey_priv_decode()
276 EC_POINT_free(pub_key); in eckey_priv_decode()
/external/openssl/crypto/ecdh/
Dech_key.c72 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, in ECDH_compute_key() argument
79 return ecdh->meth->compute_key(out, outlen, pub_key, eckey, KDF); in ECDH_compute_key()
Dech_ossl.c82 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/
Ddh.h117 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_org/third_party/boringssl/src/include/openssl/
Ddh.h161 OPENSSL_EXPORT int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key,
221 int (*compute_key)(DH *dh, uint8_t *out, const BIGNUM *pub_key);
229 BIGNUM *pub_key; /* g^x */ member

123