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