/aosp12/system/keymaster/include/keymaster/contexts/ |
H A D | soft_keymaster_context.h | 71 keymaster_error_t UpgradeKeyBlob(const KeymasterKeyBlob& key_to_upgrade, 73 KeymasterKeyBlob* upgraded_key) const override; 74 keymaster_error_t ParseKeyBlob(const KeymasterKeyBlob& blob, 77 keymaster_error_t DeleteKey(const KeymasterKeyBlob& blob) const override; 91 UnwrapKey(const KeymasterKeyBlob& wrapped_key_blob, const KeymasterKeyBlob& wrapping_key_blob, 92 const AuthorizationSet& wrapping_key_params, const KeymasterKeyBlob& masking_key, 94 KeymasterKeyBlob* wrapped_key_material) const override; 105 const KeymasterKeyBlob& key_material, KeymasterKeyBlob* blob, 111 keymaster_error_t ParseKeymaster1HwBlob(const KeymasterKeyBlob& blob, 113 KeymasterKeyBlob* key_material,
|
H A D | keymaster1_passthrough_context.h | 71 keymaster_error_t UpgradeKeyBlob(const KeymasterKeyBlob& key_to_upgrade, 73 KeymasterKeyBlob* upgraded_key) const override; 82 keymaster_error_t ParseKeyBlob(const KeymasterKeyBlob& blob, 90 keymaster_error_t DeleteKey(const KeymasterKeyBlob& /* blob */) const override; 126 const KeymasterKeyBlob& key_material, KeymasterKeyBlob* blob, 131 UnwrapKey(const KeymasterKeyBlob& wrapped_key_blob, const KeymasterKeyBlob& wrapping_key_blob, 132 const AuthorizationSet& wrapping_key_params, const KeymasterKeyBlob& masking_key, 134 KeymasterKeyBlob* wrapped_key_material) const override;
|
H A D | keymaster2_passthrough_context.h | 65 keymaster_error_t UpgradeKeyBlob(const KeymasterKeyBlob& key_to_upgrade, 67 KeymasterKeyBlob* upgraded_key) const override; 76 keymaster_error_t ParseKeyBlob(const KeymasterKeyBlob& blob, 84 keymaster_error_t DeleteKey(const KeymasterKeyBlob& /* blob */) const override; 119 UnwrapKey(const KeymasterKeyBlob& wrapped_key_blob, const KeymasterKeyBlob& wrapping_key_blob, 120 const AuthorizationSet& wrapping_key_params, const KeymasterKeyBlob& masking_key, 122 KeymasterKeyBlob* wrapped_key_material) const override;
|
H A D | pure_soft_keymaster_context.h | 65 keymaster_error_t UpgradeKeyBlob(const KeymasterKeyBlob& key_to_upgrade, 67 KeymasterKeyBlob* upgraded_key) const override; 68 keymaster_error_t ParseKeyBlob(const KeymasterKeyBlob& blob, 71 keymaster_error_t DeleteKey(const KeymasterKeyBlob& blob) const override; 119 const KeymasterKeyBlob& key_material, KeymasterKeyBlob* blob, 124 UnwrapKey(const KeymasterKeyBlob& wrapped_key_blob, const KeymasterKeyBlob& wrapping_key_blob, 125 const AuthorizationSet& wrapping_key_params, const KeymasterKeyBlob& masking_key, 127 KeymasterKeyBlob* wrapped_key_material) const override;
|
/aosp12/system/keymaster/include/keymaster/key_blob_utils/ |
H A D | integrity_assured_key_blob.h | 26 typedef TKeymasterBlob<keymaster_key_blob_t> KeymasterKeyBlob; typedef 28 keymaster_error_t SerializeIntegrityAssuredBlob(const KeymasterKeyBlob& key_material, 32 KeymasterKeyBlob* key_blob); 34 keymaster_error_t DeserializeIntegrityAssuredBlob(const KeymasterKeyBlob& key_blob, 36 KeymasterKeyBlob* key_material, 40 keymaster_error_t DeserializeIntegrityAssuredBlob_NoHmacCheck(const KeymasterKeyBlob& key_blob, 41 KeymasterKeyBlob* key_material,
|
H A D | ocb_utils.h | 29 typedef TKeymasterBlob<keymaster_key_blob_t> KeymasterKeyBlob; typedef 36 const KeymasterKeyBlob& master_key, 37 const KeymasterKeyBlob& plaintext, const Buffer& nonce, 38 KeymasterKeyBlob* ciphertext, Buffer* tag); 42 const KeymasterKeyBlob& master_key, 43 const KeymasterKeyBlob& ciphertext, const Buffer& nonce, 44 const Buffer& tag, KeymasterKeyBlob* plaintext);
|
H A D | auth_encrypted_key_blob.h | 48 KeymasterKeyBlob ciphertext; 63 EncryptedKey EncryptKey(const KeymasterKeyBlob& plaintext, AuthEncryptedBlobFormat format, 65 const AuthorizationSet& hidden, const KeymasterKeyBlob& master_key, 72 KeymasterKeyBlob SerializeAuthEncryptedBlob(const EncryptedKey& encrypted_key, 81 DeserializedKey DeserializeAuthEncryptedBlob(const KeymasterKeyBlob& key_blob, 87 KeymasterKeyBlob DecryptKey(const DeserializedKey& key, const AuthorizationSet& hidden, 88 const KeymasterKeyBlob& master_key, keymaster_error_t* error);
|
H A D | software_keyblobs.h | 29 typedef TKeymasterBlob<keymaster_key_blob_t> KeymasterKeyBlob; typedef 42 keymaster_error_t ParseOldSoftkeymasterBlob(const KeymasterKeyBlob& blob, 43 KeymasterKeyBlob* key_material, 47 keymaster_error_t ParseAuthEncryptedBlob(const KeymasterKeyBlob& blob, 49 KeymasterKeyBlob* key_material, 66 KeymasterKeyBlob* upgraded_key); 73 KeymasterKeyBlob* upgraded_key);
|
/aosp12/system/keymaster/contexts/ |
H A D | keymaster1_passthrough_context.cpp | 100 Keymaster1PassthroughContext::UpgradeKeyBlob(const KeymasterKeyBlob& key_to_upgrade, in UpgradeKeyBlob() 102 KeymasterKeyBlob* upgraded_key) const { in UpgradeKeyBlob() 117 parseKeymaster1HwBlob(const keymaster1_device_t* device, const KeymasterKeyBlob& blob, in parseKeymaster1HwBlob() 118 const AuthorizationSet& additional_params, KeymasterKeyBlob* key_material, in parseKeymaster1HwBlob() 143 Keymaster1PassthroughContext::ParseKeyBlob(const KeymasterKeyBlob& blob, in ParseKeyBlob() 148 KeymasterKeyBlob key_material; in ParseKeyBlob() 178 keymaster_error_t Keymaster1PassthroughContext::DeleteKey(const KeymasterKeyBlob& blob) const { in DeleteKey() 183 KeymasterKeyBlob key_material; in DeleteKey() 216 const KeymasterKeyBlob& key_material, KeymasterKeyBlob* blob, AuthorizationSet* hw_enforced, in CreateKeyBlob() 252 const KeymasterKeyBlob&, const KeymasterKeyBlob&, const AuthorizationSet&, in UnwrapKey() argument [all …]
|
H A D | keymaster2_passthrough_context.cpp | 62 Keymaster2PassthroughContext::UpgradeKeyBlob(const KeymasterKeyBlob& key_to_upgrade, in UpgradeKeyBlob() 64 KeymasterKeyBlob* upgraded_key) const { in UpgradeKeyBlob() 71 Keymaster2PassthroughContext::ParseKeyBlob(const KeymasterKeyBlob& blob, in ParseKeyBlob() 106 KeymasterKeyBlob key_material = blob; in ParseKeyBlob() 112 keymaster_error_t Keymaster2PassthroughContext::DeleteKey(const KeymasterKeyBlob& blob) const { in DeleteKey() 145 const KeymasterKeyBlob&, const KeymasterKeyBlob&, const AuthorizationSet&, in UnwrapKey() argument 146 const KeymasterKeyBlob&, AuthorizationSet*, keymaster_key_format_t*, KeymasterKeyBlob*) const { in UnwrapKey()
|
H A D | soft_keymaster_context.cpp | 181 const KeymasterKeyBlob& key_material, in CreateKeyBlob() 182 KeymasterKeyBlob* blob, in CreateKeyBlob() 196 keymaster_error_t SoftKeymasterContext::UpgradeKeyBlob(const KeymasterKeyBlob& key_to_upgrade, in UpgradeKeyBlob() 223 keymaster_error_t SoftKeymasterContext::ParseKeyBlob(const KeymasterKeyBlob& blob, in ParseKeyBlob() 260 KeymasterKeyBlob key_material; in ParseKeyBlob() 305 keymaster_error_t SoftKeymasterContext::DeleteKey(const KeymasterKeyBlob& blob) const { in DeleteKey() 310 KeymasterKeyBlob key_material; in DeleteKey() 336 const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params, in ParseKeymaster1HwBlob() 337 KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, in ParseKeymaster1HwBlob() 409 keymaster_error_t SoftKeymasterContext::UnwrapKey(const KeymasterKeyBlob&, const KeymasterKeyBlob&, in UnwrapKey() argument [all …]
|
H A D | pure_soft_keymaster_context.cpp | 125 const KeymasterKeyBlob& key_material, in CreateKeyBlob() 126 KeymasterKeyBlob* blob, in CreateKeyBlob() 220 keymaster_error_t PureSoftKeymasterContext::ParseKeyBlob(const KeymasterKeyBlob& blob, in ParseKeyBlob() 247 KeymasterKeyBlob key_material; in ParseKeyBlob() 299 keymaster_error_t PureSoftKeymasterContext::DeleteKey(const KeymasterKeyBlob& blob) const { in DeleteKey() 402 const KeymasterKeyBlob& wrapped_key_blob, const KeymasterKeyBlob& wrapping_key_blob, in UnwrapKey() 403 const AuthorizationSet& /* wrapping_key_params */, const KeymasterKeyBlob& masking_key, in UnwrapKey() 405 KeymasterKeyBlob* wrapped_key_material) const { in UnwrapKey() 412 KeymasterKeyBlob transit_key; in UnwrapKey() 413 KeymasterKeyBlob secure_key; in UnwrapKey() [all …]
|
/aosp12/system/keymaster/include/keymaster/ |
H A D | keymaster_context.h | 37 typedef TKeymasterBlob<keymaster_key_blob_t> KeymasterKeyBlob; typedef 109 virtual keymaster_error_t UpgradeKeyBlob(const KeymasterKeyBlob& key_to_upgrade, 111 KeymasterKeyBlob* upgraded_key) const = 0; 120 virtual keymaster_error_t ParseKeyBlob(const KeymasterKeyBlob& blob, 128 virtual keymaster_error_t DeleteKey(const KeymasterKeyBlob& /* blob */) const { in DeleteKey() argument 180 UnwrapKey(const KeymasterKeyBlob& wrapped_key_blob, const KeymasterKeyBlob& wrapping_key_blob, 181 const AuthorizationSet& wrapping_key_params, const KeymasterKeyBlob& masking_key, 183 KeymasterKeyBlob* wrapped_key_material) const = 0;
|
H A D | wrapped_key.h | 57 keymaster_error_t build_wrapped_key(const KeymasterKeyBlob& encrypted_ephemeral_key, 59 const KeymasterKeyBlob& secure_key, const KeymasterBlob& tag, 61 KeymasterKeyBlob* der_wrapped_key); 63 keymaster_error_t parse_wrapped_key(const KeymasterKeyBlob& wrapped_key, KeymasterBlob* iv, 64 KeymasterKeyBlob* transit_key, KeymasterKeyBlob* secure_key,
|
H A D | key_factory.h | 28 typedef TKeymasterBlob<keymaster_key_blob_t> KeymasterKeyBlob; typedef 42 KeymasterKeyBlob* key_blob, // 49 const KeymasterKeyBlob& input_key_material, 52 KeymasterKeyBlob* output_key_blob, 57 virtual keymaster_error_t LoadKey(KeymasterKeyBlob&& key_material,
|
/aosp12/system/keymaster/include/keymaster/legacy_support/ |
H A D | keymaster1_engine.h | 45 KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, 50 const KeymasterKeyBlob& input_key_material, 51 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced, 53 keymaster_error_t DeleteKey(const KeymasterKeyBlob& blob) const; 57 KeyData(const KeymasterKeyBlob& blob, const AuthorizationSet& params) in KeyData() 64 KeymasterKeyBlob key_material; 69 RSA* BuildRsaKey(const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params, 71 EC_KEY* BuildEcKey(const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params, 80 EVP_PKEY* GetKeymaster1PublicKey(const KeymasterKeyBlob& blob,
|
H A D | keymaster_passthrough_engine.h | 34 typedef TKeymasterBlob<keymaster_key_blob_t> KeymasterKeyBlob; typedef 43 KeymasterKeyBlob* key_material, 49 const KeymasterKeyBlob& input_key_material, 50 KeymasterKeyBlob* output_key_blob, 53 virtual keymaster_error_t ExportKey(keymaster_key_format_t format, const KeymasterKeyBlob& blob, 57 virtual keymaster_error_t DeleteKey(const KeymasterKeyBlob& blob) const = 0;
|
H A D | keymaster1_legacy_support.h | 69 KeymasterKeyBlob* key_blob, // in GenerateKey() 86 const KeymasterKeyBlob& input_key_material, in ImportKey() 89 KeymasterKeyBlob* output_key_blob, // in ImportKey() 103 keymaster_error_t LoadKey(KeymasterKeyBlob&& key_material, in LoadKey() 150 KeymasterKeyBlob* key_blob, // 157 KeymasterKeyBlob&& key_material, const AuthorizationSet& additional_params, 162 KeymasterKeyBlob&& key_material, const AuthorizationSet& additional_params,
|
H A D | keymaster_passthrough_key.h | 46 KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, in GenerateKey() 54 const KeymasterKeyBlob& input_key_material, in ImportKey() 57 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced, in ImportKey() 64 keymaster_error_t LoadKey(KeymasterKeyBlob&& key_material, 83 KeymasterPassthroughKey(KeymasterKeyBlob&& key_material, AuthorizationSet&& hw_enforced, in KeymasterPassthroughKey()
|
/aosp12/system/keymaster/tests/ |
H A D | wrapped_key_test.cpp | 68 KeymasterKeyBlob asn1; in TEST() 71 KeymasterKeyBlob tk = {reinterpret_cast<const uint8_t*>(test_transit_key.c_str()), in TEST() 73 KeymasterKeyBlob secure_key = {reinterpret_cast<const uint8_t*>(test_secure_key.c_str()), in TEST() 85 KeymasterKeyBlob secure_key2; in TEST() 86 KeymasterKeyBlob transit_key2; in TEST() 107 KeymasterKeyBlob wrapped_key = {reinterpret_cast<const uint8_t*>(test_wrapped_key.c_str()), in TEST() 110 KeymasterKeyBlob secure_key; in TEST() 111 KeymasterKeyBlob transit_key; in TEST()
|
/aosp12/system/keymaster/key_blob_utils/ |
H A D | auth_encrypted_key_blob.cpp | 117 const KeymasterKeyBlob& master_key, // in AesGcmEncryptKey() 118 const KeymasterKeyBlob& plaintext, // in AesGcmEncryptKey() 138 retval.ciphertext = KeymasterKeyBlob(ciphertext_len); in AesGcmEncryptKey() 179 KeymasterKeyBlob plaintext(plaintext_len); in AesGcmDecryptKey() 206 KeymasterKeyBlob SerializeAuthEncryptedBlob(const EncryptedKey& encrypted_key, in SerializeAuthEncryptedBlob() 217 KeymasterKeyBlob retval; in SerializeAuthEncryptedBlob() 237 DeserializedKey DeserializeAuthEncryptedBlob(const KeymasterKeyBlob& key_blob, in DeserializeAuthEncryptedBlob() 290 EncryptedKey EncryptKey(const KeymasterKeyBlob& plaintext, AuthEncryptedBlobFormat format, in EncryptKey() 292 const AuthorizationSet& hidden, const KeymasterKeyBlob& master_key, in EncryptKey() 322 KeymasterKeyBlob DecryptKey(const DeserializedKey& key, const AuthorizationSet& hidden, in DecryptKey() [all …]
|
H A D | ocb_utils.cpp | 68 const KeymasterKeyBlob& master_key, in InitializeKeyWrappingContext() 114 const KeymasterKeyBlob& master_key, in OcbEncryptKey() 115 const KeymasterKeyBlob& plaintext, const Buffer& nonce, in OcbEncryptKey() 116 KeymasterKeyBlob* ciphertext, Buffer* tag) { in OcbEncryptKey() 146 const KeymasterKeyBlob& master_key, in OcbDecryptKey() 147 const KeymasterKeyBlob& ciphertext, const Buffer& nonce, in OcbDecryptKey() 148 const Buffer& tag, KeymasterKeyBlob* plaintext) { in OcbDecryptKey()
|
/aosp12/system/keymaster/km_openssl/ |
H A D | wrapped_key.cpp | 40 keymaster_error_t build_wrapped_key(const KeymasterKeyBlob& transit_key, const KeymasterBlob& iv, in build_wrapped_key() 42 const KeymasterKeyBlob& secure_key, const KeymasterBlob& tag, in build_wrapped_key() 44 KeymasterKeyBlob* der_wrapped_key) { in build_wrapped_key() 81 keymaster_error_t parse_wrapped_key(const KeymasterKeyBlob& wrapped_key, KeymasterBlob* iv, in parse_wrapped_key() 82 KeymasterKeyBlob* transit_key, KeymasterKeyBlob* secure_key, in parse_wrapped_key() 101 *transit_key = KeymasterKeyBlob(record->transit_key->data, record->transit_key->length); in parse_wrapped_key() 106 *secure_key = KeymasterKeyBlob(record->secure_key->data, record->secure_key->length); in parse_wrapped_key()
|
/aosp12/system/keymaster/legacy_support/ |
H A D | keymaster_passthrough_engine.cpp | 85 KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, 90 const KeymasterKeyBlob& input_key_material, 91 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced, 93 keymaster_error_t ExportKey(keymaster_key_format_t format, const KeymasterKeyBlob& blob, in ExportKey() 107 keymaster_error_t DeleteKey(const KeymasterKeyBlob& blob) const override { in DeleteKey() 206 const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, in GenerateKey() 226 const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, in GenerateKey() 247 const KeymasterKeyBlob& input_key_material, KeymasterKeyBlob* output_key_blob, in ImportKey() 261 *output_key_blob = KeymasterKeyBlob(blob); in ImportKey() 272 const KeymasterKeyBlob& input_key_material, KeymasterKeyBlob* output_key_blob, in ImportKey()
|
/aosp12/system/keymaster/include/keymaster/km_openssl/ |
H A D | ckdf.h | 28 keymaster_error_t ckdf(const KeymasterKeyBlob& key, const KeymasterBlob& label, 30 KeymasterKeyBlob* output); 36 inline keymaster_error_t ckdf(const KeymasterKeyBlob& key, const KeymasterBlob& label, in ckdf() 37 const keymaster_blob_t& context_chunks, KeymasterKeyBlob* output) { in ckdf()
|