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()
404 keymaster_algorithm_t algorithm, in get_supported_block_modes() argument
414 return km1_dev->get_supported_block_modes(km1_dev, algorithm, purpose, modes, modes_length); in get_supported_block_modes()
418 request.algorithm = algorithm; in get_supported_block_modes()
438 keymaster_algorithm_t algorithm, in get_supported_padding_modes() argument
448 return km1_dev->get_supported_padding_modes(km1_dev, algorithm, purpose, modes, in get_supported_padding_modes()
453 request.algorithm = algorithm; in get_supported_padding_modes()
472 keymaster_algorithm_t algorithm, in get_supported_digests() argument
482 return km1_dev->get_supported_digests(km1_dev, algorithm, purpose, digests, digests_length); in get_supported_digests()
486 request.algorithm = algorithm; in get_supported_digests()
505 const keymaster1_device_t* dev, keymaster_algorithm_t algorithm, in get_supported_import_formats() argument
513 return km1_dev->get_supported_import_formats(km1_dev, algorithm, formats, formats_length); in get_supported_import_formats()
517 request.algorithm = algorithm; in get_supported_import_formats()
536 const keymaster1_device_t* dev, keymaster_algorithm_t algorithm, in get_supported_export_formats() argument
544 return km1_dev->get_supported_export_formats(km1_dev, algorithm, formats, formats_length); in get_supported_export_formats()
548 request.algorithm = algorithm; in get_supported_export_formats()
614 bool SoftKeymasterDevice::FindUnsupportedDigest(keymaster_algorithm_t algorithm, in FindUnsupportedDigest() argument
620 auto supported_digests = km1_device_digests_.find(std::make_pair(algorithm, purpose)); in FindUnsupportedDigest()
636 bool SoftKeymasterDevice::RequiresSoftwareDigesting(keymaster_algorithm_t algorithm, in RequiresSoftwareDigesting() argument
642 switch (algorithm) { in RequiresSoftwareDigesting()
645 LOG_D("Not performing software digesting for algorithm %d", algorithm); in RequiresSoftwareDigesting()
654 if (!FindUnsupportedDigest(algorithm, purpose, params, &unsupported)) { in RequiresSoftwareDigesting()
655 LOG_D("Requested digest(s) supported for algorithm %d and purpose %d", algorithm, purpose); in RequiresSoftwareDigesting()
667 keymaster_algorithm_t algorithm; in KeyRequiresSoftwareDigesting() local
668 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm)) { in KeyRequiresSoftwareDigesting()
676 if (RequiresSoftwareDigesting(algorithm, purpose, key_description)) return true; in KeyRequiresSoftwareDigesting()
1124 keymaster_algorithm_t algorithm = KM_ALGORITHM_AES; in begin() local
1125 if (!akmKey->hw_enforced().GetTagValue(TAG_ALGORITHM, &algorithm) && in begin()
1126 !akmKey->sw_enforced().GetTagValue(TAG_ALGORITHM, &algorithm)) { in begin()
1130 if (algorithm == KM_ALGORITHM_HMAC) { in begin()
1141 if (!skdev->RequiresSoftwareDigesting(algorithm, purpose, in_params_set)) { in begin()
1501 void SoftKeymasterDevice::StoreDefaultNewKeyParams(keymaster_algorithm_t algorithm, in StoreDefaultNewKeyParams() argument
1517 if (algorithm == KM_ALGORITHM_RSA) { in StoreDefaultNewKeyParams()