Home
last modified time | relevance | path

Searched refs:key_slot (Results 1 – 13 of 13) sorted by relevance

/trusty/user/app/keymaster/
Dsecure_storage_manager.h83 keymaster_error_t WriteKeyToStorage(AttestationKeySlot key_slot,
90 KeymasterKeyBlob ReadKeyFromStorage(AttestationKeySlot key_slot,
97 keymaster_error_t AttestationKeyExists(AttestationKeySlot key_slot,
106 keymaster_error_t WriteCertToStorage(AttestationKeySlot key_slot,
116 AttestationKeySlot key_slot,
122 keymaster_error_t DeleteCertChainFromStorage(AttestationKeySlot key_slot);
130 keymaster_error_t WriteCertChainLength(AttestationKeySlot key_slot,
137 keymaster_error_t ReadCertChainLength(AttestationKeySlot key_slot,
199 keymaster_error_t DeleteKey(AttestationKeySlot key_slot, bool commit);
211 keymaster_error_t LegacyWriteKeyToStorage(AttestationKeySlot key_slot,
[all …]
Dtrusty_keymaster.cpp107 AttestationKeySlot key_slot; in SetAttestationKey() local
109 key_slot = keymaster_algorithm_to_key_slot(request.algorithm); in SetAttestationKey()
110 if (key_slot == AttestationKeySlot::kInvalid) { in SetAttestationKey()
118 response->error = ss_manager->WriteKeyToStorage(key_slot, key, key_size); in SetAttestationKey()
168 AttestationKeySlot key_slot = in SetWrappedAttestationKey() local
170 if (key_slot == AttestationKeySlot::kInvalid) { in SetWrappedAttestationKey()
201 key_slot, unwrapped_key.get(), unwrapped_key_size); in SetWrappedAttestationKey()
216 AttestationKeySlot key_slot; in ClearAttestationCertChain() local
218 key_slot = keymaster_algorithm_to_key_slot(request.algorithm); in ClearAttestationCertChain()
219 if (key_slot == AttestationKeySlot::kInvalid) { in ClearAttestationCertChain()
[all …]
Dsecure_storage_manager.cpp61 const char* GetKeySlotStr(AttestationKeySlot key_slot) { in GetKeySlotStr() argument
62 switch (key_slot) { in GetKeySlotStr()
138 AttestationKeySlot key_slot, in WriteKeyToStorage() argument
145 keymaster_error_t err = ReadAttestationKey(key_slot, &attestation_key_p); in WriteKeyToStorage()
155 err = WriteAttestationKey(key_slot, attestation_key.get(), true); in WriteKeyToStorage()
163 AttestationKeySlot key_slot, in ReadKeyFromStorage() argument
166 keymaster_error_t err = ReadAttestationKey(key_slot, &attestation_key_p); in ReadKeyFromStorage()
194 AttestationKeySlot key_slot, in AttestationKeyExists() argument
197 keymaster_error_t err = ReadAttestationKey(key_slot, &attestation_key_p); in AttestationKeyExists()
208 AttestationKeySlot key_slot, in WriteCertToStorage() argument
[all …]
Dtrusty_secure_deletion_secret_storage.h36 SecureDeletionData GetDataForKey(uint32_t key_slot) const override;
37 void DeleteKey(uint32_t key_slot) const override;
Dtrusty_secure_deletion_secret_storage.cpp606 retval.key_slot = *keySlot; in CreateDataForNewKey()
611 const uint32_t key_slot) const { in GetDataForKey()
621 retval.key_slot = key_slot; in GetDataForKey()
624 bool secureDeletionSecretRequested = (key_slot != 0); in GetDataForKey()
630 LOG_D("Need to read secure deletion secret from slot %u", retval.key_slot); in GetDataForKey()
647 storage_off_t keySlotBegin = retval.key_slot * kSecretSize; in GetDataForKey()
651 retval.key_slot, file->size()); in GetDataForKey()
657 file->ReadBlock(retval.key_slot * kSecretSize, kSecretSize); in GetDataForKey()
659 LOG_E("Failed to read secret from slot %u", retval.key_slot); in GetDataForKey()
672 void TrustySecureDeletionSecretStorage::DeleteKey(uint32_t key_slot) const { in DeleteKey()
[all …]
Dtrusty_keymaster_context.cpp449 secure_deletion_data ? secure_deletion_data->key_slot : 0); in CreateAuthEncryptedKeyBlob()
462 uint32_t key_slot) in KeySlotCleanup() argument
463 : storage_(storage), key_slot_(key_slot) {} in KeySlotCleanup()
502 sdd->secure_deletion_secret.buffer_size(), sdd->key_slot); in CreateKeyBlob()
509 uint32_t key_slot = sdd ? sdd->key_slot : 0; in CreateKeyBlob() local
510 bool has_secure_deletion = key_slot != 0; in CreateKeyBlob()
520 KeySlotCleanup key_slot_cleanup(secure_deletion_secret_storage_, key_slot); in CreateKeyBlob()
607 sdd ? sdd->key_slot : 0); in UpgradeKeyBlob()
711 deserialized_key->key_slot); in ParseKeyBlob()
732 (*key)->set_secure_deletion_slot(deserialized_key->key_slot); in ParseKeyBlob()
[all …]
/trusty/user/base/lib/sample/apploader_policy_engine/
Dapploader_policy_engine.cpp50 std::string key_slot{"com.android.trusty.apploader."}; in get_key() local
51 key_slot += op; in get_key()
52 key_slot += ".key."; in get_key()
53 key_slot += std::to_string(static_cast<unsigned>(key_id)); in get_key()
62 long rc = hwkey_get_keyslot_data(hwkey_session, key_slot.c_str(), key_bytes, in get_key()
/trusty/user/app/keymaster/host_unittest/
Dmain.cpp78 void TestKeyStorage(AttestationKeySlot key_slot) { in TestKeyStorage() argument
90 error = ss_manager->WriteKeyToStorage(key_slot, write_key.get(), DATA_SIZE); in TestKeyStorage()
93 key_blob = ss_manager->ReadKeyFromStorage(key_slot, &error); in TestKeyStorage()
99 error = ss_manager->AttestationKeyExists(key_slot, &key_exists); in TestKeyStorage()
106 void TestCertChainStorage(AttestationKeySlot key_slot, bool chain_exists) { in TestCertChainStorage() argument
120 error = ss_manager->WriteCertToStorage(key_slot, write_cert[i].get(), in TestCertChainStorage()
124 error = ss_manager->ReadCertChainLength(key_slot, &cert_chain_length); in TestCertChainStorage()
133 error = ss_manager->ReadCertChainFromStorage(key_slot, &chain); in TestCertChainStorage()
142 error = ss_manager->DeleteCertChainFromStorage(key_slot); in TestCertChainStorage()
145 error = ss_manager->ReadCertChainFromStorage(key_slot, &chain); in TestCertChainStorage()
[all …]
/trusty/user/app/keymaster/device_unittest/
Dmain.cpp72 AttestationKeySlot key_slot) { in TestKeyStorage() argument
81 error = ss_manager->WriteKeyToStorage(key_slot, write_key.get(), DATA_SIZE); in TestKeyStorage()
84 key_blob = ss_manager->ReadKeyFromStorage(key_slot, &error); in TestKeyStorage()
91 error = ss_manager->AttestationKeyExists(key_slot, &key_exists); in TestKeyStorage()
99 AttestationKeySlot key_slot, in TestCertChainStorage() argument
111 error = ss_manager->WriteCertToStorage(key_slot, write_cert[i].get(), in TestCertChainStorage()
115 error = ss_manager->ReadCertChainLength(key_slot, &cert_chain_length); in TestCertChainStorage()
124 error = ss_manager->ReadCertChainFromStorage(key_slot, &chain); in TestCertChainStorage()
137 AttestationKeySlot key_slot) { in TestCertStorageInvalid() argument
143 error = ss_manager->DeleteKey(key_slot, true); in TestCertStorageInvalid()
[all …]
/trusty/user/base/lib/apploader_package/
Dpackage.cpp54 std::string key_slot{"com.android.trusty.apploader."}; in get_key() local
55 key_slot += op; in get_key()
56 key_slot += ".key."; in get_key()
57 key_slot += std::to_string(static_cast<unsigned>(key_id)); in get_key()
66 long rc = hwkey_get_keyslot_data(hwkey_session, key_slot.c_str(), in get_key()
/trusty/user/app/sample/hwcrypto/
Dhwkey_srv.c55 const struct hwkey_keyslot* key_slot; member
81 static bool is_opaque_handle(const struct hwkey_keyslot* key_slot) { in is_opaque_handle() argument
82 assert(key_slot); in is_opaque_handle()
83 return key_slot->handler == get_key_handle; in is_opaque_handle()
143 if (entry->key_slot == slot) { in find_opaque_handle_for_slot()
167 entry->key_slot = slot; in insert_handle_node()
747 if (!is_allowed_to_read_opaque_key(uuid, entry->key_slot)) in get_opaque_key()
759 entry->key_slot->priv; in get_opaque_key()
/trusty/user/app/keymint/keys/
Dlegacy.rs102 encrypted_keyblob.key_slot, in convert_key()
318 if let Some(slot) = encrypted_keyblob.key_slot { in delete_legacy_key()
/trusty/user/app/keymint/
Dsecure_deletion_secret_manager.rs194 let key_slot = in find_empty_slot() localVariable
196 return Ok(Some(key_slot)); in find_empty_slot()