Home
last modified time | relevance | path

Searched refs:key_description (Results 1 – 25 of 47) sorted by relevance

12

/system/keymaster/include/keymaster/legacy_support/
Dkeymaster1_legacy_support.h48 bool RequiresSoftwareDigesting(const AuthorizationSet& key_description) const;
50 const AuthProxy& key_description) const;
71 keymaster_error_t GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
74 if (legacy_support_.RequiresSoftwareDigesting(key_description)) { in GenerateKey()
75 return software_digest_factory_.GenerateKey(key_description, key_blob, hw_enforced, in GenerateKey()
78 return passthrough_factory_.GenerateKey(key_description, key_blob, hw_enforced, in GenerateKey()
83 keymaster_error_t ImportKey(const AuthorizationSet& key_description, in ImportKey() argument
88 if (legacy_support_.RequiresSoftwareDigesting(key_description)) { in ImportKey()
89 return software_digest_factory_.ImportKey(key_description, input_key_material_format, in ImportKey()
93 return passthrough_factory_.ImportKey(key_description, input_key_material_format, in ImportKey()
[all …]
Dkeymaster_passthrough_key.h43 keymaster_error_t GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
46 return engine_->GenerateKey(key_description, key_blob, hw_enforced, sw_enforced); in GenerateKey()
49 keymaster_error_t ImportKey(const AuthorizationSet& key_description, in ImportKey() argument
54 return engine_->ImportKey(key_description, input_key_material_format, input_key_material, in ImportKey()
Drsa_keymaster0_key.h40 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
44 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
Dec_keymaster0_key.h40 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
44 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
Dkeymaster_passthrough_engine.h43 virtual keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
47 virtual keymaster_error_t ImportKey(const AuthorizationSet& key_description,
Dec_keymaster1_key.h44 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
48 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
Drsa_keymaster1_key.h45 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
49 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
/system/keymaster/legacy_support/
Dec_keymaster1_key.cpp41 static void UpdateToWorkAroundUnsupportedDigests(const AuthorizationSet& key_description, in UpdateToWorkAroundUnsupportedDigests() argument
45 for (const keymaster_key_param_t& entry : key_description) { in UpdateToWorkAroundUnsupportedDigests()
64 keymaster_error_t EcdsaKeymaster1KeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
69 UpdateToWorkAroundUnsupportedDigests(key_description, &key_params_copy); in GenerateKey()
73 keymaster_error_t error = GetCurveAndSize(key_description, &ec_curve, &key_size); in GenerateKey()
76 } else if (!key_description.Contains(TAG_KEY_SIZE, key_size)) { in GenerateKey()
83 const AuthorizationSet& key_description, keymaster_key_format_t input_key_material_format, in ImportKey() argument
87 UpdateToWorkAroundUnsupportedDigests(key_description, &key_params_copy); in ImportKey()
Dkeymaster1_legacy_support.cpp168 const AuthorizationSet& key_description) const { in RequiresSoftwareDigesting()
171 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm)) { in RequiresSoftwareDigesting()
179 for (auto& entry : key_description) in RequiresSoftwareDigesting()
183 if (requiresSoftwareDigesting(algorithm, purpose, KM_DIGEST_NONE, key_description, in RequiresSoftwareDigesting()
192 const AuthProxy& key_description) const { in RequiresSoftwareDigesting()
195 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm)) { in RequiresSoftwareDigesting()
203 for (auto& entry : key_description) { in RequiresSoftwareDigesting()
207 if (requiresSoftwareDigesting(algorithm, purpose, digest, key_description, in RequiresSoftwareDigesting()
228 const AuthorizationSet& key_description, in GenerateKey() argument
231 if (legacy_support_.RequiresSoftwareDigesting(key_description)) { in GenerateKey()
[all …]
Dec_keymaster0_key.cpp36 keymaster_error_t EcdsaKeymaster0KeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
44 return super::GenerateKey(key_description, key_blob, hw_enforced, sw_enforced); in GenerateKey()
48 keymaster_error_t error = GetCurveAndSize(key_description, &ec_curve, &key_size); in GenerateKey()
64 return blob_maker_.CreateKeyBlob(key_description, KM_ORIGIN_UNKNOWN, key_material, key_blob, in GenerateKey()
69 const AuthorizationSet& key_description, keymaster_key_format_t input_key_material_format, in ImportKey() argument
76 return super::ImportKey(key_description, input_key_material_format, input_key_material, in ImportKey()
82 key_description, input_key_material_format, input_key_material, &authorizations, &key_size); in ImportKey()
Drsa_keymaster1_key.cpp40 static void UpdateToWorkAroundUnsupportedDigests(const AuthorizationSet& key_description, in UpdateToWorkAroundUnsupportedDigests() argument
46 for (const keymaster_key_param_t& entry : key_description) { in UpdateToWorkAroundUnsupportedDigests()
82 keymaster_error_t RsaKeymaster1KeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
87 UpdateToWorkAroundUnsupportedDigests(key_description, &key_params_copy); in GenerateKey()
92 const AuthorizationSet& key_description, keymaster_key_format_t input_key_material_format, in ImportKey() argument
96 UpdateToWorkAroundUnsupportedDigests(key_description, &key_params_copy); in ImportKey()
Drsa_keymaster0_key.cpp36 keymaster_error_t RsaKeymaster0KeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
44 if (!key_description.GetTagValue(TAG_RSA_PUBLIC_EXPONENT, &public_exponent)) { in GenerateKey()
50 if (!key_description.GetTagValue(TAG_KEY_SIZE, &key_size)) { in GenerateKey()
66 return blob_maker_.CreateKeyBlob(key_description, KM_ORIGIN_UNKNOWN, key_material, key_blob, in GenerateKey()
71 const AuthorizationSet& key_description, keymaster_key_format_t input_key_material_format, in ImportKey() argument
81 UpdateImportKeyDescription(key_description, input_key_material_format, input_key_material, in ImportKey()
Dkeymaster_passthrough_engine.cpp85 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
89 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
212 …ymasterPassthroughEngine<keymaster1_device_t>::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
220 keymaster_error_t error = km_device_->generate_key(km_device_, &key_description, in GenerateKey()
235 …ymasterPassthroughEngine<keymaster2_device_t>::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
243 keymaster_error_t error = km_device_->generate_key(km_device_, &key_description, in GenerateKey()
258 TKeymasterPassthroughEngine<keymaster1_device_t>::ImportKey(const AuthorizationSet& key_description, in ImportKey() argument
270 keymaster_error_t error = km_device_->import_key(km_device_, &key_description, in ImportKey()
287 TKeymasterPassthroughEngine<keymaster2_device_t>::ImportKey(const AuthorizationSet& key_description, in ImportKey() argument
299 keymaster_error_t error = km_device_->import_key(km_device_, &key_description, in ImportKey()
/system/keymaster/km_openssl/
Dsymmetric_key.cpp33 keymaster_error_t SymmetricKeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
41 if (!key_description.GetTagValue(TAG_KEY_SIZE, &key_size_bits) || in GenerateKey()
45 keymaster_error_t error = validate_algorithm_specific_new_key_params(key_description); in GenerateKey()
60 return blob_maker_.CreateKeyBlob(key_description, KM_ORIGIN_GENERATED, key_material, key_blob, in GenerateKey()
64 keymaster_error_t SymmetricKeyFactory::ImportKey(const AuthorizationSet& key_description, in ImportKey() argument
73 AuthorizationSet authorizations(key_description); in ImportKey()
82 keymaster_error_t error = validate_algorithm_specific_new_key_params(key_description); in ImportKey()
Dec_key_factory.cpp44 keymaster_error_t EcKeyFactory::GetCurveAndSize(const AuthorizationSet& key_description, in GetCurveAndSize() argument
47 if (!key_description.GetTagValue(TAG_EC_CURVE, curve)) { in GetCurveAndSize()
49 if (!key_description.GetTagValue(TAG_KEY_SIZE, key_size_bits)) { in GetCurveAndSize()
63 if (key_description.GetTagValue(TAG_KEY_SIZE, &tag_key_size_bits) && in GetCurveAndSize()
74 keymaster_error_t EcKeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
81 AuthorizationSet authorizations(key_description); in GenerateKey()
127 keymaster_error_t EcKeyFactory::ImportKey(const AuthorizationSet& key_description, in ImportKey() argument
139 key_description, input_key_material_format, input_key_material, &authorizations, &key_size); in ImportKey()
147 keymaster_error_t EcKeyFactory::UpdateImportKeyDescription(const AuthorizationSet& key_description, in UpdateImportKeyDescription() argument
165 updated_description->Reinitialize(key_description); in UpdateImportKeyDescription()
Daes_key.cpp73 const AuthorizationSet& key_description) const { in validate_algorithm_specific_new_key_params()
74 if (key_description.Contains(TAG_BLOCK_MODE, KM_MODE_GCM)) { in validate_algorithm_specific_new_key_params()
76 if (!key_description.GetTagValue(TAG_MIN_MAC_LENGTH, &min_tag_length)) in validate_algorithm_specific_new_key_params()
86 if (key_description.find(TAG_MIN_MAC_LENGTH) != -1) { in validate_algorithm_specific_new_key_params()
Dhmac_key.cpp65 const AuthorizationSet& key_description) const { in validate_algorithm_specific_new_key_params()
67 if (!key_description.GetTagValue(TAG_MIN_MAC_LENGTH, &min_mac_length_bits)) in validate_algorithm_specific_new_key_params()
71 if (!key_description.GetTagValue(TAG_DIGEST, &digest)) { in validate_algorithm_specific_new_key_params()
72 LOG_E("%d digests specified for HMAC key", key_description.GetTagCount(TAG_DIGEST)); in validate_algorithm_specific_new_key_params()
Drsa_key_factory.cpp52 keymaster_error_t RsaKeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
59 const AuthorizationSet& authorizations(key_description); in GenerateKey()
103 keymaster_error_t RsaKeyFactory::ImportKey(const AuthorizationSet& key_description, in ImportKey() argument
116 UpdateImportKeyDescription(key_description, input_key_material_format, input_key_material, in ImportKey()
124 keymaster_error_t RsaKeyFactory::UpdateImportKeyDescription(const AuthorizationSet& key_description, in UpdateImportKeyDescription() argument
143 updated_description->Reinitialize(key_description); in UpdateImportKeyDescription()
Dtriple_des_key.cpp59 const AuthorizationSet& key_description) const { in validate_algorithm_specific_new_key_params()
60 if (key_description.Contains(TAG_MIN_MAC_LENGTH)) return KM_ERROR_INVALID_TAG; in validate_algorithm_specific_new_key_params()
/system/keymaster/include/keymaster/km_openssl/
Dec_key_factory.h37 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
40 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
50 keymaster_error_t UpdateImportKeyDescription(const AuthorizationSet& key_description,
62 static keymaster_error_t GetCurveAndSize(const AuthorizationSet& key_description,
Drsa_key_factory.h34 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
37 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
53 keymaster_error_t UpdateImportKeyDescription(const AuthorizationSet& key_description,
Dsymmetric_key.h37 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
40 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
60 validate_algorithm_specific_new_key_params(const AuthorizationSet& key_description) const = 0;
/system/keymaster/android_keymaster/
Dandroid_keymaster.cpp224 if (!request.key_description.GetTagValue(TAG_ALGORITHM, &algorithm) || in GenerateKey()
231 response->error = factory->GenerateKey(request.key_description, &key_blob, in GenerateKey()
437 if (!request.key_description.GetTagValue(TAG_ALGORITHM, &algorithm) || in ImportKey()
443 response->error = factory->ImportKey(request.key_description, request.key_format, in ImportKey()
490 AuthorizationSet key_description; in ImportWrappedKey() local
495 request.masking_key, &key_description, &key_format, &secret_key); in ImportWrappedKey()
501 int sid_idx = key_description.find(TAG_USER_SECURE_ID); in ImportWrappedKey()
503 uint8_t sids = key_description[sid_idx].long_integer; in ImportWrappedKey()
504 if (!key_description.erase(sid_idx)) { in ImportWrappedKey()
509 key_description.push_back(TAG_USER_SECURE_ID, request.password_sid); in ImportWrappedKey()
[all …]
/system/keymaster/include/keymaster/
Dkey_factory.h40 virtual keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
44 virtual keymaster_error_t ImportKey(const AuthorizationSet& key_description,
/system/core/trusty/keymaster/
DTrustyKeymaster.cpp111 datedRequest.key_description = request.key_description; in GenerateKey()
113 if (!request.key_description.Contains(TAG_CREATION_DATETIME)) { in GenerateKey()
114 datedRequest.key_description.push_back(TAG_CREATION_DATETIME, java_time(time(NULL))); in GenerateKey()

12