Searched defs:key_blob (Results 1 - 25 of 28) sorted by relevance

12

/system/security/keystore/
H A Dkeyblob_utils.cpp26 * to a hardware keymaster implementation, the first 4 bytes of the key_blob
49 uint8_t* add_softkey_header(uint8_t* key_blob, size_t key_blob_length) { argument
54 memcpy(key_blob, SOFT_KEY_MAGIC, sizeof(SOFT_KEY_MAGIC));
56 return key_blob + sizeof(SOFT_KEY_MAGIC);
59 bool is_softkey(const uint8_t* key_blob, const size_t key_blob_length) { argument
64 return !memcmp(key_blob, SOFT_KEY_MAGIC, sizeof(SOFT_KEY_MAGIC));
/system/keymaster/
H A Dauth_encrypted_key_blob.cpp34 KeymasterKeyBlob* key_blob) {
39 if (!key_blob->Reset(size))
42 uint8_t* buf = key_blob->writable_data();
43 const uint8_t* end = key_blob->key_material + key_blob->key_material_size;
51 if (buf != key_blob->key_material + key_blob->key_material_size)
57 static keymaster_error_t DeserializeUnversionedBlob(const KeymasterKeyBlob& key_blob, argument
62 const uint8_t* tmp = key_blob.key_material;
64 const uint8_t* end = tmp + key_blob
29 SerializeAuthEncryptedBlob(const KeymasterKeyBlob& encrypted_key_material, const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, const Buffer& nonce, const Buffer& tag, KeymasterKeyBlob* key_blob) argument
82 DeserializeAuthEncryptedBlob(const KeymasterKeyBlob& key_blob, KeymasterKeyBlob* encrypted_key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced, Buffer* nonce, Buffer* tag) argument
[all...]
H A Dec_keymaster0_key.cpp37 KeymasterKeyBlob* key_blob,
40 if (!key_blob || !hw_enforced || !sw_enforced)
44 return super::GenerateKey(key_description, key_blob, hw_enforced, sw_enforced);
64 return context_->CreateKeyBlob(key_description, KM_ORIGIN_UNKNOWN, key_material, key_blob,
36 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
H A Drsa_keymaster0_key.cpp37 KeymasterKeyBlob* key_blob,
40 if (!key_blob || !hw_enforced || !sw_enforced)
66 return context_->CreateKeyBlob(key_description, KM_ORIGIN_UNKNOWN, key_material, key_blob,
36 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
H A Dsymmetric_key.cpp35 KeymasterKeyBlob* key_blob,
38 if (!key_blob || !hw_enforced || !sw_enforced)
61 return context_->CreateKeyBlob(key_description, KM_ORIGIN_GENERATED, key_material, key_blob,
34 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
H A Dec_key_factory.cpp75 KeymasterKeyBlob* key_blob,
78 if (!key_blob || !hw_enforced || !sw_enforced)
123 return context_->CreateKeyBlob(authorizations, KM_ORIGIN_GENERATED, key_material, key_blob,
74 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
H A Dec_keymaster1_key.cpp65 KeymasterKeyBlob* key_blob,
70 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced);
64 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
H A Dopenssl_utils.cpp117 keymaster_error_t EvpKeyToKeyMaterial(const EVP_PKEY* pkey, KeymasterKeyBlob* key_blob) { argument
122 if (!key_blob->Reset(key_data_size))
125 uint8_t* tmp = key_blob->writable_data();
H A Drsa_key_factory.cpp53 KeymasterKeyBlob* key_blob,
56 if (!key_blob || !hw_enforced || !sw_enforced)
95 return context_->CreateKeyBlob(authorizations, KM_ORIGIN_GENERATED, key_material, key_blob,
52 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
H A Drsa_keymaster1_key.cpp86 KeymasterKeyBlob* key_blob,
91 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced);
85 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
H A Dintegrity_assured_key_blob.cpp84 KeymasterKeyBlob* key_blob) {
91 if (!key_blob->Reset(size))
94 uint8_t* p = key_blob->writable_data();
96 p = key_material.Serialize(p, key_blob->end());
97 p = hw_enforced.Serialize(p, key_blob->end());
98 p = sw_enforced.Serialize(p, key_blob->end());
100 return ComputeHmac(key_blob->key_material, p - key_blob->key_material, hidden, p);
103 keymaster_error_t DeserializeIntegrityAssuredBlob(const KeymasterKeyBlob& key_blob, argument
108 const uint8_t* p = key_blob
80 SerializeIntegrityAssuredBlob(const KeymasterKeyBlob& key_material, const AuthorizationSet& hidden, const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, KeymasterKeyBlob* key_blob) argument
127 DeserializeIntegrityAssuredBlob_NoHmacCheck(const KeymasterKeyBlob& key_blob, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) argument
[all...]
H A Dandroid_keymaster_messages.cpp26 static void set_key_blob(keymaster_key_blob_t* key_blob, const void* key_material, size_t length) { argument
27 delete[] key_blob->key_material;
28 key_blob->key_material = dup_buffer(key_material, length);
29 key_blob->key_material_size = length;
32 static size_t key_blob_size(const keymaster_key_blob_t& key_blob) { argument
33 return sizeof(uint32_t) /* key size */ + key_blob.key_material_size;
36 static uint8_t* serialize_key_blob(const keymaster_key_blob_t& key_blob, uint8_t* buf, argument
38 return append_size_and_data_to_buf(buf, end, key_blob.key_material, key_blob.key_material_size);
41 static bool deserialize_key_blob(keymaster_key_blob_t* key_blob, cons argument
[all...]
H A Dkeymaster0_engine.cpp104 uint8_t* key_blob = 0; local
105 if (keymaster0_device_->generate_keypair(keymaster0_device_, TYPE_RSA, &params, &key_blob,
110 unique_ptr<uint8_t, Malloc_Delete> key_blob_deleter(key_blob);
111 key_material->key_material = dup_buffer(key_blob, key_material->key_material_size);
120 uint8_t* key_blob = 0; local
121 if (keymaster0_device_->generate_keypair(keymaster0_device_, TYPE_EC, &params, &key_blob,
126 unique_ptr<uint8_t, Malloc_Delete> key_blob_deleter(key_blob);
127 key_material->key_material = dup_buffer(key_blob, key_material->key_material_size);
138 uint8_t* key_blob = 0;
140 to_import.key_material_size, &key_blob,
319 const keymaster_key_blob_t* key_blob = RsaKeyToBlob(rsa); local
363 const keymaster_key_blob_t* key_blob = EcKeyToBlob(ec_key); local
[all...]
H A Dkeymaster1_engine.cpp80 KeymasterKeyBlob* key_blob,
83 assert(key_blob);
92 key_blob->key_material = dup_buffer(blob.key_material, blob.key_material_size);
93 key_blob->key_material_size = blob.key_material_size;
79 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
H A Dkeymaster_enforcement.cpp395 bool KeymasterEnforcement::CreateKeyId(const keymaster_key_blob_t& key_blob, km_id_t* keyid) { argument
401 EVP_DigestUpdate(ctx.get(), key_blob.key_material, key_blob.key_material_size) &&
H A Dandroid_keymaster.cpp198 KeymasterKeyBlob key_blob; local
201 response->error = factory->GenerateKey(request.key_description, &key_blob,
204 response->key_blob = key_blob.release();
215 context_->ParseKeyBlob(KeymasterKeyBlob(request.key_blob), request.additional_params,
247 response->error = LoadKey(request.key_blob, request.additional_params, &hw_enforced,
270 if (!context_->enforcement_policy()->CreateKeyId(request.key_blob, &key_id))
366 context_->ParseKeyBlob(KeymasterKeyBlob(request.key_blob), request.additional_params,
400 response->error = LoadKey(request.key_blob, request.attest_params, &tee_enforced, &sw_enforced,
414 response->error = context_->UpgradeKeyBlob(KeymasterKeyBlob(request.key_blob),
433 KeymasterKeyBlob key_blob; local
458 LoadKey(const keymaster_key_blob_t& key_blob, const AuthorizationSet& additional_params, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced, const KeyFactory** factory, UniquePtr<Key>* key) argument
[all...]
H A Dandroid_keymaster_test_utils.h387 uint8_t** key_blob, size_t* key_blob_length) {
389 int result = device(dev)->generate_keypair(device(dev), key_type, key_params, key_blob,
392 munge_blob(*key_blob, *key_blob_length);
397 const size_t key_length, uint8_t** key_blob,
401 device(dev)->import_keypair(device(dev), key, key_length, key_blob, key_blob_length);
403 munge_blob(*key_blob, *key_blob_length);
408 const uint8_t* key_blob, const size_t key_blob_length,
411 std::unique_ptr<uint8_t[]> dup_blob(unmunge_blob(key_blob, key_blob_length));
416 static int counting_delete_keypair(const struct keymaster0_device* dev, const uint8_t* key_blob, argument
419 if (key_blob
385 counting_generate_keypair(const struct keymaster0_device* dev, const keymaster_keypair_t key_type, const void* key_params, uint8_t** key_blob, size_t* key_blob_length) argument
396 counting_import_keypair(const struct keymaster0_device* dev, const uint8_t* key, const size_t key_length, uint8_t** key_blob, size_t* key_blob_length) argument
407 counting_get_keypair_public(const struct keymaster0_device* dev, const uint8_t* key_blob, const size_t key_blob_length, uint8_t** x509_data, size_t* x509_data_length) argument
435 counting_sign_data(const struct keymaster0_device* dev, const void* signing_params, const uint8_t* key_blob, const size_t key_blob_length, const uint8_t* data, const size_t data_length, uint8_t** signed_data, size_t* signed_data_length) argument
445 counting_verify_data(const struct keymaster0_device* dev, const void* signing_params, const uint8_t* key_blob, const size_t key_blob_length, const uint8_t* signed_data, const size_t signed_data_length, const uint8_t* signature, const size_t signature_length) argument
[all...]
H A Dandroid_keymaster_test_utils.cpp810 keymaster_key_blob_t* key_blob,
818 return unwrap(dev)->generate_key(unwrap(dev), params, key_blob, characteristics);
823 const keymaster_key_blob_t* key_blob, const keymaster_blob_t* client_id,
826 return unwrap(dev)->get_key_characteristics(unwrap(dev), key_blob, client_id, app_data,
833 keymaster_key_blob_t* key_blob, keymaster_key_characteristics_t** characteristics) {
840 return unwrap(dev)->import_key(unwrap(dev), params, key_format, key_data, key_blob,
808 generate_key(const keymaster1_device_t* dev, const keymaster_key_param_set_t* params, keymaster_key_blob_t* key_blob, keymaster_key_characteristics_t** characteristics) argument
822 get_key_characteristics(const struct keymaster1_device* dev, const keymaster_key_blob_t* key_blob, const keymaster_blob_t* client_id, const keymaster_blob_t* app_data, keymaster_key_characteristics_t** characteristics) argument
831 import_key(const keymaster1_device_t* dev, const keymaster_key_param_set_t* params, keymaster_key_format_t key_format, const keymaster_blob_t* key_data, keymaster_key_blob_t* key_blob, keymaster_key_characteristics_t** characteristics) argument
/system/tpm/trunks/
H A Dblob_parser.cc28 std::string* key_blob) {
29 CHECK(key_blob) << "KeyBlob not defined.";
30 key_blob->clear();
34 TPM_RC result = Serialize_TPM2B_PUBLIC(public_info, key_blob);
39 result = Serialize_TPM2B_PRIVATE(private_info, key_blob);
47 bool BlobParser::ParseKeyBlob(const std::string& key_blob, argument
52 if (key_blob.empty()) {
57 std::string mutable_key_blob = key_blob;
26 SerializeKeyBlob(const TPM2B_PUBLIC& public_info, const TPM2B_PRIVATE& private_info, std::string* key_blob) argument
H A Dtrunks_client_test.cc107 std::string key_blob; local
111 kNoCreationPCR, session->GetDelegate(), &key_blob, nullptr);
117 result = utility->LoadKey(key_blob, session->GetDelegate(), &signing_key);
148 std::string key_blob; local
152 kNoCreationPCR, session->GetDelegate(), &key_blob, nullptr);
158 result = utility->LoadKey(key_blob, session->GetDelegate(), &decrypt_key);
178 std::string key_blob; local
182 prime_factor, key_authorization, session->GetDelegate(), &key_blob);
188 result = utility->LoadKey(key_blob, session->GetDelegate(), &key_handle);
206 std::string key_blob; local
247 std::string key_blob; local
431 std::string key_blob; local
558 std::string key_blob; local
738 std::string key_blob; local
1037 std::string key_blob; local
[all...]
H A Dtpm_utility_test.cc1188 std::string key_blob; local
1197 key_handle, new_password, &mock_authorization_delegate_, &key_blob));
1222 std::string key_blob; local
1230 EXPECT_CALL(mock_blob_parser_, SerializeKeyBlob(_, _, &key_blob))
1233 key_handle, new_password, &mock_authorization_delegate_, &key_blob));
1241 std::string key_blob; local
1257 &key_blob));
1353 std::string key_blob; local
1354 EXPECT_CALL(mock_blob_parser_, SerializeKeyBlob(_, _, &key_blob))
1363 &key_blob));
1375 std::string key_blob; local
1403 std::string key_blob; local
1423 std::string key_blob; local
1448 std::string key_blob; local
1459 std::string key_blob; local
1467 std::string key_blob; local
1478 std::string key_blob; local
1494 std::string key_blob; local
1504 std::string key_blob; local
1511 std::string key_blob; local
1518 std::string key_blob; local
[all...]
/system/security/softkeymaster/
H A Dkeymaster_openssl.cpp404 uint8_t** key_blob,
409 } else if (key_blob == NULL || key_blob_length == NULL) {
427 if (wrap_key(pkey.get(), EVP_PKEY_type(pkey->type), key_blob, key_blob_length)) {
435 const uint8_t* key_blob,
444 Unique_EVP_PKEY pkey(unwrap_key(key_blob, key_blob_length));
401 openssl_import_keypair(const keymaster0_device_t*, const uint8_t* key, const size_t key_length, uint8_t** key_blob, size_t* key_blob_length) argument
434 openssl_get_keypair_public(const keymaster0_device_t*, const uint8_t* key_blob, const size_t key_blob_length, uint8_t** x509_data, size_t* x509_data_length) argument
/system/tpm/attestation/common/
H A Dtpm_utility_v1.cc174 std::string* key_blob,
179 CHECK(key_blob && public_key && public_key_tpm_format && key_info && proof);
271 key_blob)) {
423 bool TpmUtilityV1::Unbind(const std::string& key_blob, argument
432 if (!LoadKeyFromBlob(key_blob, context_handle_, srk_handle_, &key_handle)) {
466 bool TpmUtilityV1::Sign(const std::string& key_blob, argument
475 if (!LoadKeyFromBlob(key_blob, context_handle_, srk_handle_, &key_handle)) {
642 bool TpmUtilityV1::LoadKeyFromBlob(const std::string& key_blob, argument
646 std::string mutable_key_blob(key_blob);
651 key_blob
170 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
[all...]
/system/tpm/attestation/server/
H A Dattestation_service.cc437 if (!tpm_utility_->Unbind(key.key_blob(), request.encrypted_data(), &data)) {
468 if (!tpm_utility_->Sign(key.key_blob(), request.data_to_sign(), &signature)) {
501 key.key_type(), key.key_usage(), key.key_blob(),
739 std::string key_blob; local
750 &key_blob,
757 key->set_key_blob(key_blob);
/system/keymaster/include/keymaster/
H A Dandroid_keymaster_messages.h274 key_blob.key_material = nullptr;
275 key_blob.key_material_size = 0;
283 keymaster_key_blob_t key_blob; member in struct:keymaster::GenerateKeyResponse
291 key_blob.key_material = nullptr;
292 key_blob.key_material_size = 0;
305 keymaster_key_blob_t key_blob; member in struct:keymaster::GetKeyCharacteristicsRequest
322 key_blob.key_material = nullptr;
323 key_blob.key_material_size = 0;
325 ~BeginOperationRequest() { delete[] key_blob.key_material; }
337 keymaster_key_blob_t key_blob; member in struct:keymaster::BeginOperationRequest
481 keymaster_key_blob_t key_blob; member in struct:keymaster::ImportKeyResponse
504 keymaster_key_blob_t key_blob; member in struct:keymaster::ExportKeyRequest
541 keymaster_key_blob_t key_blob; member in struct:keymaster::DeleteKeyRequest
605 keymaster_key_blob_t key_blob; member in struct:keymaster::AttestKeyRequest
640 keymaster_key_blob_t key_blob; member in struct:keymaster::UpgradeKeyRequest
[all...]

Completed in 295 milliseconds

12