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 142950e5c84SEric Biggers help 143950e5c84SEric Biggers Enable the SHA-256 library interface. This interface may be fulfilled 144950e5c84SEric Biggers by either the generic implementation or an arch-specific one, if one 145950e5c84SEric Biggers is available and enabled. 146950e5c84SEric Biggers 147950e5c84SEric Biggersconfig CRYPTO_ARCH_HAVE_LIB_SHA256 148950e5c84SEric Biggers bool 149950e5c84SEric Biggers help 150950e5c84SEric Biggers Declares whether the architecture provides an arch-specific 151950e5c84SEric Biggers accelerated implementation of the SHA-256 library interface. 152950e5c84SEric Biggers 1535b90a779SHerbert Xuconfig CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD 1545b90a779SHerbert Xu bool 1555b90a779SHerbert Xu help 1565b90a779SHerbert Xu Declares whether the architecture provides an arch-specific 1575b90a779SHerbert Xu accelerated implementation of the SHA-256 library interface 1585b90a779SHerbert Xu that is SIMD-based and therefore not usable in hardirq 1595b90a779SHerbert Xu context. 1605b90a779SHerbert Xu 161950e5c84SEric Biggersconfig CRYPTO_LIB_SHA256_GENERIC 162950e5c84SEric Biggers tristate 163950e5c84SEric Biggers default CRYPTO_LIB_SHA256 if !CRYPTO_ARCH_HAVE_LIB_SHA256 164950e5c84SEric Biggers help 165950e5c84SEric Biggers This symbol can be selected by arch implementations of the SHA-256 166950e5c84SEric Biggers library interface that require the generic code as a fallback, e.g., 167950e5c84SEric Biggers for SIMD implementations. If no arch specific implementation is 168950e5c84SEric Biggers enabled, this implementation serves the users of CRYPTO_LIB_SHA256. 1692b31277aSTianjia Zhang 170b693c703SEric Biggersconfig CRYPTO_LIB_SHA512 171b693c703SEric Biggers tristate 172b693c703SEric Biggers help 17323e8b437SEric Biggers The SHA-384, SHA-512, HMAC-SHA384, and HMAC-SHA512 library functions. 17423e8b437SEric Biggers Select this if your module uses any of these functions from 17523e8b437SEric Biggers <crypto/sha2.h>. 176b693c703SEric Biggers 177b693c703SEric Biggersconfig CRYPTO_LIB_SHA512_ARCH 178b693c703SEric Biggers bool 179b693c703SEric Biggers depends on CRYPTO_LIB_SHA512 && !UML 180*24c91b62SEric Biggers default y if ARM && !CPU_V7M 181b693c703SEric Biggers 182f4065b2fSHerbert Xuconfig CRYPTO_LIB_SM3 183f4065b2fSHerbert Xu tristate 184f4065b2fSHerbert Xu 185714656a8SEric Biggersif !KMSAN # avoid false positives from assembly 186714656a8SEric Biggersif ARM 187714656a8SEric Biggerssource "arch/arm/lib/crypto/Kconfig" 188714656a8SEric Biggersendif 189cc16e228SEric Biggersif ARM64 190cc16e228SEric Biggerssource "arch/arm64/lib/crypto/Kconfig" 191cc16e228SEric Biggersendif 192939a54acSEric Biggersif MIPS 193939a54acSEric Biggerssource "arch/mips/lib/crypto/Kconfig" 194939a54acSEric Biggersendif 195f9f86c03SEric Biggersif PPC 196f9f86c03SEric Biggerssource "arch/powerpc/lib/crypto/Kconfig" 197f9f86c03SEric Biggersendif 198d604877cSEric Biggersif RISCV 199d604877cSEric Biggerssource "arch/riscv/lib/crypto/Kconfig" 200d604877cSEric Biggersendif 2013ea91323SEric Biggersif S390 2023ea91323SEric Biggerssource "arch/s390/lib/crypto/Kconfig" 2033ea91323SEric Biggersendif 204699618d4SEric Biggersif SPARC 205699618d4SEric Biggerssource "arch/sparc/lib/crypto/Kconfig" 206699618d4SEric Biggersendif 207c7c18c94SEric Biggersif X86 208c7c18c94SEric Biggerssource "arch/x86/lib/crypto/Kconfig" 209c7c18c94SEric Biggersendif 210714656a8SEric Biggersendif 211714656a8SEric Biggers 212e56e1898SJustin M. Forbesendmenu 213