Home
last modified time | relevance | path

Searched refs:pub_key (Results 1 – 25 of 39) 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_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 …]
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_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()
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.h102 int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh);
124 BIGNUM *pub_key; /* g^x */ member
195 int DH_check_pub_key(const DH *dh,const BIGNUM *pub_key, int *codes);
197 int DH_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh);
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_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()
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()
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.c113 ASN1_SIMPLE(DSA, pub_key, BIGNUM),
134 ASN1_SIMPLE(DSA, pub_key, BIGNUM),
141 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/include/openssl/
Ddh.h102 int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh);
124 BIGNUM *pub_key; /* g^x */ member
195 int DH_check_pub_key(const DH *dh,const BIGNUM *pub_key, int *codes);
197 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/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.c121 BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p,
131 const BIGNUM *pub_key, DH *dh);
1117 BIGNUM *u1, BIGNUM *pub_key, BIGNUM *u2, BIGNUM *p, in cryptodev_dsa_dsa_mod_exp() argument
1133 if (!dsa->meth->bn_mod_exp(dsa,&t2,dsa->pub_key,u2,dsa->p,ctx,mont)) in cryptodev_dsa_dsa_mod_exp()
1213 if (bn2crparam(dsa->pub_key, &kop.crk_param[4])) in cryptodev_dsa_verify()
1257 cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) in cryptodev_dh_compute_key() argument
1266 return ((meth->compute_key)(key, pub_key, dh)); in cryptodev_dh_compute_key()
1277 if (bn2crparam(pub_key, &kop.crk_param[1])) in cryptodev_dh_compute_key()
1290 dhret = (meth->compute_key)(key, pub_key, dh); in cryptodev_dh_compute_key()
/external/openssl/crypto/ecdsa/
Decs_ossl.c351 const EC_POINT *pub_key; in ecdsa_do_verify() local
355 (pub_key = EC_KEY_get0_public_key(eckey)) == NULL || sig == NULL) in ecdsa_do_verify()
435 if (!EC_POINT_mul(group, point, u1, pub_key, u2, ctx)) in ecdsa_do_verify()
/external/openssl/crypto/pem/
Dpvkfmt.c333 if (!read_lebn(&p, nbyte, &dsa->pub_key)) in b2i_dss()
341 if (!(dsa->pub_key = BN_new())) in b2i_dss()
346 if (!BN_mod_exp(dsa->pub_key, dsa->g, in b2i_dss()
559 if (BN_num_bits(dsa->pub_key) > bitlen) in check_bitlen_dsa()
637 write_lebn(out, dsa->pub_key, nbyte); in write_dsa()
/external/bouncycastle/src/main/java/org/bouncycastle/jce/netscape/
DNetscapeCertRequest.java133 PublicKey pub_key) throws NoSuchAlgorithmException, in NetscapeCertRequest() argument
139 pubkey = pub_key; in NetscapeCertRequest()
/external/openssl/ssl/
Dssl_cert.c233 if (cert->dh_tmp->pub_key) in ssl_cert_dup()
235 BIGNUM *b = BN_dup(cert->dh_tmp->pub_key); in ssl_cert_dup()
241 ret->dh_tmp->pub_key = b; in ssl_cert_dup()

12