1# SPDX-License-Identifier: GPL-2.0-or-later 2 3config CRYPTO_LIB_BLAKE2S_KUNIT_TEST 4 tristate "KUnit tests for BLAKE2s" if !KUNIT_ALL_TESTS 5 depends on KUNIT 6 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 7 select CRYPTO_LIB_BENCHMARK_VISIBLE 8 # No need to select CRYPTO_LIB_BLAKE2S here, as that option doesn't 9 # exist; the BLAKE2s code is always built-in for the /dev/random driver. 10 help 11 KUnit tests for the BLAKE2s cryptographic hash function. 12 13config CRYPTO_LIB_CURVE25519_KUNIT_TEST 14 tristate "KUnit tests for Curve25519" if !KUNIT_ALL_TESTS 15 depends on KUNIT 16 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 17 select CRYPTO_LIB_BENCHMARK_VISIBLE 18 select CRYPTO_LIB_CURVE25519 19 help 20 KUnit tests for the Curve25519 Diffie-Hellman function. 21 22config CRYPTO_LIB_MD5_KUNIT_TEST 23 tristate "KUnit tests for MD5" 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_MD5 28 help 29 KUnit tests for the MD5 cryptographic hash function and its 30 corresponding HMAC. 31 32config CRYPTO_LIB_POLY1305_KUNIT_TEST 33 tristate "KUnit tests for Poly1305" if !KUNIT_ALL_TESTS 34 depends on KUNIT 35 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 36 select CRYPTO_LIB_BENCHMARK_VISIBLE 37 select CRYPTO_LIB_POLY1305 38 help 39 KUnit tests for the Poly1305 library functions. 40 41config CRYPTO_LIB_SHA1_KUNIT_TEST 42 tristate "KUnit tests for SHA-1" 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_SHA1 47 help 48 KUnit tests for the SHA-1 cryptographic hash function and its 49 corresponding HMAC. 50 51# Option is named *_SHA256_KUNIT_TEST, though both SHA-224 and SHA-256 tests are 52# included, for consistency with the naming used elsewhere (e.g. CRYPTO_SHA256). 53config CRYPTO_LIB_SHA256_KUNIT_TEST 54 tristate "KUnit tests for SHA-224 and SHA-256" if !KUNIT_ALL_TESTS 55 depends on KUNIT 56 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 57 select CRYPTO_LIB_BENCHMARK_VISIBLE 58 select CRYPTO_LIB_SHA256 59 help 60 KUnit tests for the SHA-224 and SHA-256 cryptographic hash functions 61 and their corresponding HMACs. 62 63# Option is named *_SHA512_KUNIT_TEST, though both SHA-384 and SHA-512 tests are 64# included, for consistency with the naming used elsewhere (e.g. CRYPTO_SHA512). 65config CRYPTO_LIB_SHA512_KUNIT_TEST 66 tristate "KUnit tests for SHA-384 and SHA-512" if !KUNIT_ALL_TESTS 67 depends on KUNIT 68 default KUNIT_ALL_TESTS || CRYPTO_SELFTESTS 69 select CRYPTO_LIB_BENCHMARK_VISIBLE 70 select CRYPTO_LIB_SHA512 71 help 72 KUnit tests for the SHA-384 and SHA-512 cryptographic hash functions 73 and their corresponding HMACs. 74 75config CRYPTO_LIB_BENCHMARK_VISIBLE 76 bool 77 78config CRYPTO_LIB_BENCHMARK 79 bool "Include benchmarks in KUnit tests for cryptographic functions" 80 depends on CRYPTO_LIB_BENCHMARK_VISIBLE 81 help 82 Include benchmarks in the KUnit tests for cryptographic functions. 83 The benchmark results are printed to the kernel log when the 84 corresponding KUnit test suite runs. 85 86 This is useful for evaluating the performance of the cryptographic 87 functions. However, it will increase the runtime of the KUnit tests. 88 89 If you're only interested in correctness testing, leave this disabled. 90