Home
last modified time | relevance | path

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

123

/system/update_engine/payload_generator/
Dpayload_signer_unittest.cc133 string public_key; in TEST_F() local
134 EXPECT_TRUE(utils::ReadFile(GetBuildArtifactsPath(path), &public_key)); in TEST_F()
135 auto payload_verifier = PayloadVerifier::CreateInstance(public_key); in TEST_F()
145 string public_key; in TEST_F() local
147 &public_key)); in TEST_F()
148 auto payload_verifier = PayloadVerifier::CreateInstance(public_key); in TEST_F()
153 public_key.clear(); in TEST_F()
155 &public_key)); in TEST_F()
156 payload_verifier = PayloadVerifier::CreateInstance(public_key); in TEST_F()
Dpayload_signer.cc258 string public_key; in VerifySignedPayload() local
259 TEST_AND_RETURN_FALSE(utils::ReadFile(public_key_path, &public_key)); in VerifySignedPayload()
262 auto payload_verifier = PayloadVerifier::CreateInstance(public_key); in VerifySignedPayload()
Dgenerate_delta_main.cc146 int VerifySignedPayload(const string& in_file, const string& public_key) { in VerifySignedPayload() argument
150 LOG_IF(FATAL, public_key.empty()) in VerifySignedPayload()
152 if (!PayloadSigner::VerifySignedPayload(in_file, public_key)) { in VerifySignedPayload()
351 DEFINE_string(public_key, "", "Path to public key in .pem format");
/system/security/mls/mls-rs-crypto-boringssl/src/
Deddsa.rs88 let public_key = private_key.to_public(); in signature_key_generate() localVariable
89 Ok((private_key.to_seed().to_vec().into(), public_key.as_bytes().to_vec().into())) in signature_key_generate()
136 public_key: &SignaturePublicKey, in verify()
143 if public_key.len() != ed25519::PUBLIC_KEY_LEN { in verify()
145 len: public_key.len(), in verify()
156 let public_key = ed25519::PublicKey::from_bytes( in verify() localVariable
157 public_key.as_bytes()[..ed25519::PUBLIC_KEY_LEN].try_into()?, in verify()
159 match public_key.verify(data, signature[..ed25519::SIGNATURE_LEN].try_into()?) { in verify()
221 let public_key = ed25519.signature_key_derive_public(&private_key).unwrap(); in sign_verify() localVariable
222 assert!(ed25519.verify(&public_key, &sig, &data).is_ok()); in sign_verify()
[all …]
Decdh.rs81 public_key: &HpkePublicKey, in dh()
92 if public_key.len() != x25519::PUBLIC_KEY_LEN { in dh()
94 len: public_key.len(), in dh()
100 match private_key.compute_shared_key(public_key[..x25519::PUBLIC_KEY_LEN].try_into()?) { in dh()
126 let (public_key, private_key) = x25519::PrivateKey::generate(); in generate()
127 Ok((private_key.0.to_vec().into(), public_key.to_vec().into())) in generate()
169 let public_key = HpkePublicKey::from( in dh() localVariable
177 assert_eq!(x25519.dh(&private_key, &public_key).unwrap(), expected_shared_secret); in dh()
186 let public_key = HpkePublicKey::from( in dh_invalid_key() localVariable
191 x25519.dh(&private_key_short, &public_key), in dh_invalid_key()
[all …]
Dlib.rs345 public_key: &SignaturePublicKey, in verify()
349 Ok(self.eddsa.verify(public_key, signature, data)?) in verify()
480 let public_key = HpkePublicKey::from( in kem_public_key_validate() localVariable
486 assert!(crypto.kem_public_key_validate(&public_key).is_ok()); in kem_public_key_validate()
672 let public_key = crypto.signature_key_derive_public(&private_key).unwrap(); in sign_verify() localVariable
673 assert!(crypto.verify(&public_key, &sig, &data).is_ok()); in sign_verify()
Dhpke.rs125 let (public_key, private_key) = kem.generate_keypair(); in generate()
126 Ok((private_key.to_vec().into(), public_key.to_vec().into())) in generate()
409 let public_key = HpkePublicKey::from( in dh_kem_public_key_validate() localVariable
413 assert!(kem.public_key_validate(&public_key).is_ok()); in dh_kem_public_key_validate()
/system/update_engine/payload_consumer/
Dpayload_verifier.cc152 for (const auto& public_key : public_keys_) { in VerifyRawSignature() local
153 int key_type = EVP_PKEY_id(public_key.get()); in VerifyRawSignature()
157 sig_data, public_key.get(), &sig_hash_data)) { in VerifyRawSignature()
175 EC_KEY* ec_key = EVP_PKEY_get0_EC_KEY(public_key.get()); in VerifyRawSignature()
197 const EVP_PKEY* public_key, in GetRawHashFromSignature() argument
203 RSA* rsa = EVP_PKEY_get0_RSA(const_cast<EVP_PKEY*>(public_key)); in GetRawHashFromSignature()
Dcertificate_parser_android.cc104 std::unique_ptr<EVP_PKEY, decltype(&EVP_PKEY_free)> public_key( in ReadPublicKeysFromCertificates() local
106 if (!public_key) { in ReadPublicKeysFromCertificates()
110 result.push_back(std::move(public_key)); in ReadPublicKeysFromCertificates()
Ddelta_performer_unittest.cc1020 string public_key; in TEST_F() local
1021 EXPECT_TRUE(performer_.GetPublicKey(&public_key)); in TEST_F()
1022 EXPECT_EQ(public_key, kResponseKey); in TEST_F()
1025 EXPECT_TRUE(performer_.GetPublicKey(&public_key)); in TEST_F()
1026 EXPECT_TRUE(public_key.empty()); in TEST_F()
1032 EXPECT_TRUE(performer_.GetPublicKey(&public_key)); in TEST_F()
1033 EXPECT_EQ(public_key, kExistingKey); in TEST_F()
1036 EXPECT_TRUE(performer_.GetPublicKey(&public_key)); in TEST_F()
1037 EXPECT_EQ(public_key, kExistingKey); in TEST_F()
1043 EXPECT_TRUE(performer_.GetPublicKey(&public_key)); in TEST_F()
[all …]
Dpayload_verifier.h82 const EVP_PKEY* public_key,
/system/security/keystore2/src/
Dec_crypto.rs46 pub fn public_key(&self) -> Result<Vec<u8>> { in public_key() method
82 let sender_public_key = sender_key.public_key().context(ks_err!("public_key failed"))?; in encrypt_message()
101 let recipient_public_key = self.public_key()?; in decrypt_message()
118 ECDHPrivateKey::encrypt_message(&recipient.public_key()?, message)?; in test_crypto_roundtrip()
Dsuper_key.rs455 match (metadata.public_key(), metadata.salt(), metadata.iv(), metadata.aead_tag()) { in unwrap_key_with_key()
456 (Some(public_key), Some(salt), Some(iv), Some(aead_tag)) => { in unwrap_key_with_key()
458 .and_then(|k| k.decrypt_message(public_key, salt, iv, blob, aead_tag)) in unwrap_key_with_key()
461 (public_key, salt, iv, aead_tag) => { in unwrap_key_with_key()
467 public_key.is_some(), in unwrap_key_with_key()
643 let public_key = key_entry in encrypt_with_hybrid_super_key() localVariable
650 ECDHPrivateKey::encrypt_message(public_key, key_blob) in encrypt_with_hybrid_super_key()
752 let (super_key, public_key) = match key_type.algorithm { in create_super_key()
761 Some(key.public_key().context(ks_err!("public_key failed"))?), in create_super_key()
770 if let Some(pk) = public_key { in create_super_key()
/system/keymaster/tests/
Dnist_curve_key_exchange_test.cpp106 uint8_t* public_key = new uint8_t[public_key_len]; in TEST() local
108 public_key, public_key_len, nullptr /* ctx */); in TEST()
117 ASSERT_FALSE(key_exchange->CalculateSharedKey(reinterpret_cast<const uint8_t*>(public_key), in TEST()
/system/apex/apexd/
Dapex_file_repository_test.cpp280 auto public_key = instance.GetPublicKey("com.android.apex.test_package"); in TEST() local
281 ASSERT_RESULT_OK(public_key); in TEST()
294 ASSERT_NE(*public_key, apex->GetBundledPublicKey()); in TEST()
315 auto public_key = instance.GetPublicKey("com.android.apex.compressed"); in TEST() local
316 ASSERT_RESULT_OK(public_key); in TEST()
329 ASSERT_NE(*public_key, apex->GetBundledPublicKey()); in TEST()
597 std::string public_key; member
616 apex->set_public_key(apex_metadata.public_key); in apex()
797 std::string public_key; in TEST_F() local
800 ASSERT_TRUE(android::base::ReadFileToString(key_path, &public_key)) in TEST_F()
[all …]
Dapex_file.cpp270 const std::string& public_key) { in VerifyVbMeta() argument
292 if (!CompareKeys(st->data(), st->size(), public_key)) { in VerifyVbMeta()
349 const std::string& public_key) const { in VerifyApexVerity()
367 VerifyVbMeta(*this, fd, **footer, public_key); in VerifyApexVerity()
Dapex_file.h59 const std::string& public_key) const;
/system/security/ondevice-signing/
DCertUtils.cpp96 bssl::UniquePtr<EVP_PKEY> public_key(EVP_PKEY_new()); in modulusToRsaPkey() local
97 if (!EVP_PKEY_assign_RSA(public_key.get(), rsaPubkey->release())) { in modulusToRsaPkey()
100 return public_key; in modulusToRsaPkey()
/system/security/keystore2/src/fuzzers/
Dkeystore2_unsafe_fuzzer.rs171 let public_key = check_ecpoint.unwrap(); localVariable
172 let _res = ec_point_point_to_oct(public_key.get_point());
173 let _res = ecdh_compute_key(public_key.get_point(), &private_key);
/system/chre/apps/nearby/location/lbs/contexthub/nanoapps/nearby/proto/
Dble_filter.options30 nearby.PublicCredential.public_key max_size:4
31 nearby.PublicCredential.public_key type:FT_INLINE
/system/apex/tests/testdata/apkinapex/com.android.apex.vendor.test/
DAndroid.bp21 public_key: "com.android.apex.vendor.test.avbpubkey",
/system/apex/tests/testdata/apkinapex/com.android.apex.product.test/
DAndroid.bp21 public_key: "com.android.apex.product.test.avbpubkey",
/system/apex/tests/testdata/apkinapex/com.android.apex.system.test/
DAndroid.bp21 public_key: "com.android.apex.system.test.avbpubkey",
/system/apex/tests/testdata/apkinapex/com.android.apex.system_ext.test/
DAndroid.bp21 public_key: "com.android.apex.system_ext.test.avbpubkey",
/system/gsid/
Dgsi_tool.cpp627 AvbPublicKey public_key; in Status() local
629 status = image_service->getAvbPublicKey(image, &public_key, &err); in Status()
631 if (!public_key.bytes.empty()) { in Status()
632 for (auto b : public_key.sha1) { in Status()

123