| 1 |
# SPDX-License-Identifier: GPL-2.0-or-later |
| 2 |
|
| 3 |
config CRYPTO_LIB_BLAKE2B_KUNIT_TEST |
| 4 |
tristate "KUnit tests for BLAKE2b" if !KUNIT_ALL_TESTS |
| 5 |
depends on KUNIT && CRYPTO_LIB_BLAKE2B |
| 6 |
default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS |
| 7 |
select CRYPTO_LIB_BENCHMARK_VISIBLE |
| 8 |
help |
| 9 |
KUnit tests for the BLAKE2b cryptographic hash function. |
| 10 |
|
| 11 |
config CRYPTO_LIB_BLAKE2S_KUNIT_TEST |
| 12 |
tristate "KUnit tests for BLAKE2s" if !KUNIT_ALL_TESTS |
| 13 |
depends on KUNIT |
| 14 |
default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS |
| 15 |
select CRYPTO_LIB_BENCHMARK_VISIBLE |
| 16 |
# No need to depend on CRYPTO_LIB_BLAKE2S here, as that option doesn't |
| 17 |
# exist; the BLAKE2s code is always built-in for the /dev/random driver. |
| 18 |
help |
| 19 |
KUnit tests for the BLAKE2s cryptographic hash function. |
| 20 |
|
| 21 |
config CRYPTO_LIB_CURVE25519_KUNIT_TEST |
| 22 |
tristate "KUnit tests for Curve25519" if !KUNIT_ALL_TESTS |
| 23 |
depends on KUNIT && CRYPTO_LIB_CURVE25519 |
| 24 |
default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS |
| 25 |
select CRYPTO_LIB_BENCHMARK_VISIBLE |
| 26 |
help |
| 27 |
KUnit tests for the Curve25519 Diffie-Hellman function. |
| 28 |
|
| 29 |
config CRYPTO_LIB_MD5_KUNIT_TEST |
| 30 |
tristate "KUnit tests for MD5" if !KUNIT_ALL_TESTS |
| 31 |
depends on KUNIT && CRYPTO_LIB_MD5 |
| 32 |
default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS |
| 33 |
select CRYPTO_LIB_BENCHMARK_VISIBLE |
| 34 |
help |
| 35 |
KUnit tests for the MD5 cryptographic hash function and its |
| 36 |
corresponding HMAC. |
| 37 |
|
| 38 |
config CRYPTO_LIB_MLDSA_KUNIT_TEST |
| 39 |
tristate "KUnit tests for ML-DSA" if !KUNIT_ALL_TESTS |
| 40 |
depends on KUNIT && CRYPTO_LIB_MLDSA |
| 41 |
default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS |
| 42 |
select CRYPTO_LIB_BENCHMARK_VISIBLE |
| 43 |
help |
| 44 |
KUnit tests for the ML-DSA digital signature algorithm. |
| 45 |
|
| 46 |
config CRYPTO_LIB_NH_KUNIT_TEST |
| 47 |
tristate "KUnit tests for NH" if !KUNIT_ALL_TESTS |
| 48 |
depends on KUNIT && CRYPTO_LIB_NH |
| 49 |
default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS |
| 50 |
help |
| 51 |
KUnit tests for the NH almost-universal hash function. |
| 52 |
|
| 53 |
config CRYPTO_LIB_POLY1305_KUNIT_TEST |
| 54 |
tristate "KUnit tests for Poly1305" if !KUNIT_ALL_TESTS |
| 55 |
depends on KUNIT && CRYPTO_LIB_POLY1305 |
| 56 |
default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS |
| 57 |
select CRYPTO_LIB_BENCHMARK_VISIBLE |
| 58 |
help |
| 59 |
KUnit tests for the Poly1305 library functions. |
| 60 |
|
| 61 |
config CRYPTO_LIB_POLYVAL_KUNIT_TEST |
| 62 |
tristate "KUnit tests for POLYVAL" if !KUNIT_ALL_TESTS |
| 63 |
depends on KUNIT && CRYPTO_LIB_POLYVAL |
| 64 |
default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS |
| 65 |
select CRYPTO_LIB_BENCHMARK_VISIBLE |
| 66 |
help |
| 67 |
KUnit tests for the POLYVAL library functions. |
| 68 |
|
| 69 |
config CRYPTO_LIB_SHA1_KUNIT_TEST |
| 70 |
tristate "KUnit tests for SHA-1" if !KUNIT_ALL_TESTS |
| 71 |
depends on KUNIT && CRYPTO_LIB_SHA1 |
| 72 |
default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS |
| 73 |
select CRYPTO_LIB_BENCHMARK_VISIBLE |
| 74 |
help |
| 75 |
KUnit tests for the SHA-1 cryptographic hash function and its |
| 76 |
corresponding HMAC. |
| 77 |
|
| 78 |
# Option is named *_SHA256_KUNIT_TEST, though both SHA-224 and SHA-256 tests are |
| 79 |
# included, for consistency with the naming used elsewhere (e.g. CRYPTO_SHA256). |
| 80 |
config CRYPTO_LIB_SHA256_KUNIT_TEST |
| 81 |
tristate "KUnit tests for SHA-224 and SHA-256" if !KUNIT_ALL_TESTS |
| 82 |
depends on KUNIT && CRYPTO_LIB_SHA256 |
| 83 |
default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS |
| 84 |
select CRYPTO_LIB_BENCHMARK_VISIBLE |
| 85 |
help |
| 86 |
KUnit tests for the SHA-224 and SHA-256 cryptographic hash functions |
| 87 |
and their corresponding HMACs. |
| 88 |
|
| 89 |
# Option is named *_SHA512_KUNIT_TEST, though both SHA-384 and SHA-512 tests are |
| 90 |
# included, for consistency with the naming used elsewhere (e.g. CRYPTO_SHA512). |
| 91 |
config CRYPTO_LIB_SHA512_KUNIT_TEST |
| 92 |
tristate "KUnit tests for SHA-384 and SHA-512" if !KUNIT_ALL_TESTS |
| 93 |
depends on KUNIT && CRYPTO_LIB_SHA512 |
| 94 |
default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS |
| 95 |
select CRYPTO_LIB_BENCHMARK_VISIBLE |
| 96 |
help |
| 97 |
KUnit tests for the SHA-384 and SHA-512 cryptographic hash functions |
| 98 |
and their corresponding HMACs. |
| 99 |
|
| 100 |
config CRYPTO_LIB_SHA3_KUNIT_TEST |
| 101 |
tristate "KUnit tests for SHA-3" if !KUNIT_ALL_TESTS |
| 102 |
depends on KUNIT && CRYPTO_LIB_SHA3 |
| 103 |
default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS |
| 104 |
select CRYPTO_LIB_BENCHMARK_VISIBLE |
| 105 |
help |
| 106 |
KUnit tests for the SHA3 cryptographic hash and XOF functions, |
| 107 |
including SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128 and |
| 108 |
SHAKE256. |
| 109 |
|
| 110 |
config CRYPTO_LIB_BENCHMARK_VISIBLE |
| 111 |
bool |
| 112 |
|
| 113 |
config CRYPTO_LIB_BENCHMARK |
| 114 |
bool "Include benchmarks in KUnit tests for cryptographic functions" |
| 115 |
depends on CRYPTO_LIB_BENCHMARK_VISIBLE |
| 116 |
help |
| 117 |
Include benchmarks in the KUnit tests for cryptographic functions. |
| 118 |
The benchmark results are printed to the kernel log when the |
| 119 |
corresponding KUnit test suite runs. |
| 120 |
|
| 121 |
This is useful for evaluating the performance of the cryptographic |
| 122 |
functions. However, it will increase the runtime of the KUnit tests. |
| 123 |
|
| 124 |
If you're only interested in correctness testing, leave this disabled. |