Home
last modified time | relevance | path

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

12

/system/authgraph/boringssl/src/
Dec.rs42 let (priv_key, pub_key) = create_p256_key_pair(iana::Algorithm::ECDH_ES_HKDF_256)?; in generate_key()
46 pub_key: EcExchangeKeyPub(pub_key), in generate_key()
76 .map(|(priv_key, pub_key)| (EcSignKey::P256(priv_key), EcVerifyKey::P256(pub_key))), in generate_key()
78 .map(|(priv_key, pub_key)| (EcSignKey::P384(priv_key), EcVerifyKey::P384(pub_key))), in generate_key()
79 iana::EllipticCurve::Ed25519 => create_ed25519_key_pair().map(|(priv_key, pub_key)| { in generate_key()
80 (EcSignKey::Ed25519(priv_key), EcVerifyKey::Ed25519(pub_key)) in generate_key()
229 let pub_key = coset::CoseKeyBuilder::new_ec2_pub_key(curve, x, y).algorithm(algorithm).build(); in create_nist_key_pair() localVariable
230 Ok((priv_key, pub_key)) in create_nist_key_pair()
240 let pub_key = coset::CoseKeyBuilder::new_okp_key() localVariable
245 Ok((priv_key, pub_key))
[all …]
Dtests.rs278 let (priv_key, mut pub_key) = crate::ec::create_p256_key_pair(iana::Algorithm::ES256).unwrap(); in test_get_identity_with_root_key_in_incorrect_canonical_form()
280 for param in pub_key.params { in test_get_identity_with_root_key_in_incorrect_canonical_form()
285 pub_key.params = test_params; in test_get_identity_with_root_key_in_incorrect_canonical_form()
286 pub_key.canonicalize(CborOrdering::LengthFirstLexicographic); in test_get_identity_with_root_key_in_incorrect_canonical_form()
291 root_key: EcVerifyKey::P256(pub_key), in test_get_identity_with_root_key_in_incorrect_canonical_form()
305 let (priv_key, mut pub_key) = crate::ec::create_p256_key_pair(iana::Algorithm::ES256).unwrap(); in test_get_identity_with_root_key_in_correct_canonical_form()
307 for param in pub_key.params { in test_get_identity_with_root_key_in_correct_canonical_form()
312 pub_key.params = test_params; in test_get_identity_with_root_key_in_correct_canonical_form()
313 pub_key.canonicalize(CborOrdering::Lexicographic); in test_get_identity_with_root_key_in_correct_canonical_form()
318 root_key: EcVerifyKey::P256(pub_key), in test_get_identity_with_root_key_in_correct_canonical_form()
Dtest_device.rs95 let (priv_key, mut pub_key) = crate::ec::create_p256_key_pair(iana::Algorithm::ES256)?; in get_identity()
96 pub_key.canonicalize(CborOrdering::Lexicographic); in get_identity()
101 root_key: EcVerifyKey::P256(pub_key), in get_identity()
/system/authgraph/hal/src/
Dlib.rs96 .pub_key in fromm()
97 .map(|pub_key| PubKey::PlainKey(PlainPubKey { plainPubKey: pub_key })), in fromm()
127 let pub_key = match aidl.pubKey { in try_fromm() localVariable
132 Ok(Self { pub_key, arc_from_pbk: aidl.arcFromPBK.map(|a| a.arc) }) in try_fromm()
Dservice.rs170 fn unsigned_pub_key(pub_key: &PubKey) -> binder::Result<Vec<u8>> { in unsigned_pub_key()
171 match pub_key { in unsigned_pub_key()
/system/hardware/interfaces/wifi/keystore/1.0/default/
Dwifikeystorehal_utils.h31 bssl::UniquePtr<EVP_PKEY> pub_key(X509_get_pubkey(decoded_cert.get())); in extractPubKey()
32 if (!pub_key) { in extractPubKey()
37 if (!pub_key_bio || i2d_PUBKEY_bio(pub_key_bio.get(), pub_key.get()) <= 0) { in extractPubKey()
Dkeystore.cpp197 std::optional<std::vector<uint8_t>> pub_key(extractPubKey(*response.metadata.certificate)); in keyStore2GetPubKey() local
198 return pub_key; in keyStore2GetPubKey()
/system/secretkeeper/client/src/
Dlib.rs224 &build_plain_pub_key(&source_init_info.ke_key.pub_key)?,
260 fn build_plain_pub_key(pub_key: &Option<Vec<u8>>) -> Result<PubKey, Error> { in build_plain_pub_key()
262 plainPubKey: pub_key.clone().ok_or(Error::UnexpectedItem("None", "Some bytes"))?, in build_plain_pub_key()
266 fn extract_plain_pub_key(pub_key: &Option<PubKey>) -> Result<&PlainPubKey, Error> { in extract_plain_pub_key()
267 match pub_key { in extract_plain_pub_key()
268 Some(PubKey::PlainKey(pub_key)) => Ok(pub_key), in extract_plain_pub_key()
/system/authgraph/tests/src/
Dlib.rs266 let secret12 = ecdh.compute_shared_secret(&key1.priv_key, &key2.pub_key).unwrap(); in test_ecdh()
267 let secret21 = ecdh.compute_shared_secret(&key2.priv_key, &key1.pub_key).unwrap(); in test_ecdh()
486 ke_key: Key { pub_key: peer_ke_pub_key, .. }, in test_key_exchange_init()
504 ke_key: Key { pub_key: p1_ke_pub_key, arc_from_pbk: p1_ke_priv_key_arc }, in test_key_exchange_finish()
513 ke_key: Key { pub_key: p2_ke_pub_key, .. }, in test_key_exchange_finish()
527 Key { pub_key: p1_ke_pub_key, arc_from_pbk: p1_ke_priv_key_arc }, in test_key_exchange_finish()
539 ke_key: Key { pub_key: p1_ke_pub_key, arc_from_pbk: p1_ke_priv_key_arc }, in test_key_exchange_auth_complete()
548 ke_key: Key { pub_key: p2_ke_pub_key, .. }, in test_key_exchange_auth_complete()
572 Key { pub_key: p1_ke_pub_key, arc_from_pbk: p1_ke_priv_key_arc }, in test_key_exchange_auth_complete()
593 ke_key: Key { pub_key: p1_ke_pub_key, arc_from_pbk: p1_ke_priv_key_arc }, in test_ke_with_newer_source()
[all …]
/system/keymint/common/src/crypto/
Dec.rs203 let pub_key = ec.subject_public_key(self)?; in public_cose_key() localVariable
207 let (x, y) = coordinates_from_pub_key(pub_key, nist_curve)?; in public_cose_key()
227 coset::cbor::value::Value::from(pub_key), in public_cose_key()
237 coset::cbor::value::Value::from(pub_key), in public_cose_key()
329 pub_key: Vec<u8>, in coordinates_from_pub_key()
333 if pub_key.len() != (1 + 2 * coord_len) { in coordinates_from_pub_key()
337 pub_key.len(), in coordinates_from_pub_key()
341 if pub_key[0] != SEC1_UNCOMPRESSED_PREFIX { in coordinates_from_pub_key()
345 pub_key[0], in coordinates_from_pub_key()
349 Ok((try_to_vec(&pub_key[1..1 + coord_len])?, try_to_vec(&pub_key[1 + coord_len..])?)) in coordinates_from_pub_key()
Drsa.rs129 let pub_key = rsa.subject_public_key(self)?; in subject_public_key_info() localVariable
130 buf.try_extend_from_slice(&pub_key)?; in subject_public_key_info()
Dtraits.rs370 Some(pub_key) => Ok(pub_key.to_vec()), in subject_public_key()
/system/keymaster/km_openssl/
Decdh_operation.cpp109 uint8_t pub_key[X25519_PUBLIC_VALUE_LEN]; in Finish() local
110 if (EVP_PKEY_get_raw_public_key(pkey.get(), pub_key, &pub_key_len) == 0) { in Finish()
131 if (X25519(output->peek_write(), priv_key, pub_key) != 1) { in Finish()
Dec_key_factory.cpp123 uint8_t pub_key[ED25519_PUBLIC_KEY_LEN]; in GenerateKey() local
124 ED25519_keypair(pub_key, priv_key); in GenerateKey()
131 uint8_t pub_key[X25519_PUBLIC_VALUE_LEN]; in GenerateKey() local
132 X25519_keypair(pub_key, priv_key); in GenerateKey()
/system/authgraph/core/src/
Dkeyexchange.rs129 let EcExchangeKey { pub_key: pub_key_for_ecdh, priv_key: mut priv_key_for_ecdh } = in create()
156 Key { pub_key: Some(pub_key_for_ecdh.0.to_vec()?), arc_from_pbk: Some(priv_key_arc) }; in create()
192 sink_ke_pub_key: key_for_ecdh.pub_key.clone(), in init()
224 ke_key: Key { pub_key: Some(key_for_ecdh.pub_key.0.to_vec()?), arc_from_pbk: None }, in init()
280 .pub_key in finish()
659 ke_key.pub_key.as_ref().ok_or_else(|| ag_err!(InvalidPubKeyInKey, "missing public key"))?,
731 pub_key: &[u8], in decode_peer_info()
735 let pub_key = in decode_peer_info() localVariable
736 EcExchangeKeyPub(CoseKey::from_slice(pub_key).map_err(|e| { in decode_peer_info()
744 Ok((pub_key, identity, nonce)) in decode_peer_info()
/system/update_engine/payload_consumer/
Dpayload_verifier.cc63 auto pub_key = std::unique_ptr<EVP_PKEY, decltype(&EVP_PKEY_free)>( in CreateInstance() local
65 if (!pub_key) { in CreateInstance()
71 keys.emplace_back(std::move(pub_key)); in CreateInstance()
/system/authgraph/wire/src/
Dtests.rs41 pub_key: Some(vec![10, 11]), in test_init_rsp_round_trip()
Dlib.rs117 pub pub_key: Option<Vec<u8>>, // PlainPubKey.cddl field
/system/security/keystore2/src/crypto/
Dcrypto.hpp56 int ECDHComputeKey(void *out, const EC_POINT *pub_key, const EC_KEY *priv_key);
Dcrypto.cpp222 int ECDHComputeKey(void* out, const EC_POINT* pub_key, const EC_KEY* priv_key) { in ECDHComputeKey() argument
223 return ECDH_compute_key(out, EC_MAX_BYTES, pub_key, priv_key, nullptr); in ECDHComputeKey()
Dlib.rs337 pub fn ecdh_compute_key(pub_key: &EC_POINT, priv_key: &ECKey) -> Result<ZVec, Error> { in ecdh_compute_key()
343 unsafe { ECDHComputeKey(buf.as_mut_ptr() as *mut std::ffi::c_void, pub_key, priv_key.0) }; in ecdh_compute_key()
/system/security/keystore-engine/
Dkeystore2_engine.cpp351 bssl::UniquePtr<EVP_PKEY> pub_key(X509_get_pubkey(decoded_cert.get())); in extractPubKey() local
352 if (!pub_key) { in extractPubKey()
356 return pub_key; in extractPubKey()
/system/secretkeeper/core/src/
Dta.rs122 let (identity_sign_key, mut pub_key) = in new_with_session_limit()
127 pub_key.canonicalize_cose_key(); in new_with_session_limit()
132 root_key: pub_key, in new_with_session_limit()
/system/security/keystore2/tests/
Dkeystore2_client_test_utils.rs287 let pub_key = cert.public_key().unwrap(); in perform_sample_asym_sign_verify_op() localVariable
288 let mut verifier = Verifier::new(get_openssl_digest_mode(digest), pub_key.as_ref()).unwrap(); in perform_sample_asym_sign_verify_op()
/system/keymaster/legacy_support/
Dkeymaster1_engine.cpp355 unique_ptr<uint8_t, Malloc_Delete> pub_key(const_cast<uint8_t*>(export_data.data)); in GetKeymaster1PublicKey() local

12