/external/vboot_reference/futility/ |
D | cmd_vbutil_key.c | 74 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 …]
|
D | cmd_create.c | 79 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/ |
D | keyexchange_tls13.py | 44 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 …]
|
D | cert.py | 363 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/ |
D | t_auth.c | 47 …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/ |
D | crypto_internal-modexp.c | 16 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()
|
D | crypto_nettle.c | 307 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()
|
D | crypto_gnutls.c | 286 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()
|
D | crypto_libtomcrypt.c | 700 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()
|
D | crypto_wolfssl.c | 675 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/ |
D | ssl_cert.cc | 231 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/ |
D | ssl_cert.cc | 231 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/ |
D | ssl_cert.cc | 231 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/ |
D | evp_extra_test.cc | 624 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/ |
D | evp_extra_test.cc | 925 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/ |
D | evp_extra_test.cc | 925 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/ |
D | test_suite_ecp.data | 389 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/ |
D | privsep.c | 340 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/ |
D | tls_client_connection.cc | 36 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/ |
D | test_load_save_keys.py | 190 privkey = rsa.key.PrivateKey.load_pkcs1(keydata) 192 self.assertEqual(15945948582725241569, privkey.p) 193 self.assertEqual(14617195220284816877, privkey.q)
|
/external/cronet/crypto/ |
D | ec_private_key_unittest.cc | 47 std::vector<uint8_t> privkey; in TEST() local 48 EXPECT_TRUE(keypair->ExportPrivateKey(&privkey)); in TEST() 50 crypto::ECPrivateKey::CreateFromPrivateKeyInfo(privkey); in TEST()
|
D | rsa_private_key_unittest.cc | 363 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/ |
D | rsa_private_key_unittest.cc | 363 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/ |
D | rsa_private_key_unittest.cc | 364 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/ |
D | test_suite_ecp.data | 316 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 …]
|