Home
last modified time | relevance | path

Searched refs:public_key (Results 1 – 25 of 83) sorted by relevance

1234

/packages/modules/Bluetooth/system/gd/security/
Decdh_keys.cc58 ecc::Point public_key; in GenerateECDHKeyPair() local
60 ECC_PointMult(&public_key, &(ecc::curve_p256.G), (uint32_t*)private_key_copy.data()); in GenerateECDHKeyPair()
63 memcpy(pk.x.data(), public_key.x, 32); in GenerateECDHKeyPair()
64 memcpy(pk.y.data(), public_key.y, 32); in GenerateECDHKeyPair()
71 ecc::Point public_key; in ValidateECDHPoint() local
72 memcpy(public_key.x, pk.x.data(), 32); in ValidateECDHPoint()
73 memcpy(public_key.y, pk.y.data(), 32); in ValidateECDHPoint()
74 memset(public_key.z, 0, 32); in ValidateECDHPoint()
75 return ECC_ValidatePoint(public_key); in ValidateECDHPoint()
Dpairing_handler_le_secure_connections.cc35 …const auto [private_key, public_key] = (remote_have_oob_data == OobDataFlag::NOT_PRESENT || !i.my_… in ExchangePublicKeys()
37 … : std::make_pair(i.my_oob_data->private_key, i.my_oob_data->public_key); in ExchangePublicKeys()
40 …PairingPublicKeyBuilder> myPublicKey = PairingPublicKeyBuilder::Create(public_key.x, public_key.y); in ExchangePublicKeys()
42 if (!ValidateECDHPoint(public_key)) { in ExchangePublicKeys()
66 if (public_key.x == remote_public_key.x) { in ExchangePublicKeys()
91 const EcdhPublicKey& PKa = IAmCentral(i) ? public_key : remote_public_key; in ExchangePublicKeys()
92 const EcdhPublicKey& PKb = IAmCentral(i) ? remote_public_key : public_key; in ExchangePublicKeys()
/packages/modules/adb/daemon/
Dauth.cpp98 static void IteratePublicKeys(std::function<bool(std::string_view public_key)> f) { in IteratePublicKeys()
101 [](void* opaque, const char* public_key, size_t len) { in IteratePublicKeys() argument
102 return (*static_cast<decltype(f)*>(opaque))(std::string_view(public_key, len)); in IteratePublicKeys()
114 IteratePublicKeys([&](std::string_view public_key) { in adbd_tls_client_ca_list() argument
116 std::vector<std::string> split = android::base::Split(std::string(public_key), " \t"); in adbd_tls_client_ca_list()
161 IteratePublicKeys([&](std::string_view public_key) { in adbd_auth_verify() argument
163 std::vector<std::string> split = android::base::Split(std::string(public_key), " \t"); in adbd_auth_verify()
182 *auth_key = public_key; in adbd_auth_verify()
236 static void adbd_key_removed(const char* public_key, size_t len) { in adbd_key_removed() argument
239 std::string_view auth_key(public_key, len); in adbd_key_removed()
[all …]
/packages/modules/Virtualization/compos/compos_key_helper/
Dcompos_key_test.cpp46 ASSERT_EQ(key_pair.public_key, other_key_pair->public_key); in TEST_F()
54 ASSERT_NE(key_pair.public_key, other_key_pair->public_key); in TEST_F()
61 bool verified = verify(key_pair.public_key, *signature, data.data(), data.size()); in TEST_F()
71 bool verified = verify(key_pair.public_key, *signature, data.data(), data.size()); in TEST_F()
82 bool verified = verify(key_pair.public_key, *signature, other_data.data(), other_data.size()); in TEST_F()
92 bool verified = verify(other_key_pair->public_key, *signature, data.data(), data.size()); in TEST_F()
Dcompos_key.cpp33 ED25519_keypair_from_seed(result.public_key.data(), result.private_key.data(), seed.data()); in keyFromSeed()
45 bool verify(const PublicKey& public_key, const Signature& signature, const uint8_t* data, in verify() argument
47 return ED25519_verify(data, data_size, signature.data(), public_key.data()) == 1; in verify()
Dcompos_key.h34 PublicKey public_key; member
42 bool verify(const PublicKey& public_key, const Signature& signature, const uint8_t* data,
Dcompos_key_main.cpp52 if (!WriteFully(STDOUT_FILENO, key_pair->public_key.data(), key_pair->public_key.size())) { in write_public_key()
/packages/modules/Virtualization/pvmfw/avb/tests/
Dapi_test.rs63 let public_key = load_trusted_public_key()?; in payload_expecting_no_initrd_passes_verification_with_no_initrd() localVariable
67 &public_key, in payload_expecting_no_initrd_passes_verification_with_no_initrd()
76 public_key: &public_key, in payload_expecting_no_initrd_passes_verification_with_no_initrd()
107 let public_key = load_trusted_public_key()?; in payload_expecting_no_initrd_passes_verification_with_service_vm_prop() localVariable
111 &public_key, in payload_expecting_no_initrd_passes_verification_with_service_vm_prop()
120 public_key: &public_key, in payload_expecting_no_initrd_passes_verification_with_service_vm_prop()
394 let public_key = load_trusted_public_key()?; in payload_with_rollback_index() localVariable
398 &public_key, in payload_with_rollback_index()
407 public_key: &public_key, in payload_with_rollback_index()
417 let public_key = load_trusted_public_key()?; in payload_with_multiple_capabilities() localVariable
[all …]
Dutils.rs107 let public_key = load_trusted_public_key()?; in assert_latest_payload_verification_passes() localVariable
109 let verified_boot_data = verify_payload(&kernel, Some(initrd), &public_key) in assert_latest_payload_verification_passes()
122 public_key: &public_key, in assert_latest_payload_verification_passes()
/packages/modules/Virtualization/libs/apexutil/src/
Dlib.rs78 pub public_key: Vec<u8>, field
89 let ApexZipInfo { public_key, image_offset, image_size, manifest } = in verify()
94 vbmeta.public_key().ok_or(ApexParseError::VbmetaMissingData("public key"))?; in verify()
95 if vbmeta_public_key != public_key { in verify()
104 Ok(ApexVerificationResult { name, version, public_key, root_digest }) in verify()
118 public_key: Vec<u8>, field
127 let mut public_key = Vec::new(); in get_apex_zip_info() localVariable
130 .read_to_end(&mut public_key)?; in get_apex_zip_info()
142 Ok(ApexZipInfo { public_key, image_offset, image_size, manifest }) in get_apex_zip_info()
185 hex::encode(res.public_key), in apex_verification_returns_valid_result()
/packages/modules/Virtualization/libs/dice/open_dice/src/
Dops.rs75 let mut public_key = [0u8; PUBLIC_KEY_SIZE]; localVariable
85 public_key.as_mut_ptr(),
89 public_key.len(),
91 Ok((public_key, private_key))
130 pub fn verify(message: &[u8], signature: &Signature, public_key: &PublicKey) -> Result<()> { in verify()
140 public_key.as_ptr(), in verify()
/packages/modules/Virtualization/compos/verify/native/
Dverify_native.cpp23 bool verify(Slice<const uint8_t> public_key, Slice<const uint8_t> signature, in verify() argument
28 if (public_key.size() != public_key_array.size() || in verify()
33 std::copy(public_key.begin(), public_key.end(), public_key_array.begin()); in verify()
/packages/modules/Virtualization/service_vm/client_vm_csr/src/
Dlib.rs75 let public_key = in build_csr() localVariable
77 let csr_payload = CsrPayload { public_key, challenge: challenge.to_vec() }; in build_csr()
137 key.public_key().affine_coordinates_gfp(key.group(), &mut x, &mut y, &mut ctx)?; in get_affine_coordinates()
178 let public_key = to_cose_public_key(&ec_private_key)?.to_vec().unwrap(); in csr_and_private_key_have_correct_format() localVariable
179 let expected_csr_payload = CsrPayload { challenge: CHALLENGE.to_vec(), public_key }; in csr_and_private_key_have_correct_format()
185 let public_key = chain.leaf().subject_public_key(); in csr_and_private_key_have_correct_format() localVariable
187 .verify_signature(0, aad, |signature, message| public_key.verify(signature, message)) in csr_and_private_key_have_correct_format()
191 let attestation_public_key = CoseKey::from_slice(&csr_payload.public_key).unwrap(); in csr_and_private_key_have_correct_format()
/packages/modules/Virtualization/microdroid_manager/src/
Dpayload.rs51 public_key: extracted.public_key, in get_apex_data_from_payload()
67 public_key: data.public_key.clone(), in to_metadata()
/packages/modules/Virtualization/service_vm/fake_chain/src/
Dservice_vm.rs77 fn ed25519_public_key_to_cbor_value(public_key: &[u8]) -> Result<Value> { in ed25519_public_key_to_cbor_value()
87 (Label::Int(iana::Ec2KeyParameter::X.to_i64()), Value::Bytes(public_key.to_vec())), in ed25519_public_key_to_cbor_value()
108 let (public_key, _) = keypair_from_seed(private_key_seed.as_array()).map_err(|e| { in fake_dice_artifacts_up_to_pvmfw()
112 let ed25519_public_key_value = ed25519_public_key_to_cbor_value(&public_key)?; in fake_dice_artifacts_up_to_pvmfw()
/packages/modules/Virtualization/libs/apkverify/src/
Dalgorithms.rs97 public_key: &'a PKey<pkey::Public>, in new_verifier()
107 ensure!(public_key.id() == self.pkey_id(), "Public key has the wrong ID"); in new_verifier()
108 let mut verifier = Verifier::new(self.new_message_digest(), public_key)?; in new_verifier()
109 if public_key.id() == pkey::Id::RSA { in new_verifier()
Dv3.rs44 public_key: PKey<pkey::Public>, field
138 .new_verifier(&self.public_key)?; in verify_signature()
197 cert.public_key()?.public_eq(&self.public_key), in verify()
240 public_key: buf.read()?, in read_from_bytes()
/packages/modules/Virtualization/libs/dice/sample_inputs/src/
Dsample_inputs.rs79 fn ed25519_public_key_to_cbor_value(public_key: &[u8]) -> Result<Value> { in ed25519_public_key_to_cbor_value()
89 (Label::Int(iana::Ec2KeyParameter::X as i64), Value::Bytes(public_key.to_vec())), in ed25519_public_key_to_cbor_value()
110 let (public_key, _) = keypair_from_seed(private_key_seed.as_array()).map_err(|e| { in make_sample_bcc_and_cdis()
114 let ed25519_public_key_value = ed25519_public_key_to_cbor_value(&public_key)?; in make_sample_bcc_and_cdis()
/packages/modules/Virtualization/service_vm/comm/src/
Dcsr.rs72 pub public_key: Vec<u8>, field
83 let value = Value::Array(vec![Value::Bytes(self.public_key), Value::Bytes(self.challenge)]); in into_cbor_vec()
98 public_key: value_to_bytes(arr.remove(0), "public_key")?, in from_cbor_slice()
/packages/modules/adb/client/
Dadb_wifi.cpp212 std::string public_key = adb_auth_get_userkey(); in adb_wifi_pair_device() local
213 CHECK_LE(public_key.size(), sizeof(system_info.data) - 1); // -1 for null byte in adb_wifi_pair_device()
215 memcpy(system_info.data, public_key.data(), public_key.size()); in adb_wifi_pair_device()
/packages/modules/Virtualization/libs/bssl/src/
Dcurve25519.rs27 public_key: &[u8; ED25519_PUBLIC_KEY_LEN],
35 public_key.as_ptr(),
/packages/modules/Virtualization/libs/dice/sample_inputs/tests/
Dapi_test.rs144 let public_key = chain.leaf().subject_public_key(); in cdi_leaf_priv_corresponds_to_leaf_public_key_in_dice_chain() localVariable
145 public_key.verify(&signature, MESSAGE) in cdi_leaf_priv_corresponds_to_leaf_public_key_in_dice_chain()
/packages/modules/adb/pairing_connection/
Dpairing_server.cpp367 auto [fd, info_type, public_key] = std::move(*p); in ConnectionEventsWorker()
368 if (public_key.has_value() && !public_key->empty()) { in ConnectionEventsWorker()
376 strncpy(reinterpret_cast<char*>(info.data), public_key->data(), in ConnectionEventsWorker()
377 public_key->size()); in ConnectionEventsWorker()
/packages/modules/Virtualization/service_vm/requests/src/
Dpub_key.rs43 pub fn build_maced_public_key(public_key: CoseKey, hmac_key: &[u8]) -> Result<Vec<u8>> { in build_maced_public_key()
50 .payload(public_key.to_vec()?) in build_maced_public_key()
/packages/modules/Virtualization/pvmfw/avb/src/
Dverify.rs43 pub public_key: &'a [u8], field
276 public_key: trusted_public_key, in verify_payload()
296 public_key: trusted_public_key, in verify_payload()

1234