Lines Matching refs:algorithm

109 static keymaster_error_t add_digests(keymaster1_device_t* dev, keymaster_algorithm_t algorithm,  in add_digests()  argument
112 auto key = std::make_pair(algorithm, purpose); in add_digests()
117 dev->get_supported_digests(dev, algorithm, purpose, &digests, &digests_length); in add_digests()
137 for (auto algorithm : sig_algorithms) in map_digests() local
141 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()
402 keymaster_algorithm_t algorithm, in get_supported_block_modes() argument
412 return km1_dev->get_supported_block_modes(km1_dev, algorithm, purpose, modes, modes_length); in get_supported_block_modes()
416 request.algorithm = algorithm; in get_supported_block_modes()
436 keymaster_algorithm_t algorithm, in get_supported_padding_modes() argument
446 return km1_dev->get_supported_padding_modes(km1_dev, algorithm, purpose, modes, in get_supported_padding_modes()
451 request.algorithm = algorithm; in get_supported_padding_modes()
470 keymaster_algorithm_t algorithm, in get_supported_digests() argument
480 return km1_dev->get_supported_digests(km1_dev, algorithm, purpose, digests, digests_length); in get_supported_digests()
484 request.algorithm = algorithm; in get_supported_digests()
503 const keymaster1_device_t* dev, keymaster_algorithm_t algorithm, in get_supported_import_formats() argument
511 return km1_dev->get_supported_import_formats(km1_dev, algorithm, formats, formats_length); in get_supported_import_formats()
515 request.algorithm = algorithm; in get_supported_import_formats()
534 const keymaster1_device_t* dev, keymaster_algorithm_t algorithm, in get_supported_export_formats() argument
542 return km1_dev->get_supported_export_formats(km1_dev, algorithm, formats, formats_length); in get_supported_export_formats()
546 request.algorithm = algorithm; in get_supported_export_formats()
612 bool SoftKeymasterDevice::FindUnsupportedDigest(keymaster_algorithm_t algorithm, in FindUnsupportedDigest() argument
618 auto supported_digests = km1_device_digests_.find(std::make_pair(algorithm, purpose)); in FindUnsupportedDigest()
634 bool SoftKeymasterDevice::RequiresSoftwareDigesting(keymaster_algorithm_t algorithm, in RequiresSoftwareDigesting() argument
640 switch (algorithm) { in RequiresSoftwareDigesting()
643 LOG_D("Not performing software digesting for algorithm %d", algorithm); in RequiresSoftwareDigesting()
652 if (!FindUnsupportedDigest(algorithm, purpose, params, &unsupported)) { in RequiresSoftwareDigesting()
653 LOG_D("Requested digest(s) supported for algorithm %d and purpose %d", algorithm, purpose); in RequiresSoftwareDigesting()
665 keymaster_algorithm_t algorithm; in KeyRequiresSoftwareDigesting() local
666 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm)) { in KeyRequiresSoftwareDigesting()
674 if (RequiresSoftwareDigesting(algorithm, purpose, key_description)) return true; in KeyRequiresSoftwareDigesting()
1122 keymaster_algorithm_t algorithm = KM_ALGORITHM_AES; in begin() local
1123 if (!akmKey->hw_enforced().GetTagValue(TAG_ALGORITHM, &algorithm) && in begin()
1124 !akmKey->sw_enforced().GetTagValue(TAG_ALGORITHM, &algorithm)) { in begin()
1128 if (algorithm == KM_ALGORITHM_HMAC) { in begin()
1139 if (!skdev->RequiresSoftwareDigesting(algorithm, purpose, in_params_set)) { in begin()
1499 void SoftKeymasterDevice::StoreDefaultNewKeyParams(keymaster_algorithm_t algorithm, in StoreDefaultNewKeyParams() argument
1515 if (algorithm == KM_ALGORITHM_RSA) { in StoreDefaultNewKeyParams()