xref: /linux/lib/crypto/tests/Kconfig (revision 571eaeddb67df84c4fd59c5496866c049fb25efe)
1# SPDX-License-Identifier: GPL-2.0-or-later
2
3# Option is named *_SHA256_KUNIT_TEST, though both SHA-224 and SHA-256 tests are
4# included, for consistency with the naming used elsewhere (e.g. CRYPTO_SHA256).
5config CRYPTO_LIB_SHA256_KUNIT_TEST
6	tristate "KUnit tests for SHA-224 and SHA-256" if !KUNIT_ALL_TESTS
7	depends on KUNIT
8	default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS
9	select CRYPTO_LIB_BENCHMARK_VISIBLE
10	select CRYPTO_LIB_SHA256
11	help
12	  KUnit tests for the SHA-224 and SHA-256 cryptographic hash functions
13	  and their corresponding HMACs.
14
15# Option is named *_SHA512_KUNIT_TEST, though both SHA-384 and SHA-512 tests are
16# included, for consistency with the naming used elsewhere (e.g. CRYPTO_SHA512).
17config CRYPTO_LIB_SHA512_KUNIT_TEST
18	tristate "KUnit tests for SHA-384 and SHA-512" if !KUNIT_ALL_TESTS
19	depends on KUNIT
20	default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS
21	select CRYPTO_LIB_BENCHMARK_VISIBLE
22	select CRYPTO_LIB_SHA512
23	help
24	  KUnit tests for the SHA-384 and SHA-512 cryptographic hash functions
25	  and their corresponding HMACs.
26
27config CRYPTO_LIB_BENCHMARK_VISIBLE
28	bool
29
30config CRYPTO_LIB_BENCHMARK
31	bool "Include benchmarks in KUnit tests for cryptographic functions"
32	depends on CRYPTO_LIB_BENCHMARK_VISIBLE
33	help
34	  Include benchmarks in the KUnit tests for cryptographic functions.
35	  The benchmark results are printed to the kernel log when the
36	  corresponding KUnit test suite runs.
37
38	  This is useful for evaluating the performance of the cryptographic
39	  functions.  However, it will increase the runtime of the KUnit tests.
40
41	  If you're only interested in correctness testing, leave this disabled.
42