Searched defs:key_blob (Results 1 - 25 of 34) 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.cpp430 bool KeymasterEnforcement::CreateKeyId(const hidl_vec<uint8_t>& key_blob, km_id_t* keyid) { argument
436 EVP_DigestUpdate(ctx.get(), &key_blob[0], key_blob.size()) &&
/system/keymaster/key_blob_utils/
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 Dintegrity_assured_key_blob.cpp83 KeymasterKeyBlob* key_blob) {
90 if (!key_blob->Reset(size))
93 uint8_t* p = key_blob->writable_data();
95 p = key_material.Serialize(p, key_blob->end());
96 p = hw_enforced.Serialize(p, key_blob->end());
97 p = sw_enforced.Serialize(p, key_blob->end());
99 return ComputeHmac(key_blob->key_material, p - key_blob->key_material, hidden, p);
102 keymaster_error_t DeserializeIntegrityAssuredBlob(const KeymasterKeyBlob& key_blob, argument
107 const uint8_t* p = key_blob
79 SerializeIntegrityAssuredBlob(const KeymasterKeyBlob& key_material, const AuthorizationSet& hidden, const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, KeymasterKeyBlob* key_blob) argument
126 DeserializeIntegrityAssuredBlob_NoHmacCheck(const KeymasterKeyBlob& key_blob, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) 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/keymaster/km_openssl/
H A Dsymmetric_key.cpp34 KeymasterKeyBlob* key_blob,
37 if (!key_blob || !hw_enforced || !sw_enforced)
60 return blob_maker_.CreateKeyBlob(key_description, KM_ORIGIN_GENERATED, key_material, key_blob,
33 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
H A Dopenssl_utils.cpp112 keymaster_error_t EvpKeyToKeyMaterial(const EVP_PKEY* pkey, KeymasterKeyBlob* key_blob) { argument
117 if (!key_blob->Reset(key_data_size))
120 uint8_t* tmp = key_blob->writable_data();
H A Drsa_key_factory.cpp53 KeymasterKeyBlob* key_blob,
56 if (!key_blob || !hw_enforced || !sw_enforced)
99 return blob_maker_.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 Dec_key_factory.cpp75 KeymasterKeyBlob* key_blob,
78 if (!key_blob || !hw_enforced || !sw_enforced)
123 return blob_maker_.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 Dsoft_keymaster_enforcement.cpp65 bool SoftKeymasterEnforcement::CreateKeyId(const keymaster_key_blob_t& key_blob, argument
72 EVP_DigestUpdate(ctx.get(), key_blob.key_material, key_blob.key_material_size) &&
/system/keymaster/legacy_support/
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 blob_maker_.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 blob_maker_.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 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 Drsa_keymaster1_key.cpp83 KeymasterKeyBlob* key_blob,
88 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced);
82 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
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.cpp79 KeymasterKeyBlob* key_blob,
82 assert(key_blob);
91 key_blob->key_material = dup_buffer(blob.key_material, blob.key_material_size);
92 key_blob->key_material_size = blob.key_material_size;
78 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
H A Dkeymaster1_legacy_support.cpp205 KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced,
208 return software_digest_factory_.GenerateKey(key_description, key_blob, hw_enforced,
231 return passthrough_factory_.GenerateKey(mutable_key_description, key_blob, hw_enforced,
203 GenerateKey( const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
H A Dkeymaster_passthrough_engine.cpp213 KeymasterKeyBlob* key_blob,
216 assert(key_blob);
225 key_blob->key_material = dup_buffer(blob.key_material, blob.key_material_size);
226 key_blob->key_material_size = blob.key_material_size;
236 KeymasterKeyBlob* key_blob,
239 assert(key_blob);
248 key_blob->key_material = dup_buffer(blob.key_material, blob.key_material_size);
249 key_blob->key_material_size = blob.key_material_size;
212 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
235 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
/system/keymaster/include/keymaster/legacy_support/
H A Dkeymaster1_legacy_support.h70 KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced,
73 return software_digest_factory_.GenerateKey(key_description, key_blob, hw_enforced,
76 return passthrough_factory_.GenerateKey(key_description, key_blob, hw_enforced,
138 KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced,
69 GenerateKey(const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
/system/keymaster/android_keymaster/
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 Dandroid_keymaster.cpp228 KeymasterKeyBlob key_blob; local
231 response->error = factory->GenerateKey(request.key_description, &key_blob,
234 response->key_blob = key_blob.release();
245 context_->ParseKeyBlob(KeymasterKeyBlob(request.key_blob), request.additional_params,
265 response->error = LoadKey(request.key_blob, request.additional_params, &key_factory, &key);
285 if (!context_->enforcement_policy()->CreateKeyId(request.key_blob, &key_id)) return;
377 context_->ParseKeyBlob(KeymasterKeyBlob(request.key_blob), request.additional_params, &key);
396 response->error = LoadKey(request.key_blob, request.attest_params,
423 response->error = context_->UpgradeKeyBlob(KeymasterKeyBlob(request.key_blob),
442 KeymasterKeyBlob key_blob; local
473 LoadKey(const keymaster_key_blob_t& key_blob, const AuthorizationSet& additional_params, const KeyFactory** factory, UniquePtr<Key>* key) argument
522 KeymasterKeyBlob key_blob; local
[all...]
/system/vold/
H A DKeymaster.cpp268 uint32_t ratelimit, const uint8_t* key_blob,
279 std::string old_key(reinterpret_cast<const char*>(key_blob), key_blob_size);
288 const uint8_t* key_blob, size_t key_blob_size, uint32_t ratelimit, const uint8_t* object,
295 if (!key_blob || !object || !signature_buffer || !signature_buffer_size) {
301 std::string key(reinterpret_cast<const char*>(key_blob), key_blob_size);
267 keymaster_upgrade_key_for_cryptfs_scrypt(uint32_t rsa_key_size, uint64_t rsa_exponent, uint32_t ratelimit, const uint8_t* key_blob, size_t key_blob_size, uint8_t* key_buffer, uint32_t key_buffer_size, uint32_t* key_out_size) argument
287 keymaster_sign_object_for_cryptfs_scrypt( const uint8_t* key_blob, size_t key_blob_size, uint32_t ratelimit, const uint8_t* object, const size_t object_size, uint8_t** signature_buffer, size_t* signature_buffer_size) argument
/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.cpp211 const keymaster_key_param_set_t* params, keymaster_key_blob_t* key_blob,
221 if (!key_blob) {
235 key_blob->key_material_size = response.key_blob.key_material_size;
236 key_blob->key_material =
237 DuplicateBuffer(response.key_blob.key_material, response.key_blob.key_material_size);
238 if (!key_blob->key_material) {
251 const keymaster_key_blob_t* key_blob, const keymaster_blob_t* client_id,
258 if (!key_blob || !key_blo
210 generate_key( const keymaster_key_param_set_t* params, keymaster_key_blob_t* key_blob, keymaster_key_characteristics_t* characteristics) argument
250 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
281 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
671 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
678 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
687 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/keymaster/tests/
H A Dandroid_keymaster_test_utils.h410 uint8_t** key_blob, size_t* key_blob_length) {
412 int result = device(dev)->generate_keypair(device(dev), key_type, key_params, key_blob,
415 munge_blob(*key_blob, *key_blob_length);
420 const size_t key_length, uint8_t** key_blob,
424 device(dev)->import_keypair(device(dev), key, key_length, key_blob, key_blob_length);
426 munge_blob(*key_blob, *key_blob_length);
431 const uint8_t* key_blob, const size_t key_blob_length,
434 std::unique_ptr<uint8_t[]> dup_blob(unmunge_blob(key_blob, key_blob_length));
439 static int counting_delete_keypair(const struct keymaster0_device* dev, const uint8_t* key_blob, argument
442 if (key_blob
408 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
419 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
430 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
458 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
468 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...]

Completed in 6777 milliseconds

12