1746b2e02SArd Biesheuvel# SPDX-License-Identifier: GPL-2.0 2746b2e02SArd Biesheuvel 3e56e1898SJustin M. Forbesmenu "Crypto library routines" 4e56e1898SJustin M. Forbes 57033b937SEric Biggersconfig CRYPTO_LIB_UTILS 67033b937SEric Biggers tristate 77033b937SEric Biggers 8746b2e02SArd Biesheuvelconfig CRYPTO_LIB_AES 9746b2e02SArd Biesheuvel tristate 10746b2e02SArd Biesheuvel 11f1354404SArd Biesheuvelconfig CRYPTO_LIB_AESCFB 12f1354404SArd Biesheuvel tristate 13f1354404SArd Biesheuvel select CRYPTO_LIB_AES 14f1354404SArd Biesheuvel select CRYPTO_LIB_UTILS 15f1354404SArd Biesheuvel 16520af5daSArd Biesheuvelconfig CRYPTO_LIB_AESGCM 17520af5daSArd Biesheuvel tristate 18520af5daSArd Biesheuvel select CRYPTO_LIB_AES 19520af5daSArd Biesheuvel select CRYPTO_LIB_GF128MUL 20520af5daSArd Biesheuvel select CRYPTO_LIB_UTILS 21520af5daSArd Biesheuvel 22746b2e02SArd Biesheuvelconfig CRYPTO_LIB_ARC4 23746b2e02SArd Biesheuvel tristate 24746b2e02SArd Biesheuvel 2561c581a4SArd Biesheuvelconfig CRYPTO_LIB_GF128MUL 2661c581a4SArd Biesheuvel tristate 2761c581a4SArd Biesheuvel 2866d7fb94SJason A. Donenfeldconfig CRYPTO_ARCH_HAVE_LIB_BLAKE2S 296048fdccSJason A. Donenfeld bool 3066d7fb94SJason A. Donenfeld help 3166d7fb94SJason A. Donenfeld Declares whether the architecture provides an arch-specific 3266d7fb94SJason A. Donenfeld accelerated implementation of the Blake2s library interface, 3366d7fb94SJason A. Donenfeld either builtin or as a module. 3466d7fb94SJason A. Donenfeld 3566d7fb94SJason A. Donenfeldconfig CRYPTO_LIB_BLAKE2S_GENERIC 366048fdccSJason A. Donenfeld def_bool !CRYPTO_ARCH_HAVE_LIB_BLAKE2S 3766d7fb94SJason A. Donenfeld help 3866d7fb94SJason A. Donenfeld This symbol can be depended upon by arch implementations of the 3966d7fb94SJason A. Donenfeld Blake2s library interface that require the generic code as a 4066d7fb94SJason A. Donenfeld fallback, e.g., for SIMD implementations. If no arch specific 4166d7fb94SJason A. Donenfeld implementation is enabled, this implementation serves the users 4266d7fb94SJason A. Donenfeld of CRYPTO_LIB_BLAKE2S. 4366d7fb94SJason A. Donenfeld 445fb8ef25SArd Biesheuvelconfig CRYPTO_ARCH_HAVE_LIB_CHACHA 451047e21aSHerbert Xu bool 465fb8ef25SArd Biesheuvel help 475fb8ef25SArd Biesheuvel Declares whether the architecture provides an arch-specific 485fb8ef25SArd Biesheuvel accelerated implementation of the ChaCha library interface, 495fb8ef25SArd Biesheuvel either builtin or as a module. 505fb8ef25SArd Biesheuvel 515fb8ef25SArd Biesheuvelconfig CRYPTO_LIB_CHACHA_GENERIC 525fb8ef25SArd Biesheuvel tristate 53879f4754SEric Biggers default CRYPTO_LIB_CHACHA if !CRYPTO_ARCH_HAVE_LIB_CHACHA 546e78ad0bSEric Biggers select CRYPTO_LIB_UTILS 555fb8ef25SArd Biesheuvel help 56879f4754SEric Biggers This symbol can be selected by arch implementations of the ChaCha 57879f4754SEric Biggers library interface that require the generic code as a fallback, e.g., 58879f4754SEric Biggers for SIMD implementations. If no arch specific implementation is 59879f4754SEric Biggers enabled, this implementation serves the users of CRYPTO_LIB_CHACHA. 6017ec3e71SHerbert Xu 615fb8ef25SArd Biesheuvelconfig CRYPTO_LIB_CHACHA 62edc8e80bSArnd Bergmann tristate 635fb8ef25SArd Biesheuvel help 645fb8ef25SArd Biesheuvel Enable the ChaCha library interface. This interface may be fulfilled 655fb8ef25SArd Biesheuvel by either the generic implementation or an arch-specific one, if one 665fb8ef25SArd Biesheuvel is available and enabled. 675fb8ef25SArd Biesheuvel 680ed42a6fSJason A. Donenfeldconfig CRYPTO_ARCH_HAVE_LIB_CURVE25519 691047e21aSHerbert Xu bool 700ed42a6fSJason A. Donenfeld help 710ed42a6fSJason A. Donenfeld Declares whether the architecture provides an arch-specific 720ed42a6fSJason A. Donenfeld accelerated implementation of the Curve25519 library interface, 730ed42a6fSJason A. Donenfeld either builtin or as a module. 740ed42a6fSJason A. Donenfeld 750ed42a6fSJason A. Donenfeldconfig CRYPTO_LIB_CURVE25519_GENERIC 760ed42a6fSJason A. Donenfeld tristate 7717ec3e71SHerbert Xu select CRYPTO_LIB_UTILS 780ed42a6fSJason A. Donenfeld help 790ed42a6fSJason A. Donenfeld This symbol can be depended upon by arch implementations of the 800ed42a6fSJason A. Donenfeld Curve25519 library interface that require the generic code as a 810ed42a6fSJason A. Donenfeld fallback, e.g., for SIMD implementations. If no arch specific 820ed42a6fSJason A. Donenfeld implementation is enabled, this implementation serves the users 830ed42a6fSJason A. Donenfeld of CRYPTO_LIB_CURVE25519. 840ed42a6fSJason A. Donenfeld 8517ec3e71SHerbert Xuconfig CRYPTO_LIB_CURVE25519_INTERNAL 8617ec3e71SHerbert Xu tristate 8717ec3e71SHerbert Xu select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n 8817ec3e71SHerbert Xu 890ed42a6fSJason A. Donenfeldconfig CRYPTO_LIB_CURVE25519 90edc8e80bSArnd Bergmann tristate 9117ec3e71SHerbert Xu select CRYPTO 9217ec3e71SHerbert Xu select CRYPTO_LIB_CURVE25519_INTERNAL 930ed42a6fSJason A. Donenfeld help 940ed42a6fSJason A. Donenfeld Enable the Curve25519 library interface. This interface may be 950ed42a6fSJason A. Donenfeld fulfilled by either the generic implementation or an arch-specific 960ed42a6fSJason A. Donenfeld one, if one is available and enabled. 970ed42a6fSJason A. Donenfeld 98746b2e02SArd Biesheuvelconfig CRYPTO_LIB_DES 99746b2e02SArd Biesheuvel tristate 100746b2e02SArd Biesheuvel 101a1d93064SArd Biesheuvelconfig CRYPTO_LIB_POLY1305_RSIZE 102a1d93064SArd Biesheuvel int 103a11d055eSArd Biesheuvel default 2 if MIPS 104d7d7b853SJason A. Donenfeld default 11 if X86_64 105a6b803b3SArd Biesheuvel default 9 if ARM || ARM64 106a1d93064SArd Biesheuvel default 1 107a1d93064SArd Biesheuvel 108a1d93064SArd Biesheuvelconfig CRYPTO_ARCH_HAVE_LIB_POLY1305 1091047e21aSHerbert Xu bool 110a1d93064SArd Biesheuvel help 111a1d93064SArd Biesheuvel Declares whether the architecture provides an arch-specific 112a1d93064SArd Biesheuvel accelerated implementation of the Poly1305 library interface, 113a1d93064SArd Biesheuvel either builtin or as a module. 114a1d93064SArd Biesheuvel 11548ea8c6eSArd Biesheuvelconfig CRYPTO_LIB_POLY1305_GENERIC 11648ea8c6eSArd Biesheuvel tristate 117af9ce627SEric Biggers default CRYPTO_LIB_POLY1305 if !CRYPTO_ARCH_HAVE_LIB_POLY1305 118a1d93064SArd Biesheuvel help 119af9ce627SEric Biggers This symbol can be selected by arch implementations of the Poly1305 120af9ce627SEric Biggers library interface that require the generic code as a fallback, e.g., 121af9ce627SEric Biggers for SIMD implementations. If no arch specific implementation is 122af9ce627SEric Biggers enabled, this implementation serves the users of CRYPTO_LIB_POLY1305. 12317ec3e71SHerbert Xu 124a1d93064SArd Biesheuvelconfig CRYPTO_LIB_POLY1305 125edc8e80bSArnd Bergmann tristate 126a1d93064SArd Biesheuvel help 127a1d93064SArd Biesheuvel Enable the Poly1305 library interface. This interface may be fulfilled 128a1d93064SArd Biesheuvel by either the generic implementation or an arch-specific one, if one 129a1d93064SArd Biesheuvel is available and enabled. 13048ea8c6eSArd Biesheuvel 131ed20078bSArd Biesheuvelconfig CRYPTO_LIB_CHACHA20POLY1305 132edc8e80bSArnd Bergmann tristate 133ed20078bSArd Biesheuvel select CRYPTO_LIB_CHACHA 134ed20078bSArd Biesheuvel select CRYPTO_LIB_POLY1305 13517ec3e71SHerbert Xu select CRYPTO_LIB_UTILS 136ed20078bSArd Biesheuvel 137ec8f7f48SEric Biggersconfig CRYPTO_LIB_SHA1 138ec8f7f48SEric Biggers tristate 139ec8f7f48SEric Biggers 140746b2e02SArd Biesheuvelconfig CRYPTO_LIB_SHA256 141746b2e02SArd Biesheuvel tristate 142*950e5c84SEric Biggers help 143*950e5c84SEric Biggers Enable the SHA-256 library interface. This interface may be fulfilled 144*950e5c84SEric Biggers by either the generic implementation or an arch-specific one, if one 145*950e5c84SEric Biggers is available and enabled. 146*950e5c84SEric Biggers 147*950e5c84SEric Biggersconfig CRYPTO_ARCH_HAVE_LIB_SHA256 148*950e5c84SEric Biggers bool 149*950e5c84SEric Biggers help 150*950e5c84SEric Biggers Declares whether the architecture provides an arch-specific 151*950e5c84SEric Biggers accelerated implementation of the SHA-256 library interface. 152*950e5c84SEric Biggers 153*950e5c84SEric Biggersconfig CRYPTO_LIB_SHA256_GENERIC 154*950e5c84SEric Biggers tristate 155*950e5c84SEric Biggers default CRYPTO_LIB_SHA256 if !CRYPTO_ARCH_HAVE_LIB_SHA256 156*950e5c84SEric Biggers help 157*950e5c84SEric Biggers This symbol can be selected by arch implementations of the SHA-256 158*950e5c84SEric Biggers library interface that require the generic code as a fallback, e.g., 159*950e5c84SEric Biggers for SIMD implementations. If no arch specific implementation is 160*950e5c84SEric Biggers enabled, this implementation serves the users of CRYPTO_LIB_SHA256. 1612b31277aSTianjia Zhang 162f4065b2fSHerbert Xuconfig CRYPTO_LIB_SM3 163f4065b2fSHerbert Xu tristate 164f4065b2fSHerbert Xu 165714656a8SEric Biggersif !KMSAN # avoid false positives from assembly 166714656a8SEric Biggersif ARM 167714656a8SEric Biggerssource "arch/arm/lib/crypto/Kconfig" 168714656a8SEric Biggersendif 169cc16e228SEric Biggersif ARM64 170cc16e228SEric Biggerssource "arch/arm64/lib/crypto/Kconfig" 171cc16e228SEric Biggersendif 172939a54acSEric Biggersif MIPS 173939a54acSEric Biggerssource "arch/mips/lib/crypto/Kconfig" 174939a54acSEric Biggersendif 175f9f86c03SEric Biggersif PPC 176f9f86c03SEric Biggerssource "arch/powerpc/lib/crypto/Kconfig" 177f9f86c03SEric Biggersendif 178d604877cSEric Biggersif RISCV 179d604877cSEric Biggerssource "arch/riscv/lib/crypto/Kconfig" 180d604877cSEric Biggersendif 1813ea91323SEric Biggersif S390 1823ea91323SEric Biggerssource "arch/s390/lib/crypto/Kconfig" 1833ea91323SEric Biggersendif 184c7c18c94SEric Biggersif X86 185c7c18c94SEric Biggerssource "arch/x86/lib/crypto/Kconfig" 186c7c18c94SEric Biggersendif 187714656a8SEric Biggersendif 188714656a8SEric Biggers 189e56e1898SJustin M. Forbesendmenu 190