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_POLY1305_KUNIT_TEST 42 tristate "KUnit tests for Poly1305" 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_POLY1305 47 help 48 KUnit tests for the Poly1305 library functions. 49 50config CRYPTO_LIB_POLYVAL_KUNIT_TEST 51 tristate "KUnit tests for POLYVAL" if !KUNIT_ALL_TESTS 52 depends on KUNIT 53 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 54 select CRYPTO_LIB_BENCHMARK_VISIBLE 55 select CRYPTO_LIB_POLYVAL 56 help 57 KUnit tests for the POLYVAL library functions. 58 59config CRYPTO_LIB_SHA1_KUNIT_TEST 60 tristate "KUnit tests for SHA-1" if !KUNIT_ALL_TESTS 61 depends on KUNIT 62 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 63 select CRYPTO_LIB_BENCHMARK_VISIBLE 64 select CRYPTO_LIB_SHA1 65 help 66 KUnit tests for the SHA-1 cryptographic hash function and its 67 corresponding HMAC. 68 69# Option is named *_SHA256_KUNIT_TEST, though both SHA-224 and SHA-256 tests are 70# included, for consistency with the naming used elsewhere (e.g. CRYPTO_SHA256). 71config CRYPTO_LIB_SHA256_KUNIT_TEST 72 tristate "KUnit tests for SHA-224 and SHA-256" if !KUNIT_ALL_TESTS 73 depends on KUNIT 74 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 75 select CRYPTO_LIB_BENCHMARK_VISIBLE 76 select CRYPTO_LIB_SHA256 77 help 78 KUnit tests for the SHA-224 and SHA-256 cryptographic hash functions 79 and their corresponding HMACs. 80 81# Option is named *_SHA512_KUNIT_TEST, though both SHA-384 and SHA-512 tests are 82# included, for consistency with the naming used elsewhere (e.g. CRYPTO_SHA512). 83config CRYPTO_LIB_SHA512_KUNIT_TEST 84 tristate "KUnit tests for SHA-384 and SHA-512" if !KUNIT_ALL_TESTS 85 depends on KUNIT 86 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 87 select CRYPTO_LIB_BENCHMARK_VISIBLE 88 select CRYPTO_LIB_SHA512 89 help 90 KUnit tests for the SHA-384 and SHA-512 cryptographic hash functions 91 and their corresponding HMACs. 92 93config CRYPTO_LIB_SHA3_KUNIT_TEST 94 tristate "KUnit tests for SHA-3" if !KUNIT_ALL_TESTS 95 depends on KUNIT 96 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 97 select CRYPTO_LIB_BENCHMARK_VISIBLE 98 select CRYPTO_LIB_SHA3 99 help 100 KUnit tests for the SHA3 cryptographic hash and XOF functions, 101 including SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128 and 102 SHAKE256. 103 104config CRYPTO_LIB_BENCHMARK_VISIBLE 105 bool 106 107config CRYPTO_LIB_BENCHMARK 108 bool "Include benchmarks in KUnit tests for cryptographic functions" 109 depends on CRYPTO_LIB_BENCHMARK_VISIBLE 110 help 111 Include benchmarks in the KUnit tests for cryptographic functions. 112 The benchmark results are printed to the kernel log when the 113 corresponding KUnit test suite runs. 114 115 This is useful for evaluating the performance of the cryptographic 116 functions. However, it will increase the runtime of the KUnit tests. 117 118 If you're only interested in correctness testing, leave this disabled. 119