Home
last modified time | relevance | path

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

12

/external/boringssl/src/crypto/fipsmodule/ec/
Dec_key.c153 EC_POINT_free(r->pub_key); in EC_KEY_free()
179 if (src->pub_key && src->group) { in EC_KEY_copy()
180 EC_POINT_free(dest->pub_key); in EC_KEY_copy()
181 dest->pub_key = EC_POINT_dup(src->pub_key, src->group); in EC_KEY_copy()
182 if (dest->pub_key == NULL) { in EC_KEY_copy()
269 return key->pub_key; in EC_KEY_get0_public_key()
272 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key) { in EC_KEY_set_public_key() argument
273 EC_POINT_free(key->pub_key); in EC_KEY_set_public_key()
274 key->pub_key = EC_POINT_dup(pub_key, key->group); in EC_KEY_set_public_key()
275 return (key->pub_key == NULL) ? 0 : 1; in EC_KEY_set_public_key()
[all …]
Dec_test.cc141 const EC_POINT *pub_key = EC_KEY_get0_public_key(key.get()); in TEST() local
142 ASSERT_TRUE(pub_key) << "Public key missing"; in TEST()
149 EC_KEY_get0_group(key.get()), pub_key, x.get(), y.get(), NULL)); in TEST()
/external/boringssl/src/crypto/dh/
Ddh.c110 BN_clear_free(dh->pub_key); in DH_free()
120 *out_pub_key = dh->pub_key; in DH_get0_key()
260 BIGNUM *pub_key = NULL, *priv_key = NULL; in DH_generate_key() local
282 if (dh->pub_key == NULL) { in DH_generate_key()
283 pub_key = BN_new(); in DH_generate_key()
284 if (pub_key == NULL) { in DH_generate_key()
288 pub_key = dh->pub_key; in DH_generate_key()
319 if (!BN_mod_exp_mont_consttime(pub_key, dh->g, priv_key, dh->p, ctx, in DH_generate_key()
324 dh->pub_key = pub_key; in DH_generate_key()
333 if (dh->pub_key == NULL) { in DH_generate_key()
[all …]
Ddh_test.cc160 BN_print_fp(stdout, a->pub_key); in RunBasicTests()
169 BN_print_fp(stdout, b->pub_key); in RunBasicTests()
173 int ret = DH_compute_key(key1.data(), b->pub_key, a.get()); in RunBasicTests()
186 ret = DH_compute_key(key2.data(), a->pub_key, b.get()); in RunBasicTests()
445 dhA->pub_key = BN_bin2bn(td->yA, td->yA_len, nullptr); in RunRFC5114Tests()
448 dhB->pub_key = BN_bin2bn(td->yB, td->yB_len, nullptr); in RunRFC5114Tests()
450 if (!dhA->priv_key || !dhA->pub_key || !dhB->priv_key || !dhB->pub_key) { in RunRFC5114Tests()
464 int ret1 = DH_compute_key(Z1.data(), dhB->pub_key, dhA.get()); in RunRFC5114Tests()
465 int ret2 = DH_compute_key(Z2.data(), dhA->pub_key, dhB.get()); in RunRFC5114Tests()
514 bssl::UniquePtr<BIGNUM> pub_key( in TestBadY() local
[all …]
Dcheck.c62 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) { in DH_check_pub_key() argument
79 if (BN_cmp(pub_key, tmp) <= 0) { in DH_check_pub_key()
88 if (BN_cmp(pub_key, tmp) >= 0) { in DH_check_pub_key()
96 if (!BN_mod_exp_mont(tmp, pub_key, dh->q, dh->p, ctx, NULL)) { in DH_check_pub_key()
/external/boringssl/src/crypto/evp/
Dp_dsa_asn1.c85 dsa->pub_key = BN_new(); in dsa_pub_decode()
86 if (dsa->pub_key == NULL) { in dsa_pub_decode()
90 if (!BN_parse_asn1_unsigned(key, dsa->pub_key) || in dsa_pub_decode()
118 !BN_marshal_asn1(&key_bitstring, dsa->pub_key) || in dsa_pub_encode()
139 dsa->pub_key = BN_new(); in dsa_priv_decode()
140 if (dsa->priv_key == NULL || dsa->pub_key == NULL) { in dsa_priv_decode()
154 !BN_mod_exp_mont(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx, in dsa_priv_decode()
241 return BN_cmp(b->pkey.dsa->pub_key, a->pkey.dsa->pub_key) == 0; in dsa_pub_cmp()
Dprint.c223 const BIGNUM *priv_key, *pub_key; in do_dsa_print() local
230 pub_key = NULL; in do_dsa_print()
232 pub_key = x->pub_key; in do_dsa_print()
246 update_buflen(pub_key, &buf_len); in do_dsa_print()
262 !bn_print(bp, "pub: ", pub_key, m, off) || in do_dsa_print()
/external/boringssl/src/crypto/dsa/
Ddsa.c118 BN_clear_free(dsa->pub_key); in DSA_free()
136 *out_pub_key = dsa->pub_key; in DSA_get0_key()
436 BIGNUM *pub_key = NULL, *priv_key = NULL; in DSA_generate_key() local
455 pub_key = dsa->pub_key; in DSA_generate_key()
456 if (pub_key == NULL) { in DSA_generate_key()
457 pub_key = BN_new(); in DSA_generate_key()
458 if (pub_key == NULL) { in DSA_generate_key()
465 !BN_mod_exp_mont_consttime(pub_key, dsa->g, priv_key, dsa->p, ctx, in DSA_generate_key()
471 dsa->pub_key = pub_key; in DSA_generate_key()
475 if (dsa->pub_key == NULL) { in DSA_generate_key()
[all …]
Ddsa_asn1.c121 !parse_integer(&child, &ret->pub_key) || in DSA_parse_public_key()
136 !marshal_integer(&child, dsa->pub_key) || in DSA_marshal_public_key()
200 !parse_integer(&child, &ret->pub_key) || in DSA_parse_private_key()
220 !marshal_integer(&child, dsa->pub_key) || in DSA_marshal_private_key()
Ddsa_test.cc177 dsa->pub_key = BN_bin2bn(fips_y, sizeof(fips_y), nullptr); in GetFIPSDSA()
180 dsa->pub_key == nullptr || dsa->priv_key == nullptr) { in GetFIPSDSA()
/external/boringssl/src/crypto/ec_extra/
Dec_asn1.c131 ret->pub_key = EC_POINT_new(group); in EC_KEY_parse_private_key()
132 if (ret->priv_key == NULL || ret->pub_key == NULL) { in EC_KEY_parse_private_key()
153 !EC_POINT_oct2point(group, ret->pub_key, CBS_data(&public_key), in EC_KEY_parse_private_key()
166 if (!EC_POINT_mul(group, ret->pub_key, ret->priv_key, NULL, NULL, NULL)) { in EC_KEY_parse_private_key()
222 if (!(enc_flags & EC_PKEY_NO_PUBKEY) && key->pub_key != NULL) { in EC_KEY_marshal_private_key()
229 !EC_POINT_point2cbb(&public_key, key->group, key->pub_key, in EC_KEY_marshal_private_key()
509 if (ret->pub_key == NULL && in o2i_ECPublicKey()
510 (ret->pub_key = EC_POINT_new(ret->group)) == NULL) { in o2i_ECPublicKey()
514 if (!EC_POINT_oct2point(ret->group, ret->pub_key, *inp, len, NULL)) { in o2i_ECPublicKey()
533 buf_len = EC_POINT_point2oct(key->group, key->pub_key, key->conv_form, NULL, in i2o_ECPublicKey()
[all …]
/external/boringssl/src/crypto/fipsmodule/ecdsa/
Decdsa_test.cc312 bssl::UniquePtr<EC_POINT> pub_key(EC_POINT_new(group.get())); in TEST() local
313 ASSERT_TRUE(pub_key); in TEST()
317 ASSERT_TRUE(EC_POINT_set_affine_coordinates_GFp(group.get(), pub_key.get(), in TEST()
319 ASSERT_TRUE(EC_KEY_set_public_key(key.get(), pub_key.get())); in TEST()
351 bssl::UniquePtr<EC_POINT> pub_key(EC_POINT_new(group.get())); in TEST() local
352 ASSERT_TRUE(pub_key); in TEST()
355 ASSERT_TRUE(EC_POINT_set_affine_coordinates_GFp(group.get(), pub_key.get(), in TEST()
357 ASSERT_TRUE(EC_KEY_set_public_key(key.get(), pub_key.get())); in TEST()
Decdsa.c131 const EC_POINT *pub_key; in ECDSA_do_verify() local
135 (pub_key = EC_KEY_get0_public_key(eckey)) == NULL || in ECDSA_do_verify()
188 if (!EC_POINT_mul(group, point, u1, pub_key, u2, ctx)) { in ECDSA_do_verify()
/external/boringssl/src/crypto/ecdh/
Decdh_test.cc84 bssl::UniquePtr<EC_POINT> pub_key(EC_POINT_new(group.get())); in TEST() local
85 ASSERT_TRUE(pub_key); in TEST()
90 ASSERT_TRUE(EC_POINT_set_affine_coordinates_GFp(group.get(), pub_key.get(), in TEST()
94 ASSERT_TRUE(EC_KEY_set_public_key(key.get(), pub_key.get())); in TEST()
Decdh.c80 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, in ECDH_compute_key() argument
107 if (!EC_POINT_mul(group, tmp, NULL, pub_key, priv, ctx)) { in ECDH_compute_key()
/external/wpa_supplicant_8/src/crypto/
Dcrypto_openssl.c653 publen = BN_num_bytes(dh->pub_key); in dh5_init()
662 BN_bn2bin(dh->pub_key, wpabuf_put(pubkey, publen)); in dh5_init()
679 const BIGNUM *priv_key = NULL, *pub_key = NULL; in dh5_init()
700 DH_get0_key(dh, &pub_key, &priv_key); in dh5_init()
701 publen = BN_num_bytes(pub_key); in dh5_init()
710 BN_bn2bin(pub_key, wpabuf_put(pubkey, publen)); in dh5_init()
749 dh->pub_key = BN_bin2bn(wpabuf_head(publ), wpabuf_len(publ), NULL); in dh5_init_fixed()
750 if (dh->pub_key == NULL) in dh5_init_fixed()
763 BIGNUM *p = NULL, *g, *priv_key = NULL, *pub_key = NULL; in dh5_init_fixed()
778 pub_key = BN_bin2bn(wpabuf_head(publ), wpabuf_len(publ), NULL); in dh5_init_fixed()
[all …]
/external/vboot_reference/scripts/image_signing/
Dinsert_au_publickey.sh16 local pub_key="$2"
28 sudo cp "$pub_key" "$rootfs/$key_location/update-payload-key.pub.pem"
/external/openssh/
Dkexdhc.c86 (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || in kexdh_client()
92 BN_print_fp(stderr, kex->dh->pub_key); in kexdh_client()
180 kex->dh->pub_key, in input_kex_dh()
Dkexdhs.c139 BN_print_fp(stderr, kex->dh->pub_key); in input_kex_dh_init()
175 kex->dh->pub_key, in input_kex_dh_init()
201 (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || /* f */ in input_kex_dh_init()
Dkexgexs.c168 BN_print_fp(stderr, kex->dh->pub_key); in input_kex_dh_gex_init()
206 kex->dh->pub_key, in input_kex_dh_gex_init()
232 (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || /* f */ in input_kex_dh_gex_init()
Dkexgexc.c124 (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || in input_kex_dh_gex_group()
131 BN_print_fp(stderr, kex->dh->pub_key); in input_kex_dh_gex_group()
232 kex->dh->pub_key, in input_kex_dh_gex_reply()
/external/boringssl/src/include/openssl/
Ddh.h186 OPENSSL_EXPORT int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key,
252 BIGNUM *pub_key; /* g^x mod p */ member
Decdh.h89 void *out, size_t outlen, const EC_POINT *pub_key, const EC_KEY *priv_key,
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/netscape/
DNetscapeCertRequest.java131 PublicKey pub_key) throws NoSuchAlgorithmException, in NetscapeCertRequest() argument
137 pubkey = pub_key; in NetscapeCertRequest()
/external/curl/lib/vtls/
Dopenssl.c2606 const BIGNUM *pub_key; in get_cert_chain() local
2609 DSA_get0_key(dsa, &pub_key, &priv_key); in get_cert_chain()
2615 print_pubkey_BN(dsa, pub_key, i); in get_cert_chain()
2622 print_pubkey_BN(dsa, pub_key, i); in get_cert_chain()
2640 const BIGNUM *pub_key; in get_cert_chain() local
2642 DH_get0_key(dh, &pub_key, &priv_key); in get_cert_chain()
2647 print_pubkey_BN(dh, pub_key, i); in get_cert_chain()
2653 print_pubkey_BN(dh, pub_key, i); in get_cert_chain()

12