Home
last modified time | relevance | path

Searched refs:pubkey (Results 1 – 25 of 173) sorted by relevance

1234567

/external/vboot_reference/futility/
Dcmd_vbutil_key.c73 VbPublicKey *pubkey; in Pack() local
81 pubkey = PublicKeyReadKeyb(infile, algorithm, version); in Pack()
82 if (pubkey) { in Pack()
83 if (0 != PublicKeyWrite(outfile, pubkey)) { in Pack()
87 free(pubkey); in Pack()
108 VbPublicKey *pubkey; in Unpack() local
116 pubkey = PublicKeyRead(infile); in Unpack()
117 if (pubkey) { in Unpack()
119 printf("Algorithm: %" PRIu64 " %s\n", pubkey->algorithm, in Unpack()
120 (pubkey->algorithm < kNumAlgorithms ? in Unpack()
[all …]
Dcmd_create.c80 VbPublicKey *pubkey = 0; in vb1_make_keypair() local
136 pubkey = PublicKeyAlloc(keyb_size, vb1_algorithm, opt_version); in vb1_make_keypair()
137 if (!pubkey) in vb1_make_keypair()
139 memcpy(GetPublicKeyData(pubkey), keyb_data, keyb_size); in vb1_make_keypair()
143 if (0 != PublicKeyWrite(outfile, pubkey)) { in vb1_make_keypair()
153 free(pubkey); in vb1_make_keypair()
162 struct vb2_public_key *pubkey = 0; in vb2_make_keypair() local
216 if (vb2_public_key_alloc(&pubkey, sig_alg)) { in vb2_make_keypair()
231 pubkey_buf = vb2_public_key_packed_data(pubkey); in vb2_make_keypair()
235 if (vb2_unpack_key_data(pubkey, pubkey_buf, keyb_size)) { in vb2_make_keypair()
[all …]
Dcmd_show.c47 static void show_key(VbPublicKey *pubkey, const char *sp) in show_key() argument
49 printf("%sAlgorithm: %" PRIu64 " %s\n", sp, pubkey->algorithm, in show_key()
50 (pubkey->algorithm < kNumAlgorithms ? in show_key()
51 algo_strings[pubkey->algorithm] : "(invalid)")); in show_key()
52 printf("%sKey Version: %" PRIu64 "\n", sp, pubkey->key_version); in show_key()
54 PrintPubKeySha1Sum(pubkey); in show_key()
94 VbPublicKey *pubkey = (VbPublicKey *)state->my_area->buf; in futil_cb_show_pubkey() local
96 if (!PublicKeyLooksOkay(pubkey, state->my_area->len)) { in futil_cb_show_pubkey()
102 show_key(pubkey, " "); in futil_cb_show_pubkey()
131 VbPublicKey *pubkey; in futil_cb_show_gbb() local
[all …]
/external/scapy/scapy/layers/tls/
Dkeyexchange_tls13.py45 self.pubkey = None
67 pubkey = privkey.public_key()
68 self.key_exchange = pubkey.public_numbers().y
74 pubkey = privkey.public_key()
75 self.key_exchange = pubkey.public_bytes()
80 pubkey = privkey.public_key()
81 self.key_exchange = pubkey.public_numbers().encode_point()
106 self.pubkey = public_numbers.public_key(default_backend())
111 self.pubkey = import_point(self.key_exchange)
116 self.pubkey = public_numbers.public_key(default_backend())
[all …]
Dcert.py209 pubkey = spki.subjectPublicKey
210 if isinstance(pubkey, RSAPublicKey):
212 obj.import_from_asn1pkt(pubkey)
213 elif isinstance(pubkey, ECDSAPublicKey):
224 pubkey = RSAPublicKey(obj.der)
226 obj.import_from_asn1pkt(pubkey)
265 self.pubkey = private_key.public_key()
271 self.pubkey = pubNum.public_key(default_backend())
273 pubNum = self.pubkey.public_numbers()
287 self.pem = self.pubkey.public_bytes(
[all …]
/external/conscrypt/common/src/main/java/org/conscrypt/
DChainStrengthAnalyzer.java76 Object pubkey = cert.getPublicKey(); in checkKeyLength() local
77 if (pubkey instanceof RSAPublicKey) { in checkKeyLength()
78 int modulusLength = ((RSAPublicKey) pubkey).getModulus().bitLength(); in checkKeyLength()
83 } else if (pubkey instanceof ECPublicKey) { in checkKeyLength()
85 ((ECPublicKey) pubkey).getParams().getCurve().getField().getFieldSize(); in checkKeyLength()
90 } else if (pubkey instanceof DSAPublicKey) { in checkKeyLength()
91 int pLength = ((DSAPublicKey) pubkey).getParams().getP().bitLength(); in checkKeyLength()
92 int qLength = ((DSAPublicKey) pubkey).getParams().getQ().bitLength(); in checkKeyLength()
100 … throw new CertificateException("Rejecting unknown key class " + pubkey.getClass().getName()); in checkKeyLength()
/external/conscrypt/repackaged/common/src/main/java/com/android/org/conscrypt/
DChainStrengthAnalyzer.java78 Object pubkey = cert.getPublicKey(); in checkKeyLength() local
79 if (pubkey instanceof RSAPublicKey) { in checkKeyLength()
80 int modulusLength = ((RSAPublicKey) pubkey).getModulus().bitLength(); in checkKeyLength()
85 } else if (pubkey instanceof ECPublicKey) { in checkKeyLength()
87 ((ECPublicKey) pubkey).getParams().getCurve().getField().getFieldSize(); in checkKeyLength()
92 } else if (pubkey instanceof DSAPublicKey) { in checkKeyLength()
93 int pLength = ((DSAPublicKey) pubkey).getParams().getP().bitLength(); in checkKeyLength()
94 int qLength = ((DSAPublicKey) pubkey).getParams().getQ().bitLength(); in checkKeyLength()
102 … throw new CertificateException("Rejecting unknown key class " + pubkey.getClass().getName()); in checkKeyLength()
/external/openssh/regress/
Dsshsig.sh48 pubkey=${OBJ}/${keybase}.pub
53 (printf "$sig_principal " ; cat $pubkey) > $OBJ/allowed_signers
60 cat $pubkey) > $OBJ/allowed_signers
67 (printf "$sig_principal octopus " ; cat $pubkey) > $OBJ/allowed_signers
81 (printf "$sig_principal " ; cat $pubkey) > $OBJ/allowed_signers
88 (printf "josef.k@example.com " ; cat $pubkey) > $OBJ/allowed_signers
95 (printf "$sig_principal " ; cat $pubkey) > $OBJ/allowed_signers
103 cat $pubkey) > $OBJ/allowed_signers
110 cat $pubkey > $OBJ/revoked_keys
112 cat $pubkey) > $OBJ/allowed_signers
[all …]
/external/wpa_supplicant_8/src/crypto/
Dcrypto_internal-modexp.c17 u8 *pubkey) in crypto_dh_init() argument
30 pubkey, &pubkey_len) < 0) in crypto_dh_init()
34 os_memmove(pubkey + pad, pubkey, pubkey_len); in crypto_dh_init()
35 os_memset(pubkey, 0, pad); in crypto_dh_init()
45 const u8 *pubkey, size_t pubkey_len, in crypto_dh_derive_secret() argument
53 os_memcmp(pubkey, prime, prime_len) >= 0)) in crypto_dh_derive_secret()
57 if (!pub || bignum_set_unsigned_bin(pub, pubkey, pubkey_len) < 0 || in crypto_dh_derive_secret()
81 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len, in crypto_dh_derive_secret()
/external/iperf3/src/
Dt_auth.c47 int test_authtoken(const char *authUser, const char *authPassword, EVP_PKEY *pubkey, EVP_PKEY *priv…
84 EVP_PKEY *pubkey, *privkey; in main() local
85 pubkey = load_pubkey_from_file(pubkeyfile); in main()
86 assert(pubkey); 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
106 assert(encode_auth_setting(authUser, authPassword, pubkey, &authToken) == 0); in test_authtoken()
/external/wpa_supplicant_8/src/wps/
Dwps_attr_build.c23 struct wpabuf *pubkey = NULL; in wps_build_public_key() local
39 pubkey = wpabuf_dup(wps->wps->dh_pubkey); in wps_build_public_key()
62 pubkey = wpabuf_dup(wps->wps->ap_nfc_dh_pubkey); in wps_build_public_key()
63 if (wps->dh_privkey && pubkey) in wps_build_public_key()
64 wps->dh_ctx = dh5_init_fixed(wps->dh_privkey, pubkey); in wps_build_public_key()
69 wps->dh_ctx = dh5_init(&wps->dh_privkey, &pubkey); in wps_build_public_key()
70 pubkey = wpabuf_zeropad(pubkey, 192); in wps_build_public_key()
72 if (wps->dh_ctx == NULL || wps->dh_privkey == NULL || pubkey == NULL) { in wps_build_public_key()
75 wpabuf_free(pubkey); in wps_build_public_key()
79 wpa_hexdump_buf(MSG_DEBUG, "WPS: DH own Public Key", pubkey); in wps_build_public_key()
[all …]
Dwps_common.c64 struct wpabuf *pubkey, *dh_shared; in wps_derive_keys() local
75 pubkey = wps->registrar ? wps->dh_pubkey_e : wps->dh_pubkey_r; in wps_derive_keys()
76 if (pubkey == NULL) { in wps_derive_keys()
82 wpa_hexdump_buf(MSG_DEBUG, "WPS: DH peer Public Key", pubkey); in wps_derive_keys()
83 dh_shared = dh5_derive_shared(wps->dh_ctx, pubkey, wps->dh_privkey); in wps_derive_keys()
413 const struct wpabuf *pubkey, in wps_build_nfc_pw_token() argument
422 if (wps_build_oob_dev_pw(data, dev_pw_id, pubkey, in wps_build_nfc_pw_token()
624 struct wpabuf * wps_nfc_token_build(int ndef, int id, struct wpabuf *pubkey, in wps_nfc_token_build() argument
629 if (pubkey == NULL || dev_pw == NULL) in wps_nfc_token_build()
632 ret = wps_build_nfc_pw_token(id, pubkey, dev_pw); in wps_nfc_token_build()
[all …]
/external/python/oauth2client/oauth2client/
D_pycrypto_crypt.py27 def __init__(self, pubkey): argument
34 self._pubkey = pubkey
72 pubkey = RSA.importKey(tbsSeq[6])
74 pubkey = RSA.importKey(key_pem)
75 return PyCryptoVerifier(pubkey)
D_openssl_crypt.py24 def __init__(self, pubkey): argument
30 self._pubkey = pubkey
70 pubkey = crypto.load_certificate(crypto.FILETYPE_PEM, key_pem)
72 pubkey = crypto.load_privatekey(crypto.FILETYPE_PEM, key_pem)
73 return OpenSSLVerifier(pubkey)
D_pure_python_crypt.py72 def __init__(self, pubkey): argument
73 self._pubkey = pubkey
122 pubkey = rsa.PublicKey.load_pkcs1(key_bytes, 'DER')
124 pubkey = rsa.PublicKey.load_pkcs1(key_pem, 'PEM')
125 return cls(pubkey)
/external/rust/crates/quiche/deps/boringssl/src/crypto/x509/
Dx509_r2x.c70 EVP_PKEY *pubkey = NULL; in X509_REQ_to_X509() local
104 pubkey = X509_REQ_get_pubkey(r); in X509_REQ_to_X509()
105 res = X509_set_pubkey(ret, pubkey); in X509_REQ_to_X509()
106 EVP_PKEY_free(pubkey); in X509_REQ_to_X509()
/external/boringssl/src/crypto/x509/
Dx509_r2x.c70 EVP_PKEY *pubkey = NULL; in X509_REQ_to_X509() local
104 pubkey = X509_REQ_get_pubkey(r); in X509_REQ_to_X509()
105 res = X509_set_pubkey(ret, pubkey); in X509_REQ_to_X509()
106 EVP_PKEY_free(pubkey); in X509_REQ_to_X509()
/external/vboot_reference/utility/
DdumpRSAPublicKey.c140 RSA* pubkey = NULL; in main() local
175 if (!(pubkey = EVP_PKEY_get1_RSA(key))) { in main()
181 if (!(pubkey = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL))) { in main()
187 if (check(pubkey)) { in main()
188 output(pubkey); in main()
193 RSA_free(pubkey); in main()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/netscape/
DNetscapeCertRequest.java53 PublicKey pubkey ; field in NetscapeCertRequest
118 pubkey = KeyFactory.getInstance(keyAlg.getAlgorithm().getId()) in NetscapeCertRequest()
137 pubkey = pub_key; in NetscapeCertRequest()
186 return pubkey; in getPublicKey()
191 pubkey = value; in setPublicKey()
207 sig.initVerify(pubkey); in verify()
262 baos.write(pubkey.getEncoded()); in getKeySpec()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jce/netscape/
DNetscapeCertRequest.java55 PublicKey pubkey ; field in NetscapeCertRequest
120 pubkey = KeyFactory.getInstance(keyAlg.getAlgorithm().getId()) in NetscapeCertRequest()
139 pubkey = pub_key; in NetscapeCertRequest()
188 return pubkey; in getPublicKey()
193 pubkey = value; in setPublicKey()
209 sig.initVerify(pubkey); in verify()
264 baos.write(pubkey.getEncoded()); in getKeySpec()
/external/rust/crates/quiche/deps/boringssl/src/ssl/
Dssl_cert.cc234 UniquePtr<EVP_PKEY> pubkey = ssl_cert_parse_pubkey(&cert_cbs); in check_leaf_cert_and_privkey() local
235 if (!pubkey) { in check_leaf_cert_and_privkey()
240 if (!ssl_is_key_type_supported(pubkey->type)) { in check_leaf_cert_and_privkey()
247 if (pubkey->type == EVP_PKEY_EC && in check_leaf_cert_and_privkey()
255 !ssl_compare_public_and_private_key(pubkey.get(), privkey)) { in check_leaf_cert_and_privkey()
372 UniquePtr<EVP_PKEY> pubkey; in ssl_parse_cert_chain() local
383 pubkey = ssl_cert_parse_pubkey(&certificate); in ssl_parse_cert_chain()
384 if (!pubkey) { in ssl_parse_cert_chain()
406 *out_pubkey = std::move(pubkey); in ssl_parse_cert_chain()
492 bool ssl_compare_public_and_private_key(const EVP_PKEY *pubkey, in ssl_compare_public_and_private_key() argument
[all …]
/external/boringssl/src/ssl/
Dssl_cert.cc234 UniquePtr<EVP_PKEY> pubkey = ssl_cert_parse_pubkey(&cert_cbs); in check_leaf_cert_and_privkey() local
235 if (!pubkey) { in check_leaf_cert_and_privkey()
240 if (!ssl_is_key_type_supported(pubkey->type)) { in check_leaf_cert_and_privkey()
247 if (pubkey->type == EVP_PKEY_EC && in check_leaf_cert_and_privkey()
255 !ssl_compare_public_and_private_key(pubkey.get(), privkey)) { in check_leaf_cert_and_privkey()
372 UniquePtr<EVP_PKEY> pubkey; in ssl_parse_cert_chain() local
383 pubkey = ssl_cert_parse_pubkey(&certificate); in ssl_parse_cert_chain()
384 if (!pubkey) { in ssl_parse_cert_chain()
406 *out_pubkey = std::move(pubkey); in ssl_parse_cert_chain()
492 bool ssl_compare_public_and_private_key(const EVP_PKEY *pubkey, in ssl_compare_public_and_private_key() argument
[all …]
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/jce/netscape/
DNetscapeCertRequest.java55 PublicKey pubkey ; field in NetscapeCertRequest
120 pubkey = KeyFactory.getInstance(keyAlg.getAlgorithm().getId()) in NetscapeCertRequest()
139 pubkey = pub_key; in NetscapeCertRequest()
188 return pubkey; in getPublicKey()
193 pubkey = value; in setPublicKey()
209 sig.initVerify(pubkey); in verify()
264 baos.write(pubkey.getEncoded()); in getKeySpec()
/external/rust/crates/quiche/deps/boringssl/src/crypto/evp/
Devp_extra_test.cc572 bssl::UniquePtr<EVP_PKEY> pubkey(EVP_PKEY_new_raw_public_key( in TEST() local
574 ASSERT_TRUE(pubkey); in TEST()
575 EXPECT_EQ(EVP_PKEY_ED25519, EVP_PKEY_id(pubkey.get())); in TEST()
580 ASSERT_TRUE(EVP_PKEY_get_raw_public_key(pubkey.get(), nullptr, &len)); in TEST()
582 ASSERT_TRUE(EVP_PKEY_get_raw_public_key(pubkey.get(), buf, &len)); in TEST()
587 ASSERT_TRUE(EVP_PKEY_get_raw_public_key(pubkey.get(), buf, &len)); in TEST()
591 EXPECT_FALSE(EVP_PKEY_get_raw_public_key(pubkey.get(), buf, &len)); in TEST()
598 EXPECT_FALSE(EVP_PKEY_get_raw_private_key(pubkey.get(), nullptr, &len)); in TEST()
609 ASSERT_TRUE(EVP_marshal_public_key(cbb.get(), pubkey.get())); in TEST()
616 EXPECT_FALSE(EVP_marshal_private_key(cbb.get(), pubkey.get())); in TEST()
[all …]
/external/boringssl/src/crypto/evp/
Devp_extra_test.cc572 bssl::UniquePtr<EVP_PKEY> pubkey(EVP_PKEY_new_raw_public_key( in TEST() local
574 ASSERT_TRUE(pubkey); in TEST()
575 EXPECT_EQ(EVP_PKEY_ED25519, EVP_PKEY_id(pubkey.get())); in TEST()
580 ASSERT_TRUE(EVP_PKEY_get_raw_public_key(pubkey.get(), nullptr, &len)); in TEST()
582 ASSERT_TRUE(EVP_PKEY_get_raw_public_key(pubkey.get(), buf, &len)); in TEST()
587 ASSERT_TRUE(EVP_PKEY_get_raw_public_key(pubkey.get(), buf, &len)); in TEST()
591 EXPECT_FALSE(EVP_PKEY_get_raw_public_key(pubkey.get(), buf, &len)); in TEST()
598 EXPECT_FALSE(EVP_PKEY_get_raw_private_key(pubkey.get(), nullptr, &len)); in TEST()
609 ASSERT_TRUE(EVP_marshal_public_key(cbb.get(), pubkey.get())); in TEST()
616 EXPECT_FALSE(EVP_marshal_private_key(cbb.get(), pubkey.get())); in TEST()
[all …]

1234567