Home
last modified time | relevance | path

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

12

/external/openssl/crypto/dsa/
Ddsa_key.c96 BIGNUM *pub_key=NULL,*priv_key=NULL; in dsa_builtin_keygen() local
100 if (dsa->priv_key == NULL) in dsa_builtin_keygen()
102 if ((priv_key=BN_new()) == NULL) goto err; in dsa_builtin_keygen()
105 priv_key=dsa->priv_key; in dsa_builtin_keygen()
108 if (!BN_rand_range(priv_key,dsa->q)) goto err; in dsa_builtin_keygen()
109 while (BN_is_zero(priv_key)); in dsa_builtin_keygen()
126 BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME); in dsa_builtin_keygen()
129 prk = priv_key; in dsa_builtin_keygen()
134 dsa->priv_key=priv_key; in dsa_builtin_keygen()
140 if ((priv_key != NULL) && (dsa->priv_key == NULL)) BN_free(priv_key); in dsa_builtin_keygen()
Ddsa_lib.c172 ret->priv_key=NULL; in DSA_new_method()
227 if (r->priv_key != NULL) BN_clear_free(r->priv_key); in DSA_free()
318 if (r->priv_key != NULL) in DSA_dup_DH()
319 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.c115 ASN1_SIMPLE(DSA, priv_key, BIGNUM)
/external/openssl/crypto/dh/
Ddh_key.c124 BIGNUM *pub_key=NULL,*priv_key=NULL; in generate_key() local
129 if (dh->priv_key == NULL) in generate_key()
131 priv_key=BN_new(); in generate_key()
132 if (priv_key == NULL) goto err; in generate_key()
136 priv_key=dh->priv_key; in generate_key()
161 if (!BN_rand_range(priv_key, dh->q)) in generate_key()
164 while (BN_is_zero(priv_key) || BN_is_one(priv_key)); in generate_key()
170 if (!BN_rand(priv_key, l, 0, 0)) goto err; in generate_key()
182 BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME); in generate_key()
185 prk = 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.c164 ret->priv_key=NULL; in DH_new_method()
220 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.h140 BIGNUM *priv_key; /* x */ member
/external/openssl/crypto/ec/
Dec_key.c86 ret->priv_key= NULL; in EC_KEY_new()
131 if (r->priv_key != NULL) in EC_KEY_free()
132 BN_clear_free(r->priv_key); in EC_KEY_free()
175 if (src->priv_key) in EC_KEY_copy()
177 if (dest->priv_key == NULL) in EC_KEY_copy()
179 dest->priv_key = BN_new(); in EC_KEY_copy()
180 if (dest->priv_key == NULL) in EC_KEY_copy()
183 if (!BN_copy(dest->priv_key, src->priv_key)) in EC_KEY_copy()
241 BIGNUM *priv_key = NULL, *order = NULL; in EC_KEY_generate_key() local
258 if (eckey->priv_key == NULL) in EC_KEY_generate_key()
[all …]
Dec_asn1.c1120 EC_PRIVATEKEY *priv_key=NULL; in d2i_ECPrivateKey() local
1122 if ((priv_key = EC_PRIVATEKEY_new()) == NULL) in d2i_ECPrivateKey()
1128 if ((priv_key = d2i_EC_PRIVATEKEY(&priv_key, in, len)) == NULL) in d2i_ECPrivateKey()
1131 EC_PRIVATEKEY_free(priv_key); in d2i_ECPrivateKey()
1149 if (priv_key->parameters) in d2i_ECPrivateKey()
1153 ret->group = ec_asn1_pkparameters2group(priv_key->parameters); in d2i_ECPrivateKey()
1162 ret->version = priv_key->version; in d2i_ECPrivateKey()
1164 if (priv_key->privateKey) in d2i_ECPrivateKey()
1166 ret->priv_key = BN_bin2bn( in d2i_ECPrivateKey()
1167 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/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/openssh/
Ddh.c245 if (dh->priv_key != NULL) in dh_gen_key()
246 BN_clear_free(dh->priv_key); in dh_gen_key()
247 if ((dh->priv_key = BN_new()) == NULL) in dh_gen_key()
250 if (!BN_rand(dh->priv_key, 2*need, 0, 0)) in dh_gen_key()
254 for (i = 0, bits_set = 0; i <= BN_num_bits(dh->priv_key); i++) in dh_gen_key()
255 if (BN_is_bit_set(dh->priv_key, i)) in dh_gen_key()
258 bits_set, BN_num_bits(dh->priv_key)); in dh_gen_key()
Dauth2-jpake.c161 if (k->dsa->priv_key == NULL) in derive_rawsalt()
163 buffer_put_bignum2(&b, k->dsa->priv_key); in derive_rawsalt()
/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.c170 BN_print(out,a->priv_key); in test_ecdh_curve()
198 BN_print(out,b->priv_key); in test_ecdh_curve()
/external/bouncycastle/bcprov/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/chromium/net/socket/
Ddns_cert_provenance_checker.cc274 SECKEYPrivateKey* priv_key = NULL; in BuildEncryptedReport() local
279 priv_key = SECKEY_CreateECPrivateKey(&ec_der_params, &pub_key, NULL); in BuildEncryptedReport()
286 priv_key, server_pub_key, PR_FALSE /* is sender */, in BuildEncryptedReport()
331 SECKEY_DestroyPrivateKey(priv_key); in BuildEncryptedReport()
/external/openssl/crypto/ecdsa/
Decs_ossl.c232 const BIGNUM *priv_key; in ecdsa_do_sign() local
236 priv_key = EC_KEY_get0_private_key(eckey); in ecdsa_do_sign()
238 if (group == NULL || priv_key == NULL || ecdsa == NULL) in ecdsa_do_sign()
302 if (!BN_mod_mul(tmp, priv_key, ret->r, order, ctx)) in ecdsa_do_sign()
/external/chromium/chrome/common/net/
Dx509_certificate_model_nss.cc269 SECKEYPrivateKey *priv_key = PK11_FindKeyByAnyCert(cert_handle, in GetPkcs11Id() local
271 if (priv_key) { in GetPkcs11Id()
273 SECItem* sec_item = PK11_GetLowLevelKeyIDForPrivateKey(priv_key); in GetPkcs11Id()
278 SECKEY_DestroyPrivateKey(priv_key); in GetPkcs11Id()
/external/wpa_supplicant_8/src/crypto/
Dcrypto_openssl.c488 privlen = BN_num_bytes(dh->priv_key); in dh5_init()
494 BN_bn2bin(dh->priv_key, wpabuf_put(privkey, privlen)); in dh5_init()
524 dh->priv_key = BN_bin2bn(wpabuf_head(priv), wpabuf_len(priv), NULL); in dh5_init_fixed()
525 if (dh->priv_key == NULL) in dh5_init_fixed()
/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.c238 if (cert->dh_tmp->priv_key) in ssl_cert_dup()
240 BIGNUM *b = BN_dup(cert->dh_tmp->priv_key); in ssl_cert_dup()
246 ret->dh_tmp->priv_key = b; in ssl_cert_dup()
/external/openssl/include/openssl/
Ddh.h140 BIGNUM *priv_key; /* x */ member

12