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_SHA1_KUNIT_TEST 51 tristate "KUnit tests for SHA-1" 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_SHA1 56 help 57 KUnit tests for the SHA-1 cryptographic hash function and its 58 corresponding HMAC. 59 60# Option is named *_SHA256_KUNIT_TEST, though both SHA-224 and SHA-256 tests are 61# included, for consistency with the naming used elsewhere (e.g. CRYPTO_SHA256). 62config CRYPTO_LIB_SHA256_KUNIT_TEST 63 tristate "KUnit tests for SHA-224 and SHA-256" if !KUNIT_ALL_TESTS 64 depends on KUNIT 65 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 66 select CRYPTO_LIB_BENCHMARK_VISIBLE 67 select CRYPTO_LIB_SHA256 68 help 69 KUnit tests for the SHA-224 and SHA-256 cryptographic hash functions 70 and their corresponding HMACs. 71 72# Option is named *_SHA512_KUNIT_TEST, though both SHA-384 and SHA-512 tests are 73# included, for consistency with the naming used elsewhere (e.g. CRYPTO_SHA512). 74config CRYPTO_LIB_SHA512_KUNIT_TEST 75 tristate "KUnit tests for SHA-384 and SHA-512" if !KUNIT_ALL_TESTS 76 depends on KUNIT 77 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 78 select CRYPTO_LIB_BENCHMARK_VISIBLE 79 select CRYPTO_LIB_SHA512 80 help 81 KUnit tests for the SHA-384 and SHA-512 cryptographic hash functions 82 and their corresponding HMACs. 83 84config CRYPTO_LIB_BENCHMARK_VISIBLE 85 bool 86 87config CRYPTO_LIB_BENCHMARK 88 bool "Include benchmarks in KUnit tests for cryptographic functions" 89 depends on CRYPTO_LIB_BENCHMARK_VISIBLE 90 help 91 Include benchmarks in the KUnit tests for cryptographic functions. 92 The benchmark results are printed to the kernel log when the 93 corresponding KUnit test suite runs. 94 95 This is useful for evaluating the performance of the cryptographic 96 functions. However, it will increase the runtime of the KUnit tests. 97 98 If you're only interested in correctness testing, leave this disabled. 99