1# SPDX-License-Identifier: GPL-2.0-or-later 2 3config CRYPTO_LIB_MD5_KUNIT_TEST 4 tristate "KUnit tests for MD5" if !KUNIT_ALL_TESTS 5 depends on KUNIT 6 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 7 select CRYPTO_LIB_BENCHMARK_VISIBLE 8 select CRYPTO_LIB_MD5 9 help 10 KUnit tests for the MD5 cryptographic hash function and its 11 corresponding HMAC. 12 13config CRYPTO_LIB_POLY1305_KUNIT_TEST 14 tristate "KUnit tests for Poly1305" if !KUNIT_ALL_TESTS 15 depends on KUNIT 16 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 17 select CRYPTO_LIB_BENCHMARK_VISIBLE 18 select CRYPTO_LIB_POLY1305 19 help 20 KUnit tests for the Poly1305 library functions. 21 22config CRYPTO_LIB_SHA1_KUNIT_TEST 23 tristate "KUnit tests for SHA-1" if !KUNIT_ALL_TESTS 24 depends on KUNIT 25 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 26 select CRYPTO_LIB_BENCHMARK_VISIBLE 27 select CRYPTO_LIB_SHA1 28 help 29 KUnit tests for the SHA-1 cryptographic hash function and its 30 corresponding HMAC. 31 32# Option is named *_SHA256_KUNIT_TEST, though both SHA-224 and SHA-256 tests are 33# included, for consistency with the naming used elsewhere (e.g. CRYPTO_SHA256). 34config CRYPTO_LIB_SHA256_KUNIT_TEST 35 tristate "KUnit tests for SHA-224 and SHA-256" if !KUNIT_ALL_TESTS 36 depends on KUNIT 37 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 38 select CRYPTO_LIB_BENCHMARK_VISIBLE 39 select CRYPTO_LIB_SHA256 40 help 41 KUnit tests for the SHA-224 and SHA-256 cryptographic hash functions 42 and their corresponding HMACs. 43 44# Option is named *_SHA512_KUNIT_TEST, though both SHA-384 and SHA-512 tests are 45# included, for consistency with the naming used elsewhere (e.g. CRYPTO_SHA512). 46config CRYPTO_LIB_SHA512_KUNIT_TEST 47 tristate "KUnit tests for SHA-384 and SHA-512" if !KUNIT_ALL_TESTS 48 depends on KUNIT 49 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 50 select CRYPTO_LIB_BENCHMARK_VISIBLE 51 select CRYPTO_LIB_SHA512 52 help 53 KUnit tests for the SHA-384 and SHA-512 cryptographic hash functions 54 and their corresponding HMACs. 55 56config CRYPTO_LIB_BENCHMARK_VISIBLE 57 bool 58 59config CRYPTO_LIB_BENCHMARK 60 bool "Include benchmarks in KUnit tests for cryptographic functions" 61 depends on CRYPTO_LIB_BENCHMARK_VISIBLE 62 help 63 Include benchmarks in the KUnit tests for cryptographic functions. 64 The benchmark results are printed to the kernel log when the 65 corresponding KUnit test suite runs. 66 67 This is useful for evaluating the performance of the cryptographic 68 functions. However, it will increase the runtime of the KUnit tests. 69 70 If you're only interested in correctness testing, leave this disabled. 71