1746b2e02SArd Biesheuvel# SPDX-License-Identifier: GPL-2.0 2746b2e02SArd Biesheuvel 3e56e1898SJustin M. Forbesmenu "Crypto library routines" 4e56e1898SJustin M. Forbes 5aacb37f5SEric Biggersconfig CRYPTO_HASH_INFO 6aacb37f5SEric Biggers bool 7aacb37f5SEric Biggers 87033b937SEric Biggersconfig CRYPTO_LIB_UTILS 97033b937SEric Biggers tristate 107033b937SEric Biggers 11746b2e02SArd Biesheuvelconfig CRYPTO_LIB_AES 12746b2e02SArd Biesheuvel tristate 13746b2e02SArd Biesheuvel 14f1354404SArd Biesheuvelconfig CRYPTO_LIB_AESCFB 15f1354404SArd Biesheuvel tristate 16f1354404SArd Biesheuvel select CRYPTO_LIB_AES 17f1354404SArd Biesheuvel select CRYPTO_LIB_UTILS 18f1354404SArd Biesheuvel 19520af5daSArd Biesheuvelconfig CRYPTO_LIB_AESGCM 20520af5daSArd Biesheuvel tristate 21520af5daSArd Biesheuvel select CRYPTO_LIB_AES 22520af5daSArd Biesheuvel select CRYPTO_LIB_GF128MUL 23520af5daSArd Biesheuvel select CRYPTO_LIB_UTILS 24520af5daSArd Biesheuvel 25746b2e02SArd Biesheuvelconfig CRYPTO_LIB_ARC4 26746b2e02SArd Biesheuvel tristate 27746b2e02SArd Biesheuvel 2861c581a4SArd Biesheuvelconfig CRYPTO_LIB_GF128MUL 2961c581a4SArd Biesheuvel tristate 3061c581a4SArd Biesheuvel 3139ee3970SEric Biggers# BLAKE2s support is always built-in, so there's no CRYPTO_LIB_BLAKE2S option. 3266d7fb94SJason A. Donenfeld 3339ee3970SEric Biggersconfig CRYPTO_LIB_BLAKE2S_ARCH 3439ee3970SEric Biggers bool 3539ee3970SEric Biggers depends on !UML 3639ee3970SEric Biggers default y if ARM 3739ee3970SEric Biggers default y if X86_64 3866d7fb94SJason A. Donenfeld 395fb8ef25SArd Biesheuvelconfig CRYPTO_LIB_CHACHA 40edc8e80bSArnd Bergmann tristate 4113cecc52SEric Biggers select CRYPTO_LIB_UTILS 425fb8ef25SArd Biesheuvel help 4313cecc52SEric Biggers Enable the ChaCha library interface. Select this if your module uses 4413cecc52SEric Biggers chacha_crypt() or hchacha_block(). 4513cecc52SEric Biggers 4613cecc52SEric Biggersconfig CRYPTO_LIB_CHACHA_ARCH 4713cecc52SEric Biggers bool 4813cecc52SEric Biggers depends on CRYPTO_LIB_CHACHA && !UML && !KMSAN 4913cecc52SEric Biggers default y if ARM 5013cecc52SEric Biggers default y if ARM64 && KERNEL_MODE_NEON 5113cecc52SEric Biggers default y if MIPS && CPU_MIPS32_R2 5213cecc52SEric Biggers default y if PPC64 && CPU_LITTLE_ENDIAN && VSX 5313cecc52SEric Biggers default y if RISCV && 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO 5413cecc52SEric Biggers default y if S390 5513cecc52SEric Biggers default y if X86_64 565fb8ef25SArd Biesheuvel 57*68546e56SEric Biggersconfig CRYPTO_LIB_CURVE25519 580ed42a6fSJason A. Donenfeld tristate 5917ec3e71SHerbert Xu select CRYPTO_LIB_UTILS 600ed42a6fSJason A. Donenfeld help 61*68546e56SEric Biggers The Curve25519 library functions. Select this if your module uses any 62*68546e56SEric Biggers of the functions from <crypto/curve25519.h>. 630ed42a6fSJason A. Donenfeld 64*68546e56SEric Biggersconfig CRYPTO_LIB_CURVE25519_ARCH 65*68546e56SEric Biggers bool 66*68546e56SEric Biggers depends on CRYPTO_LIB_CURVE25519 && !UML && !KMSAN 67*68546e56SEric Biggers default y if ARM && KERNEL_MODE_NEON 68*68546e56SEric Biggers default y if PPC64 && CPU_LITTLE_ENDIAN 69*68546e56SEric Biggers default y if X86_64 7017ec3e71SHerbert Xu 71*68546e56SEric Biggersconfig CRYPTO_LIB_CURVE25519_GENERIC 72*68546e56SEric Biggers bool 73*68546e56SEric Biggers depends on CRYPTO_LIB_CURVE25519 74*68546e56SEric Biggers default y if !CRYPTO_LIB_CURVE25519_ARCH || ARM || X86_64 750ed42a6fSJason A. Donenfeld 76746b2e02SArd Biesheuvelconfig CRYPTO_LIB_DES 77746b2e02SArd Biesheuvel tristate 78746b2e02SArd Biesheuvel 79e1644613SEric Biggersconfig CRYPTO_LIB_MD5 80e1644613SEric Biggers tristate 81e1644613SEric Biggers help 82e1644613SEric Biggers The MD5 and HMAC-MD5 library functions. Select this if your module 83e1644613SEric Biggers uses any of the functions from <crypto/md5.h>. 84e1644613SEric Biggers 85e1644613SEric Biggersconfig CRYPTO_LIB_MD5_ARCH 86e1644613SEric Biggers bool 87e1644613SEric Biggers depends on CRYPTO_LIB_MD5 && !UML 88c9e5ac0aSEric Biggers default y if MIPS && CPU_CAVIUM_OCTEON 8909371e13SEric Biggers default y if PPC 90a1848f6eSEric Biggers default y if SPARC64 91e1644613SEric Biggers 92b646b782SEric Biggersconfig CRYPTO_LIB_POLY1305 93b646b782SEric Biggers tristate 94b646b782SEric Biggers help 95b646b782SEric Biggers The Poly1305 library functions. Select this if your module uses any 96b646b782SEric Biggers of the functions from <crypto/poly1305.h>. 97b646b782SEric Biggers 98b646b782SEric Biggersconfig CRYPTO_LIB_POLY1305_ARCH 99b646b782SEric Biggers bool 100b646b782SEric Biggers depends on CRYPTO_LIB_POLY1305 && !UML 101b646b782SEric Biggers default y if ARM 102b646b782SEric Biggers default y if ARM64 && KERNEL_MODE_NEON 103b646b782SEric Biggers default y if MIPS 104b646b782SEric Biggers # The PPC64 code needs to be fixed to work in softirq context. 105b646b782SEric Biggers default y if PPC64 && CPU_LITTLE_ENDIAN && VSX && BROKEN 106bef9c755SZhihang Shao default y if RISCV 107b646b782SEric Biggers default y if X86_64 108b646b782SEric Biggers 109b646b782SEric Biggers# This symbol controls the inclusion of the Poly1305 generic code. This differs 110b646b782SEric Biggers# from most of the other algorithms, which handle the generic code 111b646b782SEric Biggers# "automatically" via __maybe_unused. This is needed so that the Adiantum code, 112b646b782SEric Biggers# which calls the poly1305_core_*() functions directly, can enable them. 113b646b782SEric Biggersconfig CRYPTO_LIB_POLY1305_GENERIC 114b646b782SEric Biggers bool 115b646b782SEric Biggers depends on CRYPTO_LIB_POLY1305 116b646b782SEric Biggers # Enable if there's no arch impl or the arch impl requires the generic 117b646b782SEric Biggers # impl as a fallback. (Or if selected explicitly.) 118b646b782SEric Biggers default y if !CRYPTO_LIB_POLY1305_ARCH || PPC64 119b646b782SEric Biggers 120a1d93064SArd Biesheuvelconfig CRYPTO_LIB_POLY1305_RSIZE 121a1d93064SArd Biesheuvel int 122bef9c755SZhihang Shao default 2 if MIPS || RISCV 123d7d7b853SJason A. Donenfeld default 11 if X86_64 124a6b803b3SArd Biesheuvel default 9 if ARM || ARM64 125a1d93064SArd Biesheuvel default 1 126a1d93064SArd Biesheuvel 127ed20078bSArd Biesheuvelconfig CRYPTO_LIB_CHACHA20POLY1305 128edc8e80bSArnd Bergmann tristate 129ed20078bSArd Biesheuvel select CRYPTO_LIB_CHACHA 130ed20078bSArd Biesheuvel select CRYPTO_LIB_POLY1305 13117ec3e71SHerbert Xu select CRYPTO_LIB_UTILS 132ed20078bSArd Biesheuvel 133ec8f7f48SEric Biggersconfig CRYPTO_LIB_SHA1 134ec8f7f48SEric Biggers tristate 13590860aefSEric Biggers help 136d73915fdSEric Biggers The SHA-1 and HMAC-SHA1 library functions. Select this if your module 137d73915fdSEric Biggers uses any of the functions from <crypto/sha1.h>. 13890860aefSEric Biggers 13990860aefSEric Biggersconfig CRYPTO_LIB_SHA1_ARCH 14090860aefSEric Biggers bool 14190860aefSEric Biggers depends on CRYPTO_LIB_SHA1 && !UML 14270cb6ca5SEric Biggers default y if ARM 14300d549bbSEric Biggers default y if ARM64 && KERNEL_MODE_NEON 144b6ac1dacSEric Biggers default y if MIPS && CPU_CAVIUM_OCTEON 1456b9ae8cfSEric Biggers default y if PPC 146377982d5SEric Biggers default y if S390 147c7510599SEric Biggers default y if SPARC64 148f3d6cb3dSEric Biggers default y if X86_64 149ec8f7f48SEric Biggers 150746b2e02SArd Biesheuvelconfig CRYPTO_LIB_SHA256 151746b2e02SArd Biesheuvel tristate 152950e5c84SEric Biggers help 153d73915fdSEric Biggers The SHA-224, SHA-256, HMAC-SHA224, and HMAC-SHA256 library functions. 154d73915fdSEric Biggers Select this if your module uses any of these functions from 155d73915fdSEric Biggers <crypto/sha2.h>. 156950e5c84SEric Biggers 157e96cb950SEric Biggersconfig CRYPTO_LIB_SHA256_ARCH 158950e5c84SEric Biggers bool 159e96cb950SEric Biggers depends on CRYPTO_LIB_SHA256 && !UML 160e96cb950SEric Biggers default y if ARM && !CPU_V7M 161e96cb950SEric Biggers default y if ARM64 162e96cb950SEric Biggers default y if MIPS && CPU_CAVIUM_OCTEON 163e96cb950SEric Biggers default y if PPC && SPE 164e96cb950SEric Biggers default y if RISCV && 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO 165e96cb950SEric Biggers default y if S390 166e96cb950SEric Biggers default y if SPARC64 167e96cb950SEric Biggers default y if X86_64 1682b31277aSTianjia Zhang 169b693c703SEric Biggersconfig CRYPTO_LIB_SHA512 170b693c703SEric Biggers tristate 171b693c703SEric Biggers help 17223e8b437SEric Biggers The SHA-384, SHA-512, HMAC-SHA384, and HMAC-SHA512 library functions. 17323e8b437SEric Biggers Select this if your module uses any of these functions from 17423e8b437SEric Biggers <crypto/sha2.h>. 175b693c703SEric Biggers 176b693c703SEric Biggersconfig CRYPTO_LIB_SHA512_ARCH 177b693c703SEric Biggers bool 178b693c703SEric Biggers depends on CRYPTO_LIB_SHA512 && !UML 17924c91b62SEric Biggers default y if ARM && !CPU_V7M 18060e3f1e9SEric Biggers default y if ARM64 1817117739aSEric Biggers default y if MIPS && CPU_CAVIUM_OCTEON 182b59059a2SEric Biggers default y if RISCV && 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO 183b7b36608SEric Biggers default y if S390 18402b35babSEric Biggers default y if SPARC64 185484c1811SEric Biggers default y if X86_64 186b693c703SEric Biggers 187f4065b2fSHerbert Xuconfig CRYPTO_LIB_SM3 188f4065b2fSHerbert Xu tristate 189f4065b2fSHerbert Xu 1904dcf6cadSEric Biggerssource "lib/crypto/tests/Kconfig" 1914dcf6cadSEric Biggers 192e56e1898SJustin M. Forbesendmenu 193