Lines Matching refs:algorithm
108 static keymaster_error_t add_digests(keymaster1_device_t* dev, keymaster_algorithm_t algorithm, in add_digests() argument
111 auto key = std::make_pair(algorithm, purpose); in add_digests()
116 dev->get_supported_digests(dev, algorithm, purpose, &digests, &digests_length); in add_digests()
136 for (auto algorithm : sig_algorithms) in map_digests() local
140 add_digests(dev, algorithm, purpose, map, &alg_purpose_supports_all); in map_digests()
148 for (auto algorithm : crypt_algorithms) in map_digests() local
152 add_digests(dev, algorithm, purpose, map, &alg_purpose_supports_all); in map_digests()
443 keymaster_algorithm_t algorithm, in get_supported_block_modes() argument
455 return km1_dev->get_supported_block_modes(km1_dev, algorithm, purpose, modes, modes_length); in get_supported_block_modes()
458 request.algorithm = algorithm; in get_supported_block_modes()
479 keymaster_algorithm_t algorithm, in get_supported_padding_modes() argument
491 return km1_dev->get_supported_padding_modes(km1_dev, algorithm, purpose, modes, in get_supported_padding_modes()
495 request.algorithm = algorithm; in get_supported_padding_modes()
515 keymaster_algorithm_t algorithm, in get_supported_digests() argument
527 return km1_dev->get_supported_digests(km1_dev, algorithm, purpose, digests, digests_length); in get_supported_digests()
530 request.algorithm = algorithm; in get_supported_digests()
550 const keymaster1_device_t* dev, keymaster_algorithm_t algorithm, in get_supported_import_formats() argument
560 return km1_dev->get_supported_import_formats(km1_dev, algorithm, formats, formats_length); in get_supported_import_formats()
563 request.algorithm = algorithm; in get_supported_import_formats()
583 const keymaster1_device_t* dev, keymaster_algorithm_t algorithm, in get_supported_export_formats() argument
593 return km1_dev->get_supported_export_formats(km1_dev, algorithm, formats, formats_length); in get_supported_export_formats()
596 request.algorithm = algorithm; in get_supported_export_formats()
669 bool SoftKeymasterDevice::FindUnsupportedDigest(keymaster_algorithm_t algorithm, in FindUnsupportedDigest() argument
675 auto supported_digests = km1_device_digests_.find(std::make_pair(algorithm, purpose)); in FindUnsupportedDigest()
691 bool SoftKeymasterDevice::RequiresSoftwareDigesting(keymaster_algorithm_t algorithm, in RequiresSoftwareDigesting() argument
698 switch (algorithm) { in RequiresSoftwareDigesting()
700 LOG_D("Not performing software digesting for AES keys", algorithm); in RequiresSoftwareDigesting()
709 if (!FindUnsupportedDigest(algorithm, purpose, params, &unsupported)) { in RequiresSoftwareDigesting()
710 LOG_D("Requested digest(s) supported for algorithm %d and purpose %d", algorithm, purpose); in RequiresSoftwareDigesting()
723 keymaster_algorithm_t algorithm; in KeyRequiresSoftwareDigesting() local
724 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm)) { in KeyRequiresSoftwareDigesting()
732 if (RequiresSoftwareDigesting(algorithm, purpose, key_description)) in KeyRequiresSoftwareDigesting()
1226 keymaster_algorithm_t algorithm = KM_ALGORITHM_AES; in begin() local
1227 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in begin()
1228 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in begin()
1232 if (algorithm == KM_ALGORITHM_HMAC) { in begin()
1243 if (!skdev->RequiresSoftwareDigesting(algorithm, purpose, in_params_set)) { in begin()
1625 void SoftKeymasterDevice::StoreDefaultNewKeyParams(keymaster_algorithm_t algorithm, in StoreDefaultNewKeyParams() argument
1641 if (algorithm == KM_ALGORITHM_RSA) { in StoreDefaultNewKeyParams()