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