Searched refs:public_key (Results 1 - 20 of 20) sorted by relevance

/system/tpm/trunks/
H A Dtrunks_client_test.h114 // into the TPM. The |public_key| may be NULL, but if it is not, will be
118 std::string* public_key);
121 // |public_key| is as produced by GenerateRSAKeyPair(). Returns true on
123 bool VerifyRSASignature(const std::string& public_key,
128 // |public_key|. Returns true on success.
129 bool LoadSigningKey(ScopedKeyHandle* key_handle, std::string* public_key);
132 // verifies the signature with |public_key|. Returns true on success.
134 const std::string& public_key,
H A Dtrunks_client_test.cc923 std::string public_key; local
924 if (!LoadSigningKey(key_handle.get(), &public_key)) {
927 public_key_map[key_handle->get()] = public_key;
936 const std::string& public_key = public_key_map[key_handle.get()]; local
937 if (!SignAndVerify(key_handle, public_key, delegate.get())) {
944 const std::string& public_key = public_key_map[key_handle.get()]; local
945 if (!SignAndVerify(key_handle, public_key, delegate.get())) {
968 std::string public_key; local
969 if (!LoadSigningKey(&key_handle, &public_key)) {
973 if (!SignAndVerify(key_handle, public_key, session
1016 GenerateRSAKeyPair(std::string* modulus, std::string* prime_factor, std::string* public_key) argument
1044 VerifyRSASignature(const std::string& public_key, const std::string& data, const std::string& signature) argument
1060 LoadSigningKey(ScopedKeyHandle* key_handle, std::string* public_key) argument
1086 SignAndVerify(const ScopedKeyHandle& key_handle, const std::string& public_key, AuthorizationDelegate* delegate) argument
[all...]
/system/tpm/attestation/common/
H A Dcrypto_utility.h62 // Convert |public_key| from PKCS #1 RSAPublicKey to X.509
65 virtual bool GetRSASubjectPublicKeyInfo(const std::string& public_key,
69 // RSAPublicKey. On success returns true and provides the |public_key|.
71 std::string* public_key) = 0;
84 // |public_key| must be provided in X.509 SubjectPublicKeyInfo format.
85 virtual bool EncryptForUnbind(const std::string& public_key,
89 // Verifies a PKCS #1 v1.5 SHA-256 |signature| over |data|. The |public_key|
91 virtual bool VerifySignature(const std::string& public_key,
H A Dcrypto_utility_impl_test.cc156 std::string public_key = HexDecode(kValidPublicKeyHex); local
158 EXPECT_TRUE(crypto_utility_->GetRSASubjectPublicKeyInfo(public_key, &output));
162 std::string public_key = "bad_public_key"; local
165 crypto_utility_->GetRSASubjectPublicKeyInfo(public_key, &output));
169 std::string public_key = HexDecode(kValidPublicKeyHex); local
171 EXPECT_TRUE(crypto_utility_->GetRSASubjectPublicKeyInfo(public_key, &output));
174 EXPECT_EQ(public_key, public_key2);
178 std::string public_key = HexDecode(kValidPublicKeyHex); local
180 EXPECT_TRUE(crypto_utility_->GetRSASubjectPublicKeyInfo(public_key,
196 std::string public_key local
212 std::string public_key = HexDecode(kValidPublicKeyHex); local
223 std::string public_key = HexDecode(kValidPublicKeyHex); local
[all...]
H A 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,
H A Dtpm_utility.h62 std::string* public_key,
77 virtual bool GetEndorsementPublicKey(std::string* public_key) = 0;
H A Dtpm_utility_v1.h53 std::string* public_key,
59 bool GetEndorsementPublicKey(std::string* public_key) override;
107 bool ConvertPublicKeyToDER(const std::string& public_key,
H A Dcrypto_utility_impl.cc165 const std::string& public_key,
167 auto asn1_ptr = reinterpret_cast<const unsigned char*>(public_key.data());
169 d2i_RSAPublicKey(nullptr, &asn1_ptr, public_key.size()));
188 std::string* public_key) {
206 public_key->assign(reinterpret_cast<char*>(buffer), length);
269 bool CryptoUtilityImpl::EncryptForUnbind(const std::string& public_key, argument
278 auto asn1_ptr = reinterpret_cast<const unsigned char*>(public_key.data());
279 crypto::ScopedRSA rsa(d2i_RSA_PUBKEY(NULL, &asn1_ptr, public_key.size()));
292 bool CryptoUtilityImpl::VerifySignature(const std::string& public_key, argument
295 auto asn1_ptr = reinterpret_cast<const unsigned char*>(public_key
164 GetRSASubjectPublicKeyInfo( const std::string& public_key, std::string* public_key_info) argument
187 GetRSAPublicKey(const std::string& public_key_info, std::string* public_key) argument
[all...]
H A Dtpm_utility_v1.cc168 std::string* public_key,
172 CHECK(key_blob && public_key && public_key_tpm_format && key_info && proof);
247 if (!ConvertPublicKeyToDER(*public_key_tpm_format, public_key)) {
368 bool TpmUtilityV1::GetEndorsementPublicKey(std::string* public_key) { argument
386 if (!ConvertPublicKeyToDER(ek_public_key_blob, public_key)) {
631 bool TpmUtilityV1::ConvertPublicKeyToDER(const std::string& public_key, argument
635 std::string mutable_public_key(public_key);
163 CreateCertifiedKey(KeyType key_type, KeyUsage key_usage, const std::string& identity_key_blob, const std::string& external_data, std::string* key_blob, std::string* public_key, std::string* public_key_tpm_format, std::string* key_info, std::string* proof) argument
H A Dprint_interface_proto.cc203 output += indent + " public_key: ";
206 base::HexEncode(value.public_key().data(), value.public_key().size())
338 output += indent + " public_key: ";
341 base::HexEncode(value.public_key().data(), value.public_key().size())
503 output += indent + " public_key: ";
506 base::HexEncode(value.public_key().data(), value.public_key().size())
/system/keymaster/
H A Dnist_curve_key_exchange_test.cpp108 uint8_t* public_key = new uint8_t[public_key_len]; local
110 public_key, public_key_len, nullptr /* ctx */);
119 ASSERT_FALSE(key_exchange->CalculateSharedKey(reinterpret_cast<const uint8_t*>(public_key),
/system/tpm/attestation/server/
H A Dattestation_service.cc180 if (!GetSubjectPublicKeyInfo(key.key_type(), key.public_key(),
221 std::string public_key; local
222 if (!tpm_utility_->GetEndorsementPublicKey(&public_key)) {
226 database_pb.mutable_credentials()->set_endorsement_public_key(public_key);
362 if (!GetSubjectPublicKeyInfo(key.key_type(), key.public_key(),
449 key.public_key(), key.certified_key_credential())) {
683 std::string public_key; local
690 nonce, &key_blob, &public_key, &public_key_tpm_format, &key_info,
695 key->set_public_key(public_key);
859 const std::string& public_key,
857 GetSubjectPublicKeyInfo( KeyType key_type, const std::string& public_key, std::string* public_key_info) const argument
[all...]
H A Dpkcs11_key_store.cc243 crypto::ScopedRSA public_key(
245 if (!public_key.get()) {
249 std::string modulus(BN_num_bytes(public_key.get()->n), 0);
251 BN_bn2bin(public_key.get()->n,
H A Ddbus_service_test.cc149 reply.set_public_key("public_key");
165 EXPECT_EQ("public_key", reply.public_key());
181 reply.set_ek_public_key("public_key");
194 EXPECT_EQ("public_key", reply.ek_public_key());
208 reply.set_public_key("public_key");
224 EXPECT_EQ("public_key", reply.public_key());
281 reply.set_public_key("public_key");
295 EXPECT_EQ("public_key", repl
[all...]
H A Dattestation_service.h263 // |public_key|. On success returns true and provides |public_key_info|.
265 const std::string& public_key,
H A Dattestation_service_test.cc443 key.set_public_key("public_key");
462 EXPECT_EQ("public_key", reply.public_key());
478 key.set_public_key("public_key");
493 EXPECT_EQ("public_key", reply.public_key());
539 database->mutable_credentials()->set_endorsement_public_key("public_key");
544 EXPECT_EQ("public_key", reply.ek_public_key());
570 database->mutable_credentials()->set_endorsement_public_key("public_key");
574 EXPECT_EQ("public_key", repl
[all...]
/system/update_engine/payload_generator/
H A Dgenerate_delta_main.cc169 const string& public_key) {
173 LOG_IF(FATAL, public_key.empty())
174 << "Must pass --public_key to verify signed payload.";
175 CHECK(PayloadSigner::VerifySignedPayload(in_file, public_key));
293 DEFINE_string(public_key, "", "Path to public key in .pem format");
168 VerifySignedPayload(const string& in_file, const string& public_key) argument
/system/tpm/attestation/client/
H A Ddbus_proxy_test.cc111 reply_proto.set_public_key("public_key");
128 EXPECT_EQ("public_key", reply.public_key());
154 reply_proto.set_ek_public_key("public_key");
167 EXPECT_EQ("public_key", reply.ek_public_key());
190 reply_proto.set_public_key("public_key");
206 EXPECT_EQ("public_key", reply.public_key());
277 reply_proto.set_public_key("public_key");
291 EXPECT_EQ("public_key", repl
[all...]
H A Dmain.cc395 if (!crypto.EncryptForUnbind(key_info.public_key(), input, &output)) {
449 if (crypto.VerifySignature(key_info.public_key(), input, signature)) {
/system/bt/stack/smp/
H A Dsmp_keys.cc811 Point public_key; local
817 ECC_PointMult(&public_key, &(curve_p256.G), (uint32_t*)private_key,
819 memcpy(p_cb->loc_publ_key.x, public_key.x, BT_OCTET32_LEN);
820 memcpy(p_cb->loc_publ_key.y, public_key.y, BT_OCTET32_LEN);

Completed in 179 milliseconds