Home
last modified time | relevance | path

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

12

/system/keymaster/
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()
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 context_->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()
Dsymmetric_key.cpp34 keymaster_error_t SymmetricKeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
42 if (!key_description.GetTagValue(TAG_KEY_SIZE, &key_size_bits) || in GenerateKey()
46 keymaster_error_t error = validate_algorithm_specific_new_key_params(key_description); in GenerateKey()
61 return context_->CreateKeyBlob(key_description, KM_ORIGIN_GENERATED, key_material, key_blob, in GenerateKey()
65 keymaster_error_t SymmetricKeyFactory::ImportKey(const AuthorizationSet& key_description, in ImportKey() argument
74 AuthorizationSet authorizations(key_description); in ImportKey()
83 keymaster_error_t error = validate_algorithm_specific_new_key_params(key_description); in ImportKey()
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()
74 const AuthorizationSet& key_description, keymaster_key_format_t input_key_material_format, in ImportKey() argument
78 UpdateToWorkAroundUnsupportedDigests(key_description, &key_params_copy); in ImportKey()
Drsa_keymaster1_key.cpp43 static void UpdateToWorkAroundUnsupportedDigests(const AuthorizationSet& key_description, in UpdateToWorkAroundUnsupportedDigests() argument
49 for (const keymaster_key_param_t& entry : key_description) { in UpdateToWorkAroundUnsupportedDigests()
85 keymaster_error_t RsaKeymaster1KeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
90 UpdateToWorkAroundUnsupportedDigests(key_description, &key_params_copy); in GenerateKey()
95 const AuthorizationSet& key_description, keymaster_key_format_t input_key_material_format, in ImportKey() argument
99 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 context_->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()
Daes_key.cpp72 const AuthorizationSet& key_description) const { in validate_algorithm_specific_new_key_params()
73 if (key_description.Contains(TAG_BLOCK_MODE, KM_MODE_GCM)) { in validate_algorithm_specific_new_key_params()
75 if (!key_description.GetTagValue(TAG_MIN_MAC_LENGTH, &min_tag_length)) in validate_algorithm_specific_new_key_params()
85 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 AuthorizationSet authorizations(key_description); in GenerateKey()
99 keymaster_error_t RsaKeyFactory::ImportKey(const AuthorizationSet& key_description, in ImportKey() argument
112 UpdateImportKeyDescription(key_description, input_key_material_format, input_key_material, in ImportKey()
120 keymaster_error_t RsaKeyFactory::UpdateImportKeyDescription(const AuthorizationSet& key_description, in UpdateImportKeyDescription() argument
139 updated_description->Reinitialize(key_description); in UpdateImportKeyDescription()
Dsymmetric_key.h32 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
35 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
49 validate_algorithm_specific_new_key_params(const AuthorizationSet& key_description) const = 0;
Dec_keymaster0_key.h41 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
45 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
Drsa_keymaster0_key.h41 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
45 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
Dec_keymaster1_key.h45 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
49 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,
Dkeymaster1_engine.h46 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
50 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
Dhmac_key.h44 const AuthorizationSet& key_description) const override;
Daes_key.h48 const AuthorizationSet& key_description) const override;
Dkeymaster1_engine.cpp79 keymaster_error_t Keymaster1Engine::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument
87 keymaster_error_t error = keymaster1_device_->generate_key(keymaster1_device_, &key_description, in GenerateKey()
99 keymaster_error_t Keymaster1Engine::ImportKey(const AuthorizationSet& key_description, in ImportKey() argument
111 keymaster_error_t error = keymaster1_device_->import_key(keymaster1_device_, &key_description, in ImportKey()
Dsoft_keymaster_context.cpp408 static keymaster_error_t SetAuthorizations(const AuthorizationSet& key_description, in SetAuthorizations() argument
414 for (auto& entry : key_description) { in SetAuthorizations()
449 keymaster_error_t SoftKeymasterContext::CreateKeyBlob(const AuthorizationSet& key_description, in CreateKeyBlob() argument
455 keymaster_error_t error = SetAuthorizations(key_description, origin, os_version_, in CreateKeyBlob()
461 error = BuildHiddenAuthorizations(key_description, &hidden); in CreateKeyBlob()
Dandroid_keymaster.cpp194 if (!request.key_description.GetTagValue(TAG_ALGORITHM, &algorithm) || in GenerateKey()
201 response->error = factory->GenerateKey(request.key_description, &key_blob, in GenerateKey()
428 if (!request.key_description.GetTagValue(TAG_ALGORITHM, &algorithm) || in ImportKey()
434 response->error = factory->ImportKey(request.key_description, request.key_format, in ImportKey()
Dandroid_keymaster_messages_test.cpp133 req.key_description.Reinitialize(params, array_length(params)); in TEST()
135 EXPECT_EQ(deserialized->key_description, req.key_description); in TEST()
387 msg.key_description.Reinitialize(params, array_length(params)); in TEST()
392 EXPECT_EQ(msg.key_description, deserialized->key_description); in TEST()
/system/keymaster/include/keymaster/
Dec_key_factory.h34 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
37 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
47 keymaster_error_t UpdateImportKeyDescription(const AuthorizationSet& key_description,
59 static keymaster_error_t GetCurveAndSize(const AuthorizationSet& key_description,
Drsa_key_factory.h31 keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
34 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
50 keymaster_error_t UpdateImportKeyDescription(const AuthorizationSet& key_description,
Dkey_factory.h40 virtual keymaster_error_t GenerateKey(const AuthorizationSet& key_description,
44 virtual keymaster_error_t ImportKey(const AuthorizationSet& key_description,
Dkeymaster_context.h103 virtual keymaster_error_t CreateKeyBlob(const AuthorizationSet& key_description,

12