Home
last modified time | relevance | path

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

12

/external/openssl/crypto/ec/
Dec_key.c82 ret->pub_key = NULL; in EC_KEY_new()
126 if (r->pub_key != NULL) in EC_KEY_free()
127 EC_POINT_free(r->pub_key); in EC_KEY_free()
161 if (src->pub_key && src->group) in EC_KEY_copy()
163 if (dest->pub_key) in EC_KEY_copy()
164 EC_POINT_free(dest->pub_key); in EC_KEY_copy()
165 dest->pub_key = EC_POINT_new(src->group); in EC_KEY_copy()
166 if (dest->pub_key == NULL) in EC_KEY_copy()
168 if (!EC_POINT_copy(dest->pub_key, src->pub_key)) in EC_KEY_copy()
238 EC_POINT *pub_key = NULL; in EC_KEY_generate_key() local
[all …]
Dec_asn1.c1175 if (ret->pub_key) in d2i_ECPrivateKey()
1176 EC_POINT_clear_free(ret->pub_key); in d2i_ECPrivateKey()
1177 ret->pub_key = EC_POINT_new(ret->group); in d2i_ECPrivateKey()
1178 if (ret->pub_key == NULL) in d2i_ECPrivateKey()
1187 if (!EC_POINT_oct2point(ret->group, ret->pub_key, in d2i_ECPrivateKey()
1274 tmp_len = EC_POINT_point2oct(a->group, a->pub_key, in i2d_ECPrivateKey()
1289 if (!EC_POINT_point2oct(a->group, a->pub_key, in i2d_ECPrivateKey()
1374 if (ret->pub_key == NULL && in o2i_ECPublicKey()
1375 (ret->pub_key = EC_POINT_new(ret->group)) == NULL) in o2i_ECPublicKey()
1380 if (!EC_POINT_oct2point(ret->group, ret->pub_key, *in, len, NULL)) in o2i_ECPublicKey()
[all …]
/external/openssl/crypto/dh/
Ddh_key.c66 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
79 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) in DH_compute_key() argument
81 return dh->meth->compute_key(key, pub_key, dh); in DH_compute_key()
108 BIGNUM *pub_key=NULL,*priv_key=NULL; in generate_key() local
122 if (dh->pub_key == NULL) in generate_key()
124 pub_key=BN_new(); in generate_key()
125 if (pub_key == NULL) goto err; in generate_key()
128 pub_key=dh->pub_key; in generate_key()
158 if (!dh->meth->bn_mod_exp(dh, pub_key, dh->g, prk, dh->p, ctx, mont)) goto err; in generate_key()
161 dh->pub_key=pub_key; in generate_key()
[all …]
Ddh.h102 int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh);
124 BIGNUM *pub_key; /* g^x */ member
194 int DH_check_pub_key(const DH *dh,const BIGNUM *pub_key, int *codes);
196 int DH_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh);
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()
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()
Ddh_lib.c150 ret->pub_key=NULL; in DH_new_method()
206 if (r->pub_key != NULL) BN_clear_free(r->pub_key); in DH_free()
/external/openssl/crypto/dsa/
Ddsa_key.c80 BIGNUM *pub_key=NULL,*priv_key=NULL; in dsa_builtin_keygen() local
95 if (dsa->pub_key == NULL) in dsa_builtin_keygen()
97 if ((pub_key=BN_new()) == NULL) goto err; in dsa_builtin_keygen()
100 pub_key=dsa->pub_key; in dsa_builtin_keygen()
115 if (!BN_mod_exp(pub_key,dsa->g,prk,dsa->p,ctx)) goto err; in dsa_builtin_keygen()
119 dsa->pub_key=pub_key; in dsa_builtin_keygen()
123 if ((pub_key != NULL) && (dsa->pub_key == NULL)) BN_free(pub_key); in dsa_builtin_keygen()
Ddsa_lib.c158 ret->pub_key=NULL; in DSA_new_method()
213 if (r->pub_key != NULL) BN_clear_free(r->pub_key); in DSA_free()
297 if (r->pub_key != NULL) in DSA_dup_DH()
298 if ((ret->pub_key = BN_dup(r->pub_key)) == NULL) in DSA_dup_DH()
Ddsa_asn1.c108 ASN1_SIMPLE(DSA, pub_key, BIGNUM),
129 ASN1_SIMPLE(DSA, pub_key, BIGNUM),
136 ASN1_SIMPLE(DSA, pub_key, BIGNUM),
/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/openssl/crypto/evp/
Devp_pkey.c201 if (!(dsa->pub_key = BN_new())) { in EVP_PKCS82PKEY()
210 if (!BN_mod_exp(dsa->pub_key, dsa->g, in EVP_PKCS82PKEY()
291 EC_POINT *pub_key; in EVP_PKCS82PKEY() local
295 pub_key = EC_POINT_new(group); in EVP_PKCS82PKEY()
296 if (pub_key == NULL) in EVP_PKCS82PKEY()
301 if (!EC_POINT_copy(pub_key, EC_GROUP_get0_generator(group))) in EVP_PKCS82PKEY()
303 EC_POINT_free(pub_key); in EVP_PKCS82PKEY()
308 if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx)) in EVP_PKCS82PKEY()
310 EC_POINT_free(pub_key); in EVP_PKCS82PKEY()
314 if (EC_KEY_set_public_key(eckey, pub_key) == 0) in EVP_PKCS82PKEY()
[all …]
Dp_lib.c280 if (BN_cmp(b->pkey.dsa->pub_key,a->pkey.dsa->pub_key) != 0) in EVP_PKEY_cmp()
/external/openssl/include/openssl/
Ddh.h102 int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh);
124 BIGNUM *pub_key; /* g^x */ member
194 int DH_check_pub_key(const DH *dh,const BIGNUM *pub_key, int *codes);
196 int DH_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh);
Decdh.h94 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh,
/external/openssl/crypto/asn1/
Dt_pkey.c225 if (x->pub_key) in DSA_print()
226 if (buf_len < (i = (size_t)BN_num_bytes(x->pub_key))) in DSA_print()
246 if ((x->pub_key != NULL) && !print(bp,"pub: ",x->pub_key,m,off)) in DSA_print()
499 BIGNUM *pub_key=NULL, *order=NULL; in EC_KEY_print() local
512 if ((pub_key = EC_POINT_point2bn(group, public_key, in EC_KEY_print()
519 buf_len = (size_t)BN_num_bytes(pub_key); in EC_KEY_print()
549 if ((pub_key != NULL) && !print(bp, "pub: ", pub_key, in EC_KEY_print()
558 if (pub_key) in EC_KEY_print()
559 BN_free(pub_key); in EC_KEY_print()
/external/openssl/crypto/ecdh/
Dech_key.c75 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()
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()
Dech_locl.h68 int (*compute_key)(void *key, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh,
Decdh.h94 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh,
/external/openssl/crypto/engine/
Deng_cryptodev.c108 BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p,
118 const BIGNUM *pub_key, DH *dh);
832 BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, in cryptodev_dsa_dsa_mod_exp() argument
848 if (!dsa->meth->bn_mod_exp(dsa,&t2,dsa->pub_key,u2,dsa->p,ctx,mont)) in cryptodev_dsa_dsa_mod_exp()
928 if (bn2crparam(dsa->pub_key, &kop.crk_param[4])) in cryptodev_dsa_verify()
971 cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) in cryptodev_dh_compute_key() argument
980 return ((meth->compute_key)(key, pub_key, dh)); in cryptodev_dh_compute_key()
991 if (bn2crparam(pub_key, &kop.crk_param[1])) in cryptodev_dh_compute_key()
1004 dhret = (meth->compute_key)(key, pub_key, dh); in cryptodev_dh_compute_key()
/external/openssl/crypto/ecdsa/
Decs_ossl.c354 const EC_POINT *pub_key; in ecdsa_do_verify() local
358 (pub_key = EC_KEY_get0_public_key(eckey)) == NULL || sig == NULL) in ecdsa_do_verify()
441 if (!EC_POINT_mul(group, point, u1, pub_key, u2, ctx)) in ecdsa_do_verify()
/external/openssl/ssl/
Dd1_srvr.c864 if ((dhp->pub_key == NULL || in dtls1_send_server_key_exchange()
877 dh->pub_key=BN_dup(dhp->pub_key); in dtls1_send_server_key_exchange()
879 if ((dh->pub_key == NULL) || in dtls1_send_server_key_exchange()
888 r[2]=dh->pub_key; in dtls1_send_server_key_exchange()
Dssl_cert.c231 if (cert->dh_tmp->pub_key) in ssl_cert_dup()
233 BIGNUM *b = BN_dup(cert->dh_tmp->pub_key); in ssl_cert_dup()
239 ret->dh_tmp->pub_key = b; in ssl_cert_dup()
Dd1_clnt.c939 n=DH_compute_key(p,dh_srvr->pub_key,dh_clnt); in dtls1_send_client_key_exchange()
955 n=BN_num_bytes(dh_clnt->pub_key); in dtls1_send_client_key_exchange()
957 BN_bn2bin(dh_clnt->pub_key,p); in dtls1_send_client_key_exchange()

12