/system/keymaster/km_openssl/ |
D | asymmetric_key_factory.cpp | 41 keymaster_error_t AsymmetricKeyFactory::LoadKey(KeymasterKeyBlob&& key_material, in LoadKey() argument 51 const uint8_t* tmp = key_material.key_material; in LoadKey() 52 asym_key->key_material() = move(key_material); in LoadKey() 56 asym_key->key_material().key_material_size); in LoadKey()
|
D | symmetric_key.cpp | 50 KeymasterKeyBlob key_material(key_data_size); in GenerateKey() local 51 if (!key_material.key_material) in GenerateKey() 54 error = random_source_.GenerateRandom(key_material.writable_data(), key_data_size); in GenerateKey() 60 return blob_maker_.CreateKeyBlob(key_description, KM_ORIGIN_GENERATED, key_material, key_blob, in GenerateKey() 104 SymmetricKey::SymmetricKey(KeymasterKeyBlob&& key_material, in SymmetricKey() argument 108 key_material_ = move(key_material); in SymmetricKey()
|
D | wrapped_key.cpp | 49 if (!ASN1_OCTET_STRING_set(wrapped_key->transit_key, transit_key.key_material, in build_wrapped_key() 52 !ASN1_OCTET_STRING_set(wrapped_key->secure_key, secure_key.key_material, in build_wrapped_key() 92 const uint8_t* tmp = wrapped_key.key_material; in parse_wrapped_key() 103 if (record->transit_key->data && !transit_key->key_material) { in parse_wrapped_key() 108 if (record->secure_key->data && !secure_key->key_material) { in parse_wrapped_key()
|
D | openssl_utils.cpp | 102 const KeymasterKeyBlob& key_material, in KeyMaterialToEvpKey() argument 108 return convert_pkcs8_blob_to_evp(key_material.key_material, key_material.key_material_size, in KeyMaterialToEvpKey()
|
D | rsa_key_factory.cpp | 94 KeymasterKeyBlob key_material; in GenerateKey() local 95 keymaster_error_t error = EvpKeyToKeyMaterial(pkey.get(), &key_material); in GenerateKey() 99 return blob_maker_.CreateKeyBlob(authorizations, KM_ORIGIN_GENERATED, key_material, key_blob, in GenerateKey() 126 const KeymasterKeyBlob& key_material, in UpdateImportKeyDescription() argument 135 KeyMaterialToEvpKey(key_format, key_material, keymaster_key_type(), &pkey); in UpdateImportKeyDescription()
|
/system/keymaster/legacy_support/ |
D | keymaster0_engine.cpp | 80 KeymasterKeyBlob* key_material) const { in GenerateRsaKey() 81 assert(key_material); in GenerateRsaKey() 88 &key_material->key_material_size) < 0) { in GenerateRsaKey() 93 key_material->key_material = dup_buffer(key_blob, key_material->key_material_size); in GenerateRsaKey() 97 bool Keymaster0Engine::GenerateEcKey(uint32_t key_size, KeymasterKeyBlob* key_material) const { in GenerateEcKey() 98 assert(key_material); in GenerateEcKey() 104 &key_material->key_material_size) < 0) { in GenerateEcKey() 109 key_material->key_material = dup_buffer(key_blob, key_material->key_material_size); in GenerateEcKey() 121 if (keymaster0_device_->import_keypair(keymaster0_device_, to_import.key_material, in ImportKey() 128 imported_key->key_material = dup_buffer(key_blob, imported_key->key_material_size); in ImportKey() [all …]
|
D | ec_keymaster0_key.cpp | 53 KeymasterKeyBlob key_material; in GenerateKey() local 54 if (!engine_->GenerateEcKey(key_size, &key_material)) in GenerateKey() 64 return blob_maker_.CreateKeyBlob(key_description, KM_ORIGIN_UNKNOWN, key_material, key_blob, in GenerateKey() 100 keymaster_error_t EcdsaKeymaster0KeyFactory::LoadKey(KeymasterKeyBlob&& key_material, in LoadKey() argument 109 …return super::LoadKey(move(key_material), additional_params, move(hw_enforced), move(sw_enforced),… in LoadKey() 111 unique_ptr<EC_KEY, EC_KEY_Delete> ec_key(engine_->BlobToEcKey(key_material)); in LoadKey() 120 (*key)->key_material() = move(key_material); in LoadKey()
|
D | rsa_keymaster0_key.cpp | 55 KeymasterKeyBlob key_material; in GenerateKey() local 56 if (!engine_->GenerateRsaKey(public_exponent, key_size, &key_material)) in GenerateKey() 66 return blob_maker_.CreateKeyBlob(key_description, KM_ORIGIN_UNKNOWN, key_material, key_blob, in GenerateKey() 101 keymaster_error_t RsaKeymaster0KeyFactory::LoadKey(KeymasterKeyBlob&& key_material, in LoadKey() argument 110 return super::LoadKey(move(key_material), additional_params, move(hw_enforced), in LoadKey() 113 unique_ptr<RSA, RSA_Delete> rsa(engine_->BlobToRsaKey(key_material)); in LoadKey() 122 (*key)->key_material() = move(key_material); in LoadKey()
|
D | keymaster_passthrough_engine.cpp | 86 KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, 224 unique_ptr<uint8_t, Malloc_Delete> blob_deleter(const_cast<uint8_t*>(blob.key_material)); in GenerateKey() 225 key_blob->key_material = dup_buffer(blob.key_material, blob.key_material_size); in GenerateKey() 247 unique_ptr<uint8_t, Malloc_Delete> blob_deleter(const_cast<uint8_t*>(blob.key_material)); in GenerateKey() 248 key_blob->key_material = dup_buffer(blob.key_material, blob.key_material_size); in GenerateKey() 267 const keymaster_blob_t input_key = {input_key_material.key_material, in ImportKey() 275 unique_ptr<uint8_t, Malloc_Delete> blob_deleter(const_cast<uint8_t*>(blob.key_material)); in ImportKey() 296 const keymaster_blob_t input_key = {input_key_material.key_material, in ImportKey() 304 unique_ptr<uint8_t, Malloc_Delete> blob_deleter(const_cast<uint8_t*>(blob.key_material)); in ImportKey() 306 output_key_blob->key_material = dup_buffer(blob.key_material, blob.key_material_size); in ImportKey()
|
D | ec_keymaster1_key.cpp | 92 keymaster_error_t EcdsaKeymaster1KeyFactory::LoadKey(KeymasterKeyBlob&& key_material, in LoadKey() argument 102 engine_->BuildEcKey(key_material, additional_params, &error)); in LoadKey() 111 (*key)->key_material() = move(key_material); in LoadKey()
|
D | keymaster_passthrough_key.cpp | 23 KeymasterPassthroughKeyFactory::LoadKey(KeymasterKeyBlob&& key_material, in LoadKey() argument 32 key->reset(new (std::nothrow) KeymasterPassthroughKey(move(key_material), move(hw_enforced), in LoadKey() 74 keymaster_error_t error = engine_->ExportKey(format, key_material(), client_id, app_data, in formatted_key_material()
|
D | rsa_keymaster1_key.cpp | 101 keymaster_error_t RsaKeymaster1KeyFactory::LoadKey(KeymasterKeyBlob&& key_material, in LoadKey() argument 110 RSA_Ptr rsa(engine_->BuildRsaKey(key_material, additional_params, &error)); in LoadKey() 119 (*key)->key_material() = move(key_material); in LoadKey()
|
/system/keymaster/key_blob_utils/ |
D | integrity_assured_key_blob.cpp | 78 keymaster_error_t SerializeIntegrityAssuredBlob(const KeymasterKeyBlob& key_material, in SerializeIntegrityAssuredBlob() argument 84 key_material.SerializedSize() + // in SerializeIntegrityAssuredBlob() 94 p = key_material.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob() 98 return ComputeHmac(key_blob->key_material, p - key_blob->key_material, hidden, p); in SerializeIntegrityAssuredBlob() 103 KeymasterKeyBlob* key_material, in DeserializeIntegrityAssuredBlob() argument 121 return DeserializeIntegrityAssuredBlob_NoHmacCheck(key_blob, key_material, hw_enforced, in DeserializeIntegrityAssuredBlob() 126 KeymasterKeyBlob* key_material, in DeserializeIntegrityAssuredBlob_NoHmacCheck() argument 139 if (!key_material->Deserialize(&p, end) || // in DeserializeIntegrityAssuredBlob_NoHmacCheck()
|
D | auth_encrypted_key_blob.cpp | 43 const uint8_t* end = key_blob->key_material + key_blob->key_material_size; in SerializeAuthEncryptedBlob() 51 if (buf != key_blob->key_material + key_blob->key_material_size) in SerializeAuthEncryptedBlob() 62 const uint8_t* tmp = key_blob.key_material; in DeserializeUnversionedBlob() 87 if (!key_blob.key_material || key_blob.key_material_size == 0) in DeserializeAuthEncryptedBlob() 90 const uint8_t* tmp = key_blob.key_material; in DeserializeAuthEncryptedBlob()
|
D | software_keyblobs.cpp | 173 const KeymasterKeyBlob& blob, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, in ParseOldSoftkeymasterBlob() argument 177 const uint8_t* p = blob.key_material; in ParseOldSoftkeymasterBlob() 178 const uint8_t* end = blob.key_material + blob.key_material_size; in ParseOldSoftkeymasterBlob() 233 if (!key_material->Reset(privateLen)) in ParseOldSoftkeymasterBlob() 235 memcpy(key_material->writable_data(), key_start, privateLen); in ParseOldSoftkeymasterBlob() 245 KeymasterKeyBlob* key_material, in ParseOcbAuthEncryptedBlob() argument 259 nonce, tag, key_material); in ParseOcbAuthEncryptedBlob() 343 return SerializeIntegrityAssuredBlob(key->key_material(), hidden, key->hw_enforced(), in UpgradeSoftKeyBlob()
|
/system/keymaster/contexts/ |
D | soft_keymaster_context.cpp | 198 const KeymasterKeyBlob& key_material, in CreateKeyBlob() argument 212 return SerializeIntegrityAssuredBlob(key_material, hidden, *hw_enforced, *sw_enforced, blob); in CreateKeyBlob() 280 KeymasterKeyBlob key_material; in ParseKeyBlob() local 293 return factory->LoadKey(move(key_material), additional_params, move(hw_enforced), in ParseKeyBlob() 303 … error = DeserializeIntegrityAssuredBlob(blob, hidden, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob() 308 error = ParseOcbAuthEncryptedBlob(blob, hidden, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob() 315 error = ParseOldSoftkeymasterBlob(blob, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob() 322 error = ParseKeymaster1HwBlob(blob, additional_params, &key_material, &hw_enforced, in ParseKeyBlob() 325 error = ParseKeymaster0HwBlob(blob, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob() 337 KeymasterKeyBlob key_material; in DeleteKey() local [all …]
|
D | pure_soft_keymaster_context.cpp | 110 const KeymasterKeyBlob& key_material, in CreateKeyBlob() argument 162 return SerializeIntegrityAssuredBlob(key_material, hidden, *hw_enforced, *sw_enforced, blob); in CreateKeyBlob() 203 KeymasterKeyBlob key_material; in ParseKeyBlob() local 215 return factory->LoadKey(move(key_material), additional_params, move(hw_enforced), in ParseKeyBlob() 226 … error = DeserializeIntegrityAssuredBlob(blob, hidden, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob() 231 error = ParseOcbAuthEncryptedBlob(blob, hidden, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob() 238 error = ParseOldSoftkeymasterBlob(blob, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob() 348 if (!input.Reinitialize(transit_key.key_material, transit_key.key_material_size)) { in UnwrapKey() 357 KeymasterKeyBlob key_material = {output.peek_read(), output.available_read()}; in UnwrapKey() local 360 if (key_material.key_material_size != masking_key.key_material_size) { in UnwrapKey() [all …]
|
D | keymaster1_passthrough_context.cpp | 113 KeymasterKeyBlob* key_material, in parseKeymaster1HwBlob() argument 137 *key_material = blob; in parseKeymaster1HwBlob() 145 KeymasterKeyBlob key_material; in ParseKeyBlob() local 154 … error = DeserializeIntegrityAssuredBlob(blob, hidden, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob() 160 &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob() 172 return factory->LoadKey(move(key_material), additional_params, move(hw_enforced), in ParseKeyBlob() 181 KeymasterKeyBlob key_material; in DeleteKey() local 184 blob, &key_material, &hw_enforced, &sw_enforced); in DeleteKey() 215 const KeymasterKeyBlob& key_material, in CreateKeyBlob() argument 229 return SerializeIntegrityAssuredBlob(key_material, hidden, *hw_enforced, *sw_enforced, blob); in CreateKeyBlob()
|
/system/keymaster/android_keymaster/ |
D | android_keymaster_messages.cpp | 26 static void set_key_blob(keymaster_key_blob_t* key_blob, const void* key_material, size_t length) { in set_key_blob() argument 27 delete[] key_blob->key_material; in set_key_blob() 28 key_blob->key_material = dup_buffer(key_material, length); in set_key_blob() 38 return append_size_and_data_to_buf(buf, end, key_blob.key_material, key_blob.key_material_size); in serialize_key_blob() 43 delete[] key_blob->key_material; in deserialize_key_blob() 44 key_blob->key_material = nullptr; in deserialize_key_blob() 49 key_blob->key_material = deserialized_key_material.release(); in deserialize_key_blob() 94 delete[] key_blob.key_material; in ~GenerateKeyResponse() 113 delete[] key_blob.key_material; in ~GetKeyCharacteristicsRequest() 116 void GetKeyCharacteristicsRequest::SetKeyMaterial(const void* key_material, size_t length) { in SetKeyMaterial() argument [all …]
|
/system/keymaster/include/keymaster/key_blob_utils/ |
D | integrity_assured_key_blob.h | 29 keymaster_error_t SerializeIntegrityAssuredBlob(const KeymasterKeyBlob& key_material, 37 KeymasterKeyBlob* key_material, 42 KeymasterKeyBlob* key_material,
|
/system/keymaster/include/keymaster/ |
D | android_keymaster_messages.h | 285 key_blob.key_material = nullptr; in KeymasterResponse() 302 key_blob.key_material = nullptr; in KeymasterMessage() 307 void SetKeyMaterial(const void* key_material, size_t length); 309 SetKeyMaterial(blob.key_material, blob.key_material_size); in SetKeyMaterial() 333 key_blob.key_material = nullptr; in KeymasterMessage() 336 ~BeginOperationRequest() { delete[] key_blob.key_material; } in ~BeginOperationRequest() 338 void SetKeyMaterial(const void* key_material, size_t length); 340 SetKeyMaterial(blob.key_material, blob.key_material_size); in SetKeyMaterial() 465 void SetKeyMaterial(const void* key_material, size_t length); 467 SetKeyMaterial(blob.key_material, blob.key_material_size); in SetKeyMaterial() [all …]
|
/system/keymaster/include/keymaster/km_openssl/ |
D | aes_key.h | 37 keymaster_error_t LoadKey(KeymasterKeyBlob&& key_material, 55 AesKey(KeymasterKeyBlob&& key_material, AuthorizationSet&& hw_enforced, in AesKey() argument 58 : SymmetricKey(move(key_material), move(hw_enforced), move(sw_enforced), key_factory) {} in AesKey()
|
D | hmac_key.h | 34 keymaster_error_t LoadKey(KeymasterKeyBlob&& key_material, 53 HmacKey(KeymasterKeyBlob&& key_material, AuthorizationSet&& hw_enforced, in HmacKey() argument 55 : SymmetricKey(move(key_material), move(hw_enforced), move(sw_enforced), key_factory) {} in HmacKey()
|
D | triple_des_key.h | 34 keymaster_error_t LoadKey(KeymasterKeyBlob&& key_material, 54 TripleDesKey(KeymasterKeyBlob&& key_material, AuthorizationSet&& hw_enforced, in TripleDesKey() argument 56 : SymmetricKey(move(key_material), move(hw_enforced), move(sw_enforced), key_factory) {} in TripleDesKey()
|
/system/keymaster/include/keymaster/legacy_support/ |
D | keymaster1_legacy_support.h | 99 keymaster_error_t LoadKey(KeymasterKeyBlob&& key_material, in LoadKey() argument 111 return software_digest_factory_.LoadKey(move(key_material), additional_params, in LoadKey() 114 return passthrough_factory_.LoadKey(move(key_material), additional_params, in LoadKey() 152 Keymaster1ArbitrationFactory<EcdsaKeymaster1KeyFactory>::LoadKey(KeymasterKeyBlob&& key_material, 160 Keymaster1ArbitrationFactory<RsaKeymaster1KeyFactory>::LoadKey(KeymasterKeyBlob&& key_material,
|