Searched defs:key_blob (Results 1 - 25 of 32) 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));
H A Dkeymaster_enforcement.cpp406 bool KeymasterEnforcement::CreateKeyId(const hidl_vec<uint8_t>& key_blob, km_id_t* keyid) { argument
412 EVP_DigestUpdate(ctx.get(), &key_blob[0], key_blob.size()) &&
H A Dlegacy_keymaster_device_wrapper.cpp219 keymaster_key_blob_t key_blob{nullptr, 0};
225 auto rc = keymaster_device_->generate_key(keymaster_device_, &kmParams, &key_blob,
230 resultKeyBlob = kmBlob2hidlVec(key_blob);
239 if (key_blob.key_material) free(const_cast<uint8_t*>(key_blob.key_material));
284 keymaster_key_blob_t key_blob{nullptr, 0};
292 &key_blob, &key_characteristics);
296 resultKeyBlob = kmBlob2hidlVec(key_blob);
304 if (key_blob.key_material) free(const_cast<uint8_t*>(key_blob
398 keymaster_key_blob_t key_blob = {}; local
[all...]
/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_keymaster1_key.cpp65 KeymasterKeyBlob* key_blob,
79 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.cpp111 keymaster_error_t EvpKeyToKeyMaterial(const EVP_PKEY* pkey, KeymasterKeyBlob* key_blob) { argument
116 if (!key_blob->Reset(key_data_size))
119 uint8_t* tmp = key_blob->writable_data();
H A Drsa_key_factory.cpp55 KeymasterKeyBlob* key_blob,
58 if (!key_blob || !hw_enforced || !sw_enforced)
101 return context_->CreateKeyBlob(authorizations, KM_ORIGIN_GENERATED, key_material, key_blob,
54 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 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 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.cpp86 uint8_t* key_blob = 0; local
87 if (keymaster0_device_->generate_keypair(keymaster0_device_, TYPE_RSA, &params, &key_blob,
92 unique_ptr<uint8_t, Malloc_Delete> key_blob_deleter(key_blob);
93 key_material->key_material = dup_buffer(key_blob, key_material->key_material_size);
102 uint8_t* key_blob = 0; local
103 if (keymaster0_device_->generate_keypair(keymaster0_device_, TYPE_EC, &params, &key_blob,
108 unique_ptr<uint8_t, Malloc_Delete> key_blob_deleter(key_blob);
109 key_material->key_material = dup_buffer(key_blob, key_material->key_material_size);
120 uint8_t* key_blob = 0;
122 to_import.key_material_size, &key_blob,
301 const keymaster_key_blob_t* key_blob = RsaKeyToBlob(rsa); local
345 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.cpp404 bool KeymasterEnforcement::CreateKeyId(const keymaster_key_blob_t& key_blob, km_id_t* keyid) { argument
410 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,
420 response->error = context_->UpgradeKeyBlob(KeymasterKeyBlob(request.key_blob),
439 KeymasterKeyBlob key_blob; local
470 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.h394 uint8_t** key_blob, size_t* key_blob_length) {
396 int result = device(dev)->generate_keypair(device(dev), key_type, key_params, key_blob,
399 munge_blob(*key_blob, *key_blob_length);
404 const size_t key_length, uint8_t** key_blob,
408 device(dev)->import_keypair(device(dev), key, key_length, key_blob, key_blob_length);
410 munge_blob(*key_blob, *key_blob_length);
415 const uint8_t* key_blob, const size_t key_blob_length,
418 std::unique_ptr<uint8_t[]> dup_blob(unmunge_blob(key_blob, key_blob_length));
423 static int counting_delete_keypair(const struct keymaster0_device* dev, const uint8_t* key_blob, argument
426 if (key_blob
392 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
403 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
414 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
442 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
452 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...]
/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
/system/vold/
H A DKeymaster.cpp255 int keymaster_sign_object_for_cryptfs_scrypt(const uint8_t* key_blob, argument
268 if (!key_blob || !object || !signature_buffer || !signature_buffer_size) {
274 std::string key(reinterpret_cast<const char*>(key_blob), key_blob_size);
/system/vold/tests/
H A DCryptfsScryptHidlizationEquivalence_test.cpp181 keymaster_key_blob_t key_blob; local
183 &key_blob,
191 key = (uint8_t*)key_blob.key_material;
192 key_size = key_blob.key_material_size;
/system/core/trusty/keymaster/
H A Dtrusty_keymaster_device.cpp209 const keymaster_key_param_set_t* params, keymaster_key_blob_t* key_blob,
219 if (!key_blob) {
233 key_blob->key_material_size = response.key_blob.key_material_size;
234 key_blob->key_material =
235 DuplicateBuffer(response.key_blob.key_material, response.key_blob.key_material_size);
236 if (!key_blob->key_material) {
249 const keymaster_key_blob_t* key_blob, const keymaster_blob_t* client_id,
256 if (!key_blob || !key_blo
208 generate_key( const keymaster_key_param_set_t* params, keymaster_key_blob_t* key_blob, keymaster_key_characteristics_t* characteristics) argument
248 get_key_characteristics( 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
279 import_key( 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
667 generate_key( const keymaster2_device_t* dev, const keymaster_key_param_set_t* params, keymaster_key_blob_t* key_blob, keymaster_key_characteristics_t* characteristics) argument
674 get_key_characteristics( const keymaster2_device_t* 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
683 import_key( const keymaster2_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
[all...]
/system/security/softkeymaster/
H A Dkeymaster_openssl.cpp398 uint8_t** key_blob,
403 } else if (key_blob == NULL || key_blob_length == NULL) {
421 if (wrap_key(pkey.get(), EVP_PKEY_type(pkey->type), key_blob, key_blob_length)) {
429 const uint8_t* key_blob,
438 Unique_EVP_PKEY pkey(unwrap_key(key_blob, key_blob_length));
395 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
428 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.cc167 std::string* key_blob,
172 CHECK(key_blob && public_key && public_key_tpm_format && key_info && proof);
253 TSS_TSPATTRIB_KEYBLOB_BLOB, key_blob)) {
392 bool TpmUtilityV1::Unbind(const std::string& key_blob, argument
401 if (!LoadKeyFromBlob(key_blob, context_handle_, srk_handle_, &key_handle)) {
432 bool TpmUtilityV1::Sign(const std::string& key_blob, argument
441 if (!LoadKeyFromBlob(key_blob, context_handle_, srk_handle_, &key_handle)) {
598 bool TpmUtilityV1::LoadKeyFromBlob(const std::string& key_blob, argument
602 std::string mutable_key_blob(key_blob);
605 context_handle, parent_key_handle, key_blob
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
[all...]

Completed in 251 milliseconds

12