Home
last modified time | relevance | path

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

12

/system/tpm/attestation/common/
Dcrypto_utility_impl_test.cc157 std::string public_key = HexDecode(kValidPublicKeyHex); in TEST_F() local
159 EXPECT_TRUE(crypto_utility_->GetRSASubjectPublicKeyInfo(public_key, &output)); in TEST_F()
163 std::string public_key = "bad_public_key"; in TEST_F() local
165 EXPECT_FALSE(crypto_utility_->GetRSASubjectPublicKeyInfo(public_key, in TEST_F()
170 std::string public_key = HexDecode(kValidPublicKeyHex); in TEST_F() local
172 EXPECT_TRUE(crypto_utility_->GetRSASubjectPublicKeyInfo(public_key, &output)); in TEST_F()
175 EXPECT_EQ(public_key, public_key2); in TEST_F()
179 std::string public_key = HexDecode(kValidPublicKeyHex); in TEST_F() local
181 EXPECT_TRUE(crypto_utility_->GetRSASubjectPublicKeyInfo(public_key, in TEST_F()
201 std::string public_key = HexDecode(kValidPublicKeyHex); in TEST_F() local
[all …]
Dcrypto_utility.h65 virtual bool GetRSASubjectPublicKeyInfo(const std::string& public_key,
71 std::string* public_key) = 0;
85 virtual bool EncryptForUnbind(const std::string& public_key,
91 virtual bool VerifySignature(const std::string& public_key,
Dcrypto_utility_impl.h50 bool GetRSASubjectPublicKeyInfo(const std::string& public_key,
53 std::string* public_key) override;
59 bool EncryptForUnbind(const std::string& public_key,
62 bool VerifySignature(const std::string& public_key,
Dcrypto_utility_impl.cc166 const std::string& public_key, in GetRSASubjectPublicKeyInfo() argument
168 auto asn1_ptr = reinterpret_cast<const unsigned char*>(public_key.data()); in GetRSASubjectPublicKeyInfo()
170 public_key.size())); in GetRSASubjectPublicKeyInfo()
189 std::string* public_key) { in GetRSAPublicKey() argument
207 public_key->assign(reinterpret_cast<char*>(buffer), length); in GetRSAPublicKey()
270 bool CryptoUtilityImpl::EncryptForUnbind(const std::string& public_key, in EncryptForUnbind() argument
279 auto asn1_ptr = reinterpret_cast<const unsigned char*>(public_key.data()); in EncryptForUnbind()
280 crypto::ScopedRSA rsa(d2i_RSA_PUBKEY(NULL, &asn1_ptr, public_key.size())); in EncryptForUnbind()
293 bool CryptoUtilityImpl::VerifySignature(const std::string& public_key, in VerifySignature() argument
296 auto asn1_ptr = reinterpret_cast<const unsigned char*>(public_key.data()); in VerifySignature()
[all …]
Dtpm_utility_v1.h53 std::string* public_key,
59 bool GetEndorsementPublicKey(std::string* public_key) override;
107 bool ConvertPublicKeyToDER(const std::string& public_key,
Dtpm_utility.h62 std::string* public_key,
77 virtual bool GetEndorsementPublicKey(std::string* public_key) = 0;
Dtpm_utility_v1.cc175 std::string* public_key, in CreateCertifiedKey() argument
179 CHECK(key_blob && public_key && public_key_tpm_format && key_info && proof); in CreateCertifiedKey()
262 if (!ConvertPublicKeyToDER(*public_key_tpm_format, public_key)) { in CreateCertifiedKey()
397 bool TpmUtilityV1::GetEndorsementPublicKey(std::string* public_key) { in GetEndorsementPublicKey() argument
417 if (!ConvertPublicKeyToDER(ek_public_key_blob, public_key)) { in GetEndorsementPublicKey()
678 bool TpmUtilityV1::ConvertPublicKeyToDER(const std::string& public_key, in ConvertPublicKeyToDER() argument
682 std::string mutable_public_key(public_key); in ConvertPublicKeyToDER()
Dprint_interface_proto.cc204 base::HexEncode(value.public_key().data(), in GetProtoDebugStringWithIndent()
205 value.public_key().size()).c_str()); in GetProtoDebugStringWithIndent()
334 base::HexEncode(value.public_key().data(), in GetProtoDebugStringWithIndent()
335 value.public_key().size()).c_str()); in GetProtoDebugStringWithIndent()
495 base::HexEncode(value.public_key().data(), in GetProtoDebugStringWithIndent()
496 value.public_key().size()).c_str()); in GetProtoDebugStringWithIndent()
Dinterface.proto72 optional bytes public_key = 4; field
100 optional bytes public_key = 2; field
137 optional bytes public_key = 2; field
/system/tpm/trunks/
Dtrunks_client_test.h120 std::string* public_key);
125 bool VerifyRSASignature(const std::string& public_key,
131 bool LoadSigningKey(ScopedKeyHandle* key_handle, std::string* public_key);
136 const std::string& public_key,
Dtrunks_client_test.cc894 std::string public_key; in ManyKeysTest() local
895 if (!LoadSigningKey(key_handle.get(), &public_key)) { in ManyKeysTest()
898 public_key_map[key_handle->get()] = public_key; in ManyKeysTest()
907 const std::string& public_key = public_key_map[key_handle.get()]; in ManyKeysTest() local
908 if (!SignAndVerify(key_handle, public_key, delegate.get())) { in ManyKeysTest()
915 const std::string& public_key = public_key_map[key_handle.get()]; in ManyKeysTest() local
916 if (!SignAndVerify(key_handle, public_key, delegate.get())) { in ManyKeysTest()
939 std::string public_key; in ManySessionsTest() local
940 if (!LoadSigningKey(&key_handle, &public_key)) { in ManySessionsTest()
944 if (!SignAndVerify(key_handle, public_key, sessions[i]->GetDelegate())) { in ManySessionsTest()
[all …]
/system/connectivity/shill/
Dmock_crypto_util_proxy.cc48 const std::string& public_key, in RealVerifyDestination() argument
56 return CryptoUtilProxy::VerifyDestination(certificate, public_key, in RealVerifyDestination()
63 const std::string& public_key, in RealEncryptData() argument
67 return CryptoUtilProxy::EncryptData(public_key, data, in RealEncryptData()
Dmock_crypto_util_proxy.h42 const std::string& public_key,
50 MOCK_METHOD4(EncryptData, bool(const std::string& public_key,
56 const std::string& public_key,
65 bool RealEncryptData(const std::string& public_key,
Dcrypto_util_proxy.h65 const std::string& public_key,
82 virtual bool EncryptData(const std::string& public_key,
Dcrypto_util_proxy.cc78 const string& public_key, in VerifyDestination() argument
92 public_key.c_str(), in VerifyDestination()
127 const string& public_key, in EncryptData() argument
132 if (!brillo::data_encoding::Base64Decode(public_key, &decoded_public_key)) { in EncryptData()
/system/connectivity/shill/shims/protos/
Dcrypto_util.proto32 // credential verification shim. The call will fail if public_key is empty
36 optional bytes public_key = 1; field
47 // Data after being encrypted under the public_key, or an empty string.
/system/keymaster/
Dnist_curve_key_exchange_test.cpp108 uint8_t* public_key = new uint8_t[public_key_len]; in TEST() local
110 public_key, public_key_len, nullptr /* ctx */); in TEST()
119 ASSERT_FALSE(key_exchange->CalculateSharedKey(reinterpret_cast<const uint8_t*>(public_key), in TEST()
/system/tpm/attestation/server/
Dattestation_service.cc200 if (!GetSubjectPublicKeyInfo(key.key_type(), key.public_key(), in GetKeyInfoTask()
246 std::string public_key; in GetEndorsementInfoTask() local
247 if (!tpm_utility_->GetEndorsementPublicKey(&public_key)) { in GetEndorsementInfoTask()
251 database_pb.mutable_credentials()->set_endorsement_public_key(public_key); in GetEndorsementInfoTask()
401 if (!GetSubjectPublicKeyInfo(key.key_type(), key.public_key(), in CreateCertifiableKeyTask()
502 key.public_key(), key.certified_key_credential())) { in RegisterKeyWithChapsTokenTask()
740 std::string public_key; in CreateKey() local
751 &public_key, in CreateKey()
758 key->set_public_key(public_key); in CreateKey()
923 const std::string& public_key, in GetSubjectPublicKeyInfo() argument
[all …]
Dpkcs11_key_store.cc265 crypto::ScopedRSA public_key(d2i_RSAPublicKey(nullptr, in Register() local
268 if (!public_key.get()) { in Register()
272 std::string modulus(BN_num_bytes(public_key.get()->n), 0); in Register()
273 int length = BN_bn2bin(public_key.get()->n, reinterpret_cast<unsigned char*>( in Register()
Ddbus_service_test.cc164 EXPECT_EQ("public_key", reply.public_key()); in TEST_F()
223 EXPECT_EQ("public_key", reply.public_key()); in TEST_F()
294 EXPECT_EQ("public_key", reply.public_key()); in TEST_F()
/system/connectivity/shill/shims/
Dcrypto_util.cc68 bool EncryptByteStringImpl(const string& public_key, in EncryptByteStringImpl() argument
78 reinterpret_cast<const unsigned char*>(public_key.data()); in EncryptByteStringImpl()
79 *rsa_ptr = d2i_RSAPublicKey(NULL, &throwaway_ptr, public_key.length()); in EncryptByteStringImpl()
124 message.public_key(), message.data(), &rsa, &encrypted_output); in EncryptByteString()
/system/connectivity/shill/dbus/
Dchromeos_manager_dbus_adaptor.cc420 const string& public_key, in VerifyDestination() argument
430 manager_->VerifyDestination(certificate, public_key, nonce, in VerifyDestination()
448 const string& public_key, in VerifyAndEncryptCredentials() argument
460 manager_->VerifyAndEncryptCredentials(certificate, public_key, nonce, in VerifyAndEncryptCredentials()
480 const string& public_key, in VerifyAndEncryptData() argument
492 manager_->VerifyAndEncryptData(certificate, public_key, nonce, in VerifyAndEncryptData()
Dchromeos_manager_dbus_adaptor.h134 const std::string& public_key,
142 const std::string& public_key,
151 const std::string& public_key,
/system/update_engine/payload_generator/
Dgenerate_delta_main.cc171 const string& public_key) { in VerifySignedPayload() argument
175 LOG_IF(FATAL, public_key.empty()) in VerifySignedPayload()
177 CHECK(PayloadSigner::VerifySignedPayload(in_file, public_key)); in VerifySignedPayload()
279 DEFINE_string(public_key, "", "Path to public key in .pem format"); in Main()
/system/tpm/attestation/client/
Ddbus_proxy_test.cc127 EXPECT_EQ("public_key", reply.public_key()); in TEST_F()
205 EXPECT_EQ("public_key", reply.public_key()); in TEST_F()
290 EXPECT_EQ("public_key", reply.public_key()); in TEST_F()

12