Home
last modified time | relevance | path

Searched refs:priv_key (Results 1 – 25 of 30) sorted by relevance

12

/external/openssl/crypto/ec/
Dec_key.c83 ret->priv_key= NULL; in EC_KEY_new()
128 if (r->priv_key != NULL) in EC_KEY_free()
129 BN_clear_free(r->priv_key); in EC_KEY_free()
172 if (src->priv_key) in EC_KEY_copy()
174 if (dest->priv_key == NULL) in EC_KEY_copy()
176 dest->priv_key = BN_new(); in EC_KEY_copy()
177 if (dest->priv_key == NULL) in EC_KEY_copy()
180 if (!BN_copy(dest->priv_key, src->priv_key)) in EC_KEY_copy()
237 BIGNUM *priv_key = NULL, *order = NULL; in EC_KEY_generate_key() local
249 if (eckey->priv_key == NULL) in EC_KEY_generate_key()
[all …]
Dec_asn1.c1106 EC_PRIVATEKEY *priv_key=NULL; in d2i_ECPrivateKey() local
1108 if ((priv_key = EC_PRIVATEKEY_new()) == NULL) in d2i_ECPrivateKey()
1114 if ((priv_key = d2i_EC_PRIVATEKEY(&priv_key, in, len)) == NULL) in d2i_ECPrivateKey()
1117 EC_PRIVATEKEY_free(priv_key); in d2i_ECPrivateKey()
1135 if (priv_key->parameters) in d2i_ECPrivateKey()
1139 ret->group = ec_asn1_pkparameters2group(priv_key->parameters); in d2i_ECPrivateKey()
1148 ret->version = priv_key->version; in d2i_ECPrivateKey()
1150 if (priv_key->privateKey) in d2i_ECPrivateKey()
1152 ret->priv_key = BN_bin2bn( in d2i_ECPrivateKey()
1153 M_ASN1_STRING_data(priv_key->privateKey), in d2i_ECPrivateKey()
[all …]
Dec_ameth.c267 const BIGNUM *priv_key; in eckey_priv_decode() local
285 priv_key = EC_KEY_get0_private_key(eckey); in eckey_priv_decode()
286 if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, NULL)) in eckey_priv_decode()
437 const BIGNUM *priv_key; in do_EC_KEY_print() local
467 priv_key = EC_KEY_get0_private_key(x); in do_EC_KEY_print()
468 if (priv_key && (i = (size_t)BN_num_bytes(priv_key)) > buf_len) in do_EC_KEY_print()
472 priv_key = NULL; in do_EC_KEY_print()
499 if ((priv_key != NULL) && !ASN1_bn_print(bp, "priv:", priv_key, in do_EC_KEY_print()
/external/openssl/crypto/dsa/
Ddsa_key.c80 BIGNUM *pub_key=NULL,*priv_key=NULL; in dsa_builtin_keygen() local
84 if (dsa->priv_key == NULL) in dsa_builtin_keygen()
86 if ((priv_key=BN_new()) == NULL) goto err; in dsa_builtin_keygen()
89 priv_key=dsa->priv_key; in dsa_builtin_keygen()
92 if (!BN_rand_range(priv_key,dsa->q)) goto err; in dsa_builtin_keygen()
93 while (BN_is_zero(priv_key)); in dsa_builtin_keygen()
110 BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME); in dsa_builtin_keygen()
113 prk = priv_key; in dsa_builtin_keygen()
118 dsa->priv_key=priv_key; in dsa_builtin_keygen()
124 if ((priv_key != NULL) && (dsa->priv_key == NULL)) BN_free(priv_key); in dsa_builtin_keygen()
Ddsa_lib.c159 ret->priv_key=NULL; in DSA_new_method()
214 if (r->priv_key != NULL) BN_clear_free(r->priv_key); in DSA_free()
300 if (r->priv_key != NULL) in DSA_dup_DH()
301 if ((ret->priv_key = BN_dup(r->priv_key)) == NULL) in DSA_dup_DH()
Ddsa_ameth.c260 if (!(dsa->priv_key = ASN1_INTEGER_to_BN(privkey, NULL))) in dsa_priv_decode()
277 if (!BN_mod_exp(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx)) in dsa_priv_decode()
327 prkey = BN_to_ASN1_INTEGER(pkey->pkey.dsa->priv_key, NULL); in dsa_priv_encode()
437 const BIGNUM *priv_key, *pub_key; in do_dsa_print() local
440 priv_key = x->priv_key; in do_dsa_print()
442 priv_key = NULL; in do_dsa_print()
459 update_buflen(priv_key, &buf_len); in do_dsa_print()
469 if (priv_key) in do_dsa_print()
477 if (!ASN1_bn_print(bp,"priv:",priv_key,m,off)) in do_dsa_print()
Ddsa_asn1.c114 ASN1_SIMPLE(DSA, priv_key, BIGNUM)
Ddsa.h153 BIGNUM *priv_key; /* x private key */ member
/external/openssl/crypto/dh/
Ddh_key.c108 BIGNUM *pub_key=NULL,*priv_key=NULL; in generate_key() local
113 if (dh->priv_key == NULL) in generate_key()
115 priv_key=BN_new(); in generate_key()
116 if (priv_key == NULL) goto err; in generate_key()
120 priv_key=dh->priv_key; in generate_key()
142 if (!BN_rand(priv_key, l, 0, 0)) goto err; in generate_key()
153 BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME); in generate_key()
156 prk = priv_key; in generate_key()
162 dh->priv_key=priv_key; in generate_key()
169 if ((priv_key != NULL) && (dh->priv_key == NULL)) BN_free(priv_key); in generate_key()
[all …]
Ddh_ameth.c214 if (!(dh->priv_key = ASN1_INTEGER_to_BN(privkey, NULL))) in dh_priv_decode()
260 prkey = BN_to_ASN1_INTEGER(pkey->pkey.dh->priv_key, NULL); in dh_priv_encode()
325 BIGNUM *priv_key, *pub_key; in do_dh_print() local
328 priv_key = x->priv_key; in do_dh_print()
330 priv_key = NULL; in do_dh_print()
347 update_buflen(priv_key, &buf_len); in do_dh_print()
368 if (!ASN1_bn_print(bp,"private-key:",priv_key,m,indent)) goto err; in do_dh_print()
Ddh_lib.c151 ret->priv_key=NULL; in DH_new_method()
207 if (r->priv_key != NULL) BN_clear_free(r->priv_key); in DH_free()
Ddhtest.c154 BN_print(out,a->priv_key); in main()
161 BN_print(out,b->priv_key); in main()
Ddh.h125 BIGNUM *priv_key; /* x */ member
/external/openssl/apps/
Dtestdsa.h44 dsa->priv_key=BN_bin2bn(dsa512_priv,sizeof(dsa512_priv),NULL); in get_dsa512()
49 if ((dsa->priv_key == NULL) || (dsa->pub_key == NULL) || (dsa->p == NULL) || in get_dsa512()
108 dsa->priv_key=BN_bin2bn(dsa1024_priv,sizeof(dsa1024_priv),NULL); in get_dsa1024()
113 if ((dsa->priv_key == NULL) || (dsa->pub_key == NULL) || (dsa->p == NULL) || in get_dsa1024()
205 dsa->priv_key=BN_bin2bn(dsa2048_priv,sizeof(dsa2048_priv),NULL); in get_dsa2048()
210 if ((dsa->priv_key == NULL) || (dsa->pub_key == NULL) || (dsa->p == NULL) || in get_dsa2048()
/external/openssl/crypto/ecdh/
Dech_ossl.c115 const BIGNUM *priv_key; in ecdh_compute_key() local
132 priv_key = EC_KEY_get0_private_key(ecdh); in ecdh_compute_key()
133 if (priv_key == NULL) in ecdh_compute_key()
146 if (!EC_POINT_mul(group, tmp, NULL, pub_key, priv_key, ctx)) in ecdh_compute_key()
Decdhtest.c168 BN_print(out,a->priv_key); in test_ecdh_curve()
194 BN_print(out,b->priv_key); in test_ecdh_curve()
/external/bouncycastle/src/main/java/org/bouncycastle/jce/netscape/
DNetscapeCertRequest.java209 public void sign(PrivateKey priv_key) throws NoSuchAlgorithmException, in sign() argument
213 sign(priv_key, null); in sign()
216 public void sign(PrivateKey priv_key, SecureRandom rand) in sign() argument
226 sig.initSign(priv_key, rand); in sign()
230 sig.initSign(priv_key); in sign()
/external/openssl/crypto/ecdsa/
Decs_ossl.c222 const BIGNUM *priv_key; in ecdsa_do_sign() local
226 priv_key = EC_KEY_get0_private_key(eckey); in ecdsa_do_sign()
228 if (group == NULL || priv_key == NULL || ecdsa == NULL) in ecdsa_do_sign()
292 if (!BN_mod_mul(tmp, priv_key, ret->r, order, ctx)) in ecdsa_do_sign()
/external/openssl/crypto/pem/
Dpvkfmt.c338 if (!read_lebn(&p, 20, &dsa->priv_key)) in b2i_dss()
347 dsa->priv_key, dsa->p, ctx)) in b2i_dss()
565 if (BN_num_bits(dsa->priv_key) > 160) in check_bitlen_dsa()
639 write_lebn(out, dsa->priv_key, 20); in write_dsa()
/external/openssl/ssl/
Dssl_cert.c223 if (cert->dh_tmp->priv_key) in ssl_cert_dup()
225 BIGNUM *b = BN_dup(cert->dh_tmp->priv_key); in ssl_cert_dup()
231 ret->dh_tmp->priv_key = b; in ssl_cert_dup()
Dd1_srvr.c961 dhp->priv_key == NULL || in dtls1_send_server_key_exchange()
974 dh->priv_key=BN_dup(dhp->priv_key); in dtls1_send_server_key_exchange()
976 (dh->priv_key == NULL)) in dtls1_send_server_key_exchange()
Dd1_clnt.c1140 const BIGNUM *priv_key; in dtls1_send_client_key_exchange() local
1142 priv_key = EC_KEY_get0_private_key(tkey); in dtls1_send_client_key_exchange()
1143 if (priv_key == NULL) in dtls1_send_client_key_exchange()
1148 if (!EC_KEY_set_private_key(clnt_ecdh, priv_key)) in dtls1_send_client_key_exchange()
Ds3_srvr.c1514 dhp->priv_key == NULL || in ssl3_send_server_key_exchange()
1527 dh->priv_key=BN_dup(dhp->priv_key); in ssl3_send_server_key_exchange()
1529 (dh->priv_key == NULL)) in ssl3_send_server_key_exchange()
2352 const BIGNUM *priv_key; in ssl3_get_client_key_exchange() local
2377 priv_key = EC_KEY_get0_private_key(tkey); in ssl3_get_client_key_exchange()
2380 !EC_KEY_set_private_key(srvr_ecdh, priv_key)) in ssl3_get_client_key_exchange()
/external/openssl/include/openssl/
Ddh.h125 BIGNUM *priv_key; /* x */ member
Ddsa.h153 BIGNUM *priv_key; /* x private key */ member

12