Searched defs:key_material (Results 1 - 19 of 19) sorted by relevance

/system/keymaster/
H A Daes_key.cpp44 keymaster_error_t AesKeyFactory::LoadKey(const KeymasterKeyBlob& key_material, argument
65 key->reset(new (std::nothrow) AesKey(key_material, hw_enforced, sw_enforced, &error));
H A Daes_key.h35 keymaster_error_t LoadKey(const KeymasterKeyBlob& key_material,
53 AesKey(const KeymasterKeyBlob& key_material, const AuthorizationSet& hw_enforced, argument
55 : SymmetricKey(key_material, hw_enforced, sw_enforced, error) {}
H A Dasymmetric_key_factory.cpp41 keymaster_error_t AsymmetricKeyFactory::LoadKey(const KeymasterKeyBlob& key_material, argument
51 const uint8_t* tmp = key_material.key_material;
53 d2i_PrivateKey(evp_key_type(), NULL /* pkey */, &tmp, key_material.key_material_size);
H A Dhmac_key.cpp42 keymaster_error_t HmacKeyFactory::LoadKey(const KeymasterKeyBlob& key_material, argument
58 key->reset(new (std::nothrow) HmacKey(key_material, hw_enforced, sw_enforced, &error));
H A Dhmac_key.h30 keymaster_error_t LoadKey(const KeymasterKeyBlob& key_material,
49 HmacKey(const KeymasterKeyBlob& key_material, const AuthorizationSet& hw_enforced, argument
51 : SymmetricKey(key_material, hw_enforced, sw_enforced, error) {}
H A Dec_keymaster0_key.cpp53 KeymasterKeyBlob key_material; local
54 if (!engine_->GenerateEcKey(key_size, &key_material))
64 return context_->CreateKeyBlob(key_description, KM_ORIGIN_UNKNOWN, key_material, key_blob,
100 keymaster_error_t EcdsaKeymaster0KeyFactory::LoadKey(const KeymasterKeyBlob& key_material, argument
109 return super::LoadKey(key_material, additional_params, hw_enforced, sw_enforced, key);
111 unique_ptr<EC_KEY, EC_KEY_Delete> ec_key(engine_->BlobToEcKey(key_material));
H A Drsa_keymaster0_key.cpp55 KeymasterKeyBlob key_material; local
56 if (!engine_->GenerateRsaKey(public_exponent, key_size, &key_material))
66 return context_->CreateKeyBlob(key_description, KM_ORIGIN_UNKNOWN, key_material, key_blob,
101 keymaster_error_t RsaKeymaster0KeyFactory::LoadKey(const KeymasterKeyBlob& key_material, argument
110 return super::LoadKey(key_material, additional_params, hw_enforced, sw_enforced, key);
112 unique_ptr<RSA, RSA_Delete> rsa(engine_->BlobToRsaKey(key_material));
H A Dsymmetric_key.cpp51 KeymasterKeyBlob key_material(key_data_size);
52 if (!key_material.key_material)
55 error = context_->GenerateRandom(key_material.writable_data(), key_data_size);
61 return context_->CreateKeyBlob(key_description, KM_ORIGIN_GENERATED, key_material, key_blob,
110 SymmetricKey::SymmetricKey(const KeymasterKeyBlob& key_material, argument
117 uint8_t* tmp = dup_buffer(key_material.key_material, key_material.key_material_size);
120 key_data_size_ = key_material
131 key_material(UniquePtr<uint8_t[]>* key_material, size_t* size) const argument
[all...]
H A Dec_key_factory.cpp118 KeymasterKeyBlob key_material;
119 error = EvpKeyToKeyMaterial(pkey.get(), &key_material);
123 return context_->CreateKeyBlob(authorizations, KM_ORIGIN_GENERATED, key_material, key_blob,
149 const KeymasterKeyBlob& key_material,
157 KeyMaterialToEvpKey(key_format, key_material, keymaster_key_type(), &pkey);
147 UpdateImportKeyDescription(const AuthorizationSet& key_description, keymaster_key_format_t key_format, const KeymasterKeyBlob& key_material, AuthorizationSet* updated_description, uint32_t* key_size_bits) const argument
H A Dec_keymaster1_key.cpp83 keymaster_error_t EcdsaKeymaster1KeyFactory::LoadKey(const KeymasterKeyBlob& key_material, argument
93 engine_->BuildEcKey(key_material, additional_params, &error));
H A Dkeymaster1_engine.h47 KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced,
60 : op_handle(0), begin_params(params), key_material(blob), error(KM_ERROR_OK),
66 KeymasterKeyBlob key_material; member in struct:keymaster::Keymaster1Engine::KeyData
H A Dopenssl_utils.cpp107 const KeymasterKeyBlob& key_material,
113 return convert_pkcs8_blob_to_evp(key_material.key_material, key_material.key_material_size,
106 KeyMaterialToEvpKey(keymaster_key_format_t key_format, const KeymasterKeyBlob& key_material, keymaster_algorithm_t expected_algorithm, UniquePtr<EVP_PKEY, EVP_PKEY_Delete>* pkey) argument
H A Drsa_key_factory.cpp90 KeymasterKeyBlob key_material;
91 keymaster_error_t error = EvpKeyToKeyMaterial(pkey.get(), &key_material);
95 return context_->CreateKeyBlob(authorizations, KM_ORIGIN_GENERATED, key_material, key_blob,
122 const KeymasterKeyBlob& key_material,
131 KeyMaterialToEvpKey(key_format, key_material, keymaster_key_type(), &pkey);
120 UpdateImportKeyDescription(const AuthorizationSet& key_description, keymaster_key_format_t key_format, const KeymasterKeyBlob& key_material, AuthorizationSet* updated_description, uint64_t* public_exponent, uint32_t* key_size) const argument
H A Drsa_keymaster1_key.cpp104 keymaster_error_t RsaKeymaster1KeyFactory::LoadKey(const KeymasterKeyBlob& key_material, argument
113 unique_ptr<RSA, RSA_Delete> rsa(engine_->BuildRsaKey(key_material, additional_params, &error));
H A Dintegrity_assured_key_blob.cpp80 keymaster_error_t SerializeIntegrityAssuredBlob(const KeymasterKeyBlob& key_material, argument
86 key_material.SerializedSize() + //
96 p = key_material.Serialize(p, key_blob->end());
100 return ComputeHmac(key_blob->key_material, p - key_blob->key_material, hidden, p);
105 KeymasterKeyBlob* key_material,
123 return DeserializeIntegrityAssuredBlob_NoHmacCheck(key_blob, key_material, hw_enforced,
128 KeymasterKeyBlob* key_material,
141 if (!key_material->Deserialize(&p, end) || //
103 DeserializeIntegrityAssuredBlob(const KeymasterKeyBlob& key_blob, const AuthorizationSet& hidden, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) argument
127 DeserializeIntegrityAssuredBlob_NoHmacCheck(const KeymasterKeyBlob& key_blob, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) argument
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);
38 return append_size_and_data_to_buf(buf, end, key_blob.key_material, key_blob.key_material_size);
43 delete[] key_blob->key_material;
44 key_blob->key_material = 0;
49 key_blob->key_material = deserialized_key_material.release();
76 delete[] key_blob.key_material;
95 delete[] key_blob.key_material;
98 SetKeyMaterial(const void* key_material, size_t length) argument
130 SetKeyMaterial(const void* key_material, size_t length) argument
307 SetKeyMaterial(const void* key_material, size_t length) argument
336 SetKeyMaterial(const void* key_material, size_t length) argument
355 SetKeyMaterial(const void* key_material, size_t length) argument
376 SetKeyMaterial(const void* key_material, size_t length) argument
400 SetKeyMaterial(const void* key_material, size_t length) argument
446 SetKeyMaterial(const void* key_material, size_t length) argument
530 SetKeyMaterial(const void* key_material, size_t length) argument
[all...]
H A Dandroid_keymaster.cpp213 KeymasterKeyBlob key_material;
216 &key_material, &response->enforced, &response->unenforced);
364 KeymasterKeyBlob key_material; local
367 &key_material, &hw_enforced, &sw_enforced);
378 response->error = key_factory->LoadKey(key_material, request.additional_params, hw_enforced,
432 keymaster_key_blob_t key_material = {request.key_data, request.key_data_length}; local
435 KeymasterKeyBlob(key_material), &key_blob,
463 KeymasterKeyBlob key_material; local
465 &key_material, hw_enforced, sw_enforced);
478 return (*factory)->LoadKey(key_material, additional_param
[all...]
H A Dsoft_keymaster_context.cpp451 const KeymasterKeyBlob& key_material,
465 return SerializeIntegrityAssuredBlob(key_material, hidden, *hw_enforced, *sw_enforced, blob);
471 KeymasterKeyBlob key_material; local
475 ParseKeyBlob(key_to_upgrade, upgrade_params, &key_material, &tee_enforced, &sw_enforced);
524 return SerializeIntegrityAssuredBlob(key_material, hidden, tee_enforced, sw_enforced,
530 KeymasterKeyBlob* key_material,
544 nonce, tag, key_material);
552 const KeymasterKeyBlob& blob, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced,
556 const uint8_t* p = blob.key_material;
557 const uint8_t* end = blob.key_material
449 CreateKeyBlob(const AuthorizationSet& key_description, const keymaster_key_origin_t origin, const KeymasterKeyBlob& key_material, KeymasterKeyBlob* blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
528 ParseOcbAuthEncryptedBlob(const KeymasterKeyBlob& blob, const AuthorizationSet& hidden, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) argument
551 ParseOldSoftkeymasterBlob( const KeymasterKeyBlob& blob, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
623 ParseKeyBlob(const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
716 KeymasterKeyBlob key_material; local
862 ParseKeymaster1HwBlob( const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
894 ParseKeymaster0HwBlob(const KeymasterKeyBlob& blob, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
[all...]
H A Dandroid_keymaster_test_utils.cpp174 blob_.key_material = nullptr;
176 blob_.key_material = 0;
206 const string& key_material) {
213 keymaster_blob_t key = {reinterpret_cast<const uint8_t*>(key_material.c_str()),
214 key_material.length()};
669 free(const_cast<uint8_t*>(blob_.key_material));
670 blob_.key_material = NULL;
674 assert(blob_.key_material);
675 uint8_t* tmp = const_cast<uint8_t*>(blob_.key_material);
204 ImportKey(const AuthorizationSetBuilder& builder, keymaster_key_format_t format, const string& key_material) argument

Completed in 141 milliseconds