Home
last modified time | relevance | path

Searched refs:algorithm (Results 1 – 18 of 18) sorted by relevance

/system/keymaster/
Dandroid_keymaster.cpp62 bool check_supported(const KeymasterContext& context, keymaster_algorithm_t algorithm, in check_supported() argument
64 if (context.GetKeyFactory(algorithm) == NULL) { in check_supported()
99 void GetSupported(const KeymasterContext& context, keymaster_algorithm_t algorithm, in GetSupported() argument
103 if (response == NULL || !check_supported(context, algorithm, response)) in GetSupported()
106 const OperationFactory* factory = context.GetOperationFactory(algorithm, purpose); in GetSupported()
119 GetSupported(*context_, request.algorithm, request.purpose, in SupportedBlockModes()
125 GetSupported(*context_, request.algorithm, request.purpose, in SupportedPaddingModes()
131 GetSupported(*context_, request.algorithm, request.purpose, &OperationFactory::SupportedDigests, in SupportedDigests()
137 if (response == NULL || !check_supported(*context_, request.algorithm, response)) in SupportedImportFormats()
142 context_->GetKeyFactory(request.algorithm)->SupportedImportFormats(&count); in SupportedImportFormats()
[all …]
Doperation.h42 : algorithm(alg), purpose(purp) {} in KeyType()
44 keymaster_algorithm_t algorithm; member
48 return algorithm == rhs.algorithm && purpose == rhs.purpose;
Dsoft_keymaster_device.cpp251 keymaster_algorithm_t algorithm; in import_keypair() local
252 keymaster_error_t err = GetPkcs8KeyAlgorithm(key, key_length, &algorithm); in import_keypair()
255 request.key_description.push_back(TAG_ALGORITHM, algorithm); in import_keypair()
256 StoreDefaultNewKeyParams(algorithm, &request.key_description); in import_keypair()
281 keymaster_algorithm_t* algorithm) { in GetPkcs8KeyAlgorithm() argument
302 *algorithm = KM_ALGORITHM_RSA; in GetPkcs8KeyAlgorithm()
305 *algorithm = KM_ALGORITHM_EC; in GetPkcs8KeyAlgorithm()
496 keymaster_algorithm_t algorithm, in get_supported_block_modes() argument
507 request.algorithm = algorithm; in get_supported_block_modes()
528 keymaster_algorithm_t algorithm, in get_supported_padding_modes() argument
[all …]
Doperation.cpp52 inline bool is_public_key_algorithm(keymaster_algorithm_t algorithm) { in is_public_key_algorithm() argument
53 switch (algorithm) { in is_public_key_algorithm()
70 if (!is_public_key_algorithm(key_type.algorithm)) in is_public_key_operation()
Dopenssl_utils.cpp25 static int convert_to_evp(keymaster_algorithm_t algorithm) { in convert_to_evp() argument
26 switch (algorithm) { in convert_to_evp()
Dec_key_factory.cpp142 keymaster_algorithm_t algorithm = KM_ALGORITHM_EC; in UpdateImportKeyDescription() local
143 if (!updated_description->GetTagValue(TAG_ALGORITHM, &algorithm)) in UpdateImportKeyDescription()
145 if (algorithm != KM_ALGORITHM_EC) in UpdateImportKeyDescription()
Drsa_key_factory.cpp161 keymaster_algorithm_t algorithm = KM_ALGORITHM_RSA; in UpdateImportKeyDescription() local
162 if (!updated_description->GetTagValue(TAG_ALGORITHM, &algorithm)) in UpdateImportKeyDescription()
164 if (algorithm != KM_ALGORITHM_RSA) in UpdateImportKeyDescription()
Dkeymaster_enforcement.cpp79 keymaster_algorithm_t algorithm; in is_public_key_algorithm() local
80 return auth_set.GetTagValue(TAG_ALGORITHM, &algorithm) && in is_public_key_algorithm()
81 (algorithm == KM_ALGORITHM_RSA || algorithm == KM_ALGORITHM_EC); in is_public_key_algorithm()
Dsoft_keymaster_context.cpp59 KeyFactory* SoftKeymasterContext::GetKeyFactory(keymaster_algorithm_t algorithm) const { in GetKeyFactory()
60 switch (algorithm) { in GetKeyFactory()
83 OperationFactory* SoftKeymasterContext::GetOperationFactory(keymaster_algorithm_t algorithm, in GetOperationFactory() argument
85 KeyFactory* key_factory = GetKeyFactory(algorithm); in GetOperationFactory()
Dandroid_keymaster_messages_test.cpp87 req.algorithm = KM_ALGORITHM_EC; in TEST()
90 EXPECT_EQ(KM_ALGORITHM_EC, deserialized->algorithm); in TEST()
97 req.algorithm = KM_ALGORITHM_EC; in TEST()
101 EXPECT_EQ(KM_ALGORITHM_EC, deserialized->algorithm); in TEST()
Dandroid_keymaster_test_utils.h161 virtual bool algorithm_in_hardware(keymaster_algorithm_t algorithm) const = 0;
Dandroid_keymaster_test.cpp118 bool algorithm_in_hardware(keymaster_algorithm_t algorithm) const override { in algorithm_in_hardware()
119 switch (algorithm) { in algorithm_in_hardware()
/system/security/keystore/
Dauth_token_table.cpp63 inline bool is_secret_key_operation(keymaster_algorithm_t algorithm, keymaster_purpose_t purpose) { in is_secret_key_operation() argument
64 if ((algorithm != KM_ALGORITHM_RSA || algorithm != KM_ALGORITHM_EC)) in is_secret_key_operation()
73 keymaster_algorithm_t algorithm = KM_ALGORITHM_AES; in KeyRequiresAuthentication() local
74 key_info.GetTagValue(TAG_ALGORITHM, &algorithm); in KeyRequiresAuthentication()
75 return is_secret_key_operation(algorithm, purpose) && key_info.find(TAG_NO_AUTH_REQUIRED) == -1; in KeyRequiresAuthentication()
80 keymaster_algorithm_t algorithm = KM_ALGORITHM_AES; in KeyRequiresAuthPerOperation() local
81 key_info.GetTagValue(TAG_ALGORITHM, &algorithm); in KeyRequiresAuthPerOperation()
82 return is_secret_key_operation(algorithm, purpose) && key_info.find(TAG_AUTH_TIMEOUT) == -1; in KeyRequiresAuthPerOperation()
Dkeystore.cpp3055 keymaster_key_param_t* algorithm = getKeyAlgorithm(&characteristics.characteristics); in addLegacyBeginParams() local
3056 if (!algorithm) { in addLegacyBeginParams()
3060 params.push_back(*algorithm); in addLegacyBeginParams()
/system/keymaster/include/keymaster/
Dsoft_keymaster_device.h73 static void StoreDefaultNewKeyParams(keymaster_algorithm_t algorithm,
76 keymaster_algorithm_t* algorithm);
110 keymaster_algorithm_t algorithm,
115 keymaster_algorithm_t algorithm,
120 keymaster_algorithm_t algorithm,
125 keymaster_algorithm_t algorithm,
129 keymaster_algorithm_t algorithm,
Dkeymaster_context.h66 virtual KeyFactory* GetKeyFactory(keymaster_algorithm_t algorithm) const = 0;
67 virtual OperationFactory* GetOperationFactory(keymaster_algorithm_t algorithm,
Dsoft_keymaster_context.h39 KeyFactory* GetKeyFactory(keymaster_algorithm_t algorithm) const override;
40 OperationFactory* GetOperationFactory(keymaster_algorithm_t algorithm,
Dandroid_keymaster_messages.h132 return append_uint32_to_buf(buf, end, algorithm); in Serialize()
135 return copy_uint32_from_buf(buf_ptr, end, &algorithm); in Deserialize()
138 keymaster_algorithm_t algorithm; member
150 buf = append_uint32_to_buf(buf, end, algorithm); in Serialize()
154 return copy_uint32_from_buf(buf_ptr, end, &algorithm) && in Deserialize()
158 keymaster_algorithm_t algorithm; member