Home
last modified time | relevance | path

Searched refs:privkey (Results 1 – 25 of 87) sorted by relevance

1234

/external/vboot_reference/futility/
Dcmd_vbutil_key.c74 VbPrivateKey *privkey; in Pack() local
91 privkey = PrivateKeyReadPem(infile, algorithm); in Pack()
92 if (privkey) { in Pack()
93 if (0 != PrivateKeyWrite(outfile, privkey)) { in Pack()
97 free(privkey); in Pack()
109 VbPrivateKey *privkey; in Unpack() local
138 privkey = PrivateKeyRead(infile); in Unpack()
139 if (privkey) { in Unpack()
142 privkey->algorithm, in Unpack()
143 (privkey->algorithm < in Unpack()
[all …]
Dcmd_create.c79 VbPrivateKey *privkey = 0; in vb1_make_keypair() local
114 privkey = (VbPrivateKey *)malloc(sizeof(VbPrivateKey)); in vb1_make_keypair()
115 if (!privkey) in vb1_make_keypair()
118 privkey->rsa_private_key = rsa_key; in vb1_make_keypair()
119 privkey->algorithm = vb1_algorithm; in vb1_make_keypair()
123 if (0 != PrivateKeyWrite(outfile, privkey)) { in vb1_make_keypair()
152 free(privkey); in vb1_make_keypair()
161 struct vb2_private_key *privkey = 0; in vb2_make_keypair() local
193 privkey = calloc(1, sizeof(*privkey)); in vb2_make_keypair()
194 if (!privkey) { in vb2_make_keypair()
[all …]
/external/scapy/scapy/layers/tls/
Dkeyexchange_tls13.py44 self.privkey = None
65 privkey = params.generate_private_key()
66 self.privkey = privkey
67 pubkey = privkey.public_key()
72 privkey = x25519.X25519PrivateKey.generate()
73 self.privkey = privkey
74 pubkey = privkey.public_key()
78 privkey = ec.generate_private_key(curve, default_backend())
79 self.privkey = privkey
80 pubkey = privkey.public_key()
[all …]
Dcert.py363 privkey = RSAPrivateKey_OpenSSL(obj.der)
364 privkey = privkey.privateKey
369 privkey = ECDSAPrivateKey_OpenSSL(obj.der)
370 privkey = privkey.privateKey
376 privkey = RSAPrivateKey(obj.der)
381 privkey = ECDSAPrivateKey(obj.der)
387 obj.import_from_asn1pkt(privkey)
394 obj.pem = der2pem(raw(privkey), marker)
480 def import_from_asn1pkt(self, privkey): argument
481 modulus = privkey.modulus.val
[all …]
/external/iperf3/src/
Dt_auth.c47 …est_authtoken(const char *authUser, const char *authPassword, EVP_PKEY *pubkey, EVP_PKEY *privkey);
84 EVP_PKEY *pubkey, *privkey; in main() local
87 privkey = load_privkey_from_file(privkeyfile); in main()
88 assert(privkey); in main()
91 assert(test_authtoken("kilroy", "fubar", pubkey, privkey) == 0); in main()
100 test_authtoken(const char *authUser, const char *authPassword, EVP_PKEY *pubkey, EVP_PKEY *privkey)… in test_authtoken() argument
107 …assert(decode_auth_setting(0, authToken, privkey, &decodeUser, &decodePassword, &decodeTime) == 0); in test_authtoken()
/external/wpa_supplicant_8/src/crypto/
Dcrypto_internal-modexp.c16 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, in crypto_dh_init() argument
21 if (os_get_random(privkey, prime_len) < 0) in crypto_dh_init()
23 if (os_memcmp(privkey, prime, prime_len) > 0) { in crypto_dh_init()
25 privkey[0] = 0; in crypto_dh_init()
29 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len, in crypto_dh_init()
44 const u8 *privkey, size_t privkey_len, in crypto_dh_derive_secret() argument
81 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len, in crypto_dh_derive_secret()
Dcrypto_nettle.c307 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, in crypto_dh_init() argument
312 if (os_get_random(privkey, prime_len) < 0) in crypto_dh_init()
314 if (os_memcmp(privkey, prime, prime_len) > 0) { in crypto_dh_init()
316 privkey[0] = 0; in crypto_dh_init()
320 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len, in crypto_dh_init()
335 const u8 *privkey, size_t privkey_len, in crypto_dh_derive_secret() argument
367 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len, in crypto_dh_derive_secret()
Dcrypto_gnutls.c286 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, in crypto_dh_init() argument
291 if (os_get_random(privkey, prime_len) < 0) in crypto_dh_init()
293 if (os_memcmp(privkey, prime, prime_len) > 0) { in crypto_dh_init()
295 privkey[0] = 0; in crypto_dh_init()
299 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len, in crypto_dh_init()
314 const u8 *privkey, size_t privkey_len, in crypto_dh_derive_secret() argument
353 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len, in crypto_dh_derive_secret()
Dcrypto_libtomcrypt.c700 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, in crypto_dh_init() argument
705 if (os_get_random(privkey, prime_len) < 0) in crypto_dh_init()
707 if (os_memcmp(privkey, prime, prime_len) > 0) { in crypto_dh_init()
709 privkey[0] = 0; in crypto_dh_init()
713 if (crypto_mod_exp(&generator, 1, privkey, prime_len, prime, prime_len, in crypto_dh_init()
728 const u8 *privkey, size_t privkey_len, in crypto_dh_derive_secret() argument
733 return crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len, in crypto_dh_derive_secret()
Dcrypto_wolfssl.c675 struct wpabuf *privkey = NULL; in dh5_init() local
693 privkey = wpabuf_alloc(RFC3526_LEN); in dh5_init()
695 if (!privkey || !pubkey) in dh5_init()
704 if (wc_DhGenerateKeyPair(dh, &rng, wpabuf_mhead(privkey), &priv_sz, in dh5_init()
708 wpabuf_put(privkey, priv_sz); in dh5_init()
712 *priv = privkey; in dh5_init()
715 privkey = NULL; in dh5_init()
719 wpabuf_clear_free(privkey); in dh5_init()
813 int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, in crypto_dh_init() argument
838 if (wc_DhGenerateKeyPair(dh, &rng, privkey, &priv_sz, pubkey, &pub_sz) in crypto_dh_init()
[all …]
/external/cronet/third_party/boringssl/src/ssl/
Dssl_cert.cc231 CRYPTO_BUFFER *leaf_buffer, EVP_PKEY *privkey) { in check_leaf_cert_and_privkey() argument
253 if (privkey != NULL && in check_leaf_cert_and_privkey()
255 !ssl_compare_public_and_private_key(pubkey.get(), privkey)) { in check_leaf_cert_and_privkey()
265 EVP_PKEY *privkey, const SSL_PRIVATE_KEY_METHOD *privkey_method) { in cert_set_chain_and_key() argument
267 (privkey == NULL && privkey_method == NULL)) { in cert_set_chain_and_key()
272 if (privkey != NULL && privkey_method != NULL) { in cert_set_chain_and_key()
277 switch (check_leaf_cert_and_privkey(certs[0], privkey)) { in cert_set_chain_and_key()
298 cert->privatekey = UpRef(privkey); in cert_set_chain_and_key()
491 const EVP_PKEY *privkey) { in ssl_compare_public_and_private_key() argument
492 if (EVP_PKEY_is_opaque(privkey)) { in ssl_compare_public_and_private_key()
[all …]
/external/rust/crates/quiche/deps/boringssl/src/ssl/
Dssl_cert.cc231 CRYPTO_BUFFER *leaf_buffer, EVP_PKEY *privkey) { in check_leaf_cert_and_privkey() argument
253 if (privkey != NULL && in check_leaf_cert_and_privkey()
255 !ssl_compare_public_and_private_key(pubkey.get(), privkey)) { in check_leaf_cert_and_privkey()
265 EVP_PKEY *privkey, const SSL_PRIVATE_KEY_METHOD *privkey_method) { in cert_set_chain_and_key() argument
267 (privkey == NULL && privkey_method == NULL)) { in cert_set_chain_and_key()
272 if (privkey != NULL && privkey_method != NULL) { in cert_set_chain_and_key()
277 switch (check_leaf_cert_and_privkey(certs[0], privkey)) { in cert_set_chain_and_key()
298 cert->privatekey = UpRef(privkey); in cert_set_chain_and_key()
493 const EVP_PKEY *privkey) { in ssl_compare_public_and_private_key() argument
494 if (EVP_PKEY_is_opaque(privkey)) { in ssl_compare_public_and_private_key()
[all …]
/external/boringssl/src/ssl/
Dssl_cert.cc231 CRYPTO_BUFFER *leaf_buffer, EVP_PKEY *privkey) { in check_leaf_cert_and_privkey() argument
253 if (privkey != NULL && in check_leaf_cert_and_privkey()
255 !ssl_compare_public_and_private_key(pubkey.get(), privkey)) { in check_leaf_cert_and_privkey()
265 EVP_PKEY *privkey, const SSL_PRIVATE_KEY_METHOD *privkey_method) { in cert_set_chain_and_key() argument
267 (privkey == NULL && privkey_method == NULL)) { in cert_set_chain_and_key()
272 if (privkey != NULL && privkey_method != NULL) { in cert_set_chain_and_key()
277 switch (check_leaf_cert_and_privkey(certs[0], privkey)) { in cert_set_chain_and_key()
298 cert->privatekey = UpRef(privkey); in cert_set_chain_and_key()
491 const EVP_PKEY *privkey) { in ssl_compare_public_and_private_key() argument
492 if (EVP_PKEY_is_opaque(privkey)) { in ssl_compare_public_and_private_key()
[all …]
/external/rust/crates/quiche/deps/boringssl/src/crypto/evp/
Devp_extra_test.cc624 bssl::UniquePtr<EVP_PKEY> privkey(EVP_PKEY_new_raw_private_key( in TEST() local
626 ASSERT_TRUE(privkey); in TEST()
627 EXPECT_EQ(EVP_PKEY_ED25519, EVP_PKEY_id(privkey.get())); in TEST()
630 ASSERT_TRUE(EVP_PKEY_get_raw_private_key(privkey.get(), nullptr, &len)); in TEST()
632 ASSERT_TRUE(EVP_PKEY_get_raw_private_key(privkey.get(), buf, &len)); in TEST()
637 ASSERT_TRUE(EVP_PKEY_get_raw_private_key(privkey.get(), buf, &len)); in TEST()
641 EXPECT_FALSE(EVP_PKEY_get_raw_private_key(privkey.get(), buf, &len)); in TEST()
648 ASSERT_TRUE(EVP_PKEY_get_raw_public_key(privkey.get(), buf, &len)); in TEST()
653 ASSERT_TRUE(EVP_marshal_public_key(cbb.get(), privkey.get())); in TEST()
660 ASSERT_TRUE(EVP_marshal_private_key(cbb.get(), privkey.get())); in TEST()
[all …]
/external/cronet/third_party/boringssl/src/crypto/evp/
Devp_extra_test.cc925 bssl::UniquePtr<EVP_PKEY> privkey(EVP_PKEY_new_raw_private_key( in TEST() local
927 ASSERT_TRUE(privkey); in TEST()
928 EXPECT_EQ(EVP_PKEY_ED25519, EVP_PKEY_id(privkey.get())); in TEST()
931 ASSERT_TRUE(EVP_PKEY_get_raw_private_key(privkey.get(), nullptr, &len)); in TEST()
933 ASSERT_TRUE(EVP_PKEY_get_raw_private_key(privkey.get(), buf, &len)); in TEST()
938 ASSERT_TRUE(EVP_PKEY_get_raw_private_key(privkey.get(), buf, &len)); in TEST()
942 EXPECT_FALSE(EVP_PKEY_get_raw_private_key(privkey.get(), buf, &len)); in TEST()
949 ASSERT_TRUE(EVP_PKEY_get_raw_public_key(privkey.get(), buf, &len)); in TEST()
954 ASSERT_TRUE(EVP_marshal_public_key(cbb.get(), privkey.get())); in TEST()
961 ASSERT_TRUE(EVP_marshal_private_key(cbb.get(), privkey.get())); in TEST()
[all …]
/external/boringssl/src/crypto/evp/
Devp_extra_test.cc925 bssl::UniquePtr<EVP_PKEY> privkey(EVP_PKEY_new_raw_private_key( in TEST() local
927 ASSERT_TRUE(privkey); in TEST()
928 EXPECT_EQ(EVP_PKEY_ED25519, EVP_PKEY_id(privkey.get())); in TEST()
931 ASSERT_TRUE(EVP_PKEY_get_raw_private_key(privkey.get(), nullptr, &len)); in TEST()
933 ASSERT_TRUE(EVP_PKEY_get_raw_private_key(privkey.get(), buf, &len)); in TEST()
938 ASSERT_TRUE(EVP_PKEY_get_raw_private_key(privkey.get(), buf, &len)); in TEST()
942 EXPECT_FALSE(EVP_PKEY_get_raw_private_key(privkey.get(), buf, &len)); in TEST()
949 ASSERT_TRUE(EVP_PKEY_get_raw_public_key(privkey.get(), buf, &len)); in TEST()
954 ASSERT_TRUE(EVP_marshal_public_key(cbb.get(), privkey.get())); in TEST()
961 ASSERT_TRUE(EVP_marshal_private_key(cbb.get(), privkey.get())); in TEST()
[all …]
/external/mbedtls/tests/suites/
Dtest_suite_ecp.data389 ECP check privkey #1 (short weierstrass, too small)
393 ECP check privkey #2 (short weierstrass, smallest)
397 ECP check privkey #3 (short weierstrass, biggest)
401 ECP check privkey #4 (short weierstrass, too big)
405 ECP check privkey #5 (montgomery curve25519, too big)
409 ECP check privkey #6 (montgomery curve25519, not big enough)
413 ECP check privkey #7 (montgomery curve25519, msb OK)
417 ECP check privkey #8 (montgomery curve25519, msb not OK)
421 ECP check privkey #9 (montgomery curve25519, bit 0 set)
425 ECP check privkey #10 (montgomery curve25519, bit 1 set)
[all …]
/external/ipsec-tools/src/racoon/
Dprivsep.c340 vchar_t *privkey; in privsep_init() local
356 if ((privkey = eay_get_pkcs1privkey(bufs[0])) == NULL){ in privsep_init()
361 reply->bufs.buflen[0] = privkey->l; in privsep_init()
362 reply->hdr.ac_len = sizeof(*reply) + privkey->l; in privsep_init()
371 memcpy(reply + 1, privkey->v, privkey->l); in privsep_init()
372 vfree(privkey); in privsep_init()
706 vchar_t *privkey; local
736 if ((privkey = vmalloc(len - sizeof(*msg))) == NULL)
739 memcpy(privkey->v, msg + 1, privkey->l);
741 return privkey;
/external/cronet/net/third_party/quiche/src/quiche/quic/core/crypto/
Dtls_client_connection.cc36 const std::vector<CRYPTO_BUFFER*>& cert_chain, EVP_PKEY* privkey) { in SetCertChain() argument
37 SSL_set_chain_and_key(ssl(), cert_chain.data(), cert_chain.size(), privkey, in SetCertChain()
/external/python/rsa/tests/
Dtest_load_save_keys.py190 privkey = rsa.key.PrivateKey.load_pkcs1(keydata)
192 self.assertEqual(15945948582725241569, privkey.p)
193 self.assertEqual(14617195220284816877, privkey.q)
/external/cronet/crypto/
Dec_private_key_unittest.cc47 std::vector<uint8_t> privkey; in TEST() local
48 EXPECT_TRUE(keypair->ExportPrivateKey(&privkey)); in TEST()
50 crypto::ECPrivateKey::CreateFromPrivateKeyInfo(privkey); in TEST()
Drsa_private_key_unittest.cc363 std::vector<uint8_t> privkey; in TEST() local
365 ASSERT_TRUE(key_pair->ExportPrivateKey(&privkey)); in TEST()
373 ASSERT_EQ(privkey, privkey_copy); in TEST()
/external/libchrome/crypto/
Drsa_private_key_unittest.cc363 std::vector<uint8_t> privkey; in TEST() local
365 ASSERT_TRUE(key_pair->ExportPrivateKey(&privkey)); in TEST()
373 ASSERT_EQ(privkey, privkey_copy); in TEST()
/external/openscreen/util/crypto/
Drsa_private_key_unittest.cc364 ErrorOr<std::vector<uint8_t>> privkey = key_pair.ExportPrivateKey(); in TEST() local
366 ASSERT_TRUE(privkey.is_value()); in TEST()
376 ASSERT_EQ(privkey, privkey_copy); in TEST()
/external/openthread/third_party/mbedtls/repo/tests/suites/
Dtest_suite_ecp.data316 ECP check privkey #1 (short weierstrass, too small)
320 ECP check privkey #2 (short weierstrass, smallest)
324 ECP check privkey #3 (short weierstrass, biggest)
328 ECP check privkey #4 (short weierstrass, too big)
332 ECP check privkey #5 (montgomery, too big)
336 ECP check privkey #6 (montgomery, not big enough)
340 ECP check privkey #7 (montgomery, msb OK)
344 ECP check privkey #8 (montgomery, bit 0 set)
348 ECP check privkey #9 (montgomery, bit 1 set)
352 ECP check privkey #10 (montgomery, bit 2 set)
[all …]

1234