Lines Matching refs:algorithm
110 static keymaster_error_t add_digests(keymaster1_device_t* dev, keymaster_algorithm_t algorithm, in add_digests() argument
113 auto key = std::make_pair(algorithm, purpose); in add_digests()
118 dev->get_supported_digests(dev, algorithm, purpose, &digests, &digests_length); in add_digests()
138 for (auto algorithm : sig_algorithms) in map_digests() local
142 add_digests(dev, algorithm, purpose, map, &alg_purpose_supports_all); in map_digests()
150 for (auto algorithm : crypt_algorithms) in map_digests() local
154 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()
667 bool SoftKeymasterDevice::FindUnsupportedDigest(keymaster_algorithm_t algorithm, in FindUnsupportedDigest() argument
673 auto supported_digests = km1_device_digests_.find(std::make_pair(algorithm, purpose)); in FindUnsupportedDigest()
689 bool SoftKeymasterDevice::RequiresSoftwareDigesting(keymaster_algorithm_t algorithm, in RequiresSoftwareDigesting() argument
696 switch (algorithm) { in RequiresSoftwareDigesting()
699 LOG_D("Not performing software digesting for algorithm %d", algorithm); in RequiresSoftwareDigesting()
708 if (!FindUnsupportedDigest(algorithm, purpose, params, &unsupported)) { in RequiresSoftwareDigesting()
709 LOG_D("Requested digest(s) supported for algorithm %d and purpose %d", algorithm, purpose); in RequiresSoftwareDigesting()
722 keymaster_algorithm_t algorithm; in KeyRequiresSoftwareDigesting() local
723 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm)) { in KeyRequiresSoftwareDigesting()
731 if (RequiresSoftwareDigesting(algorithm, purpose, key_description)) in KeyRequiresSoftwareDigesting()
1221 keymaster_algorithm_t algorithm = KM_ALGORITHM_AES; in begin() local
1222 if (!akmKey->hw_enforced().GetTagValue(TAG_ALGORITHM, &algorithm) && in begin()
1223 !akmKey->sw_enforced().GetTagValue(TAG_ALGORITHM, &algorithm)) { in begin()
1227 if (algorithm == KM_ALGORITHM_HMAC) { in begin()
1238 if (!skdev->RequiresSoftwareDigesting(algorithm, purpose, in_params_set)) { in begin()
1620 void SoftKeymasterDevice::StoreDefaultNewKeyParams(keymaster_algorithm_t algorithm, in StoreDefaultNewKeyParams() argument
1636 if (algorithm == KM_ALGORITHM_RSA) { in StoreDefaultNewKeyParams()