1# SPDX-License-Identifier: GPL-2.0 2 3menu "Crypto library routines" 4 5config CRYPTO_LIB_UTILS 6 tristate 7 8config CRYPTO_LIB_AES 9 tristate 10 11config CRYPTO_LIB_AESCFB 12 tristate 13 select CRYPTO_LIB_AES 14 select CRYPTO_LIB_UTILS 15 16config CRYPTO_LIB_AESGCM 17 tristate 18 select CRYPTO_LIB_AES 19 select CRYPTO_LIB_GF128MUL 20 select CRYPTO_LIB_UTILS 21 22config CRYPTO_LIB_ARC4 23 tristate 24 25config CRYPTO_LIB_GF128MUL 26 tristate 27 28config CRYPTO_ARCH_HAVE_LIB_BLAKE2S 29 bool 30 help 31 Declares whether the architecture provides an arch-specific 32 accelerated implementation of the Blake2s library interface, 33 either builtin or as a module. 34 35config CRYPTO_LIB_BLAKE2S_GENERIC 36 def_bool !CRYPTO_ARCH_HAVE_LIB_BLAKE2S 37 help 38 This symbol can be depended upon by arch implementations of the 39 Blake2s library interface that require the generic code as a 40 fallback, e.g., for SIMD implementations. If no arch specific 41 implementation is enabled, this implementation serves the users 42 of CRYPTO_LIB_BLAKE2S. 43 44config CRYPTO_ARCH_HAVE_LIB_CHACHA 45 bool 46 help 47 Declares whether the architecture provides an arch-specific 48 accelerated implementation of the ChaCha library interface, 49 either builtin or as a module. 50 51config CRYPTO_LIB_CHACHA_GENERIC 52 tristate 53 default CRYPTO_LIB_CHACHA if !CRYPTO_ARCH_HAVE_LIB_CHACHA 54 select CRYPTO_LIB_UTILS 55 help 56 This symbol can be selected by arch implementations of the ChaCha 57 library interface that require the generic code as a fallback, e.g., 58 for SIMD implementations. If no arch specific implementation is 59 enabled, this implementation serves the users of CRYPTO_LIB_CHACHA. 60 61config CRYPTO_LIB_CHACHA 62 tristate 63 help 64 Enable the ChaCha library interface. This interface may be fulfilled 65 by either the generic implementation or an arch-specific one, if one 66 is available and enabled. 67 68config CRYPTO_ARCH_HAVE_LIB_CURVE25519 69 bool 70 help 71 Declares whether the architecture provides an arch-specific 72 accelerated implementation of the Curve25519 library interface, 73 either builtin or as a module. 74 75config CRYPTO_LIB_CURVE25519_GENERIC 76 tristate 77 select CRYPTO_LIB_UTILS 78 help 79 This symbol can be depended upon by arch implementations of the 80 Curve25519 library interface that require the generic code as a 81 fallback, e.g., for SIMD implementations. If no arch specific 82 implementation is enabled, this implementation serves the users 83 of CRYPTO_LIB_CURVE25519. 84 85config CRYPTO_LIB_CURVE25519_INTERNAL 86 tristate 87 select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n 88 89config CRYPTO_LIB_CURVE25519 90 tristate 91 select CRYPTO 92 select CRYPTO_LIB_CURVE25519_INTERNAL 93 help 94 Enable the Curve25519 library interface. This interface may be 95 fulfilled by either the generic implementation or an arch-specific 96 one, if one is available and enabled. 97 98config CRYPTO_LIB_DES 99 tristate 100 101config CRYPTO_LIB_POLY1305_RSIZE 102 int 103 default 2 if MIPS 104 default 11 if X86_64 105 default 9 if ARM || ARM64 106 default 1 107 108config CRYPTO_ARCH_HAVE_LIB_POLY1305 109 bool 110 help 111 Declares whether the architecture provides an arch-specific 112 accelerated implementation of the Poly1305 library interface, 113 either builtin or as a module. 114 115config CRYPTO_LIB_POLY1305_GENERIC 116 tristate 117 default CRYPTO_LIB_POLY1305 if !CRYPTO_ARCH_HAVE_LIB_POLY1305 118 help 119 This symbol can be selected by arch implementations of the Poly1305 120 library interface that require the generic code as a fallback, e.g., 121 for SIMD implementations. If no arch specific implementation is 122 enabled, this implementation serves the users of CRYPTO_LIB_POLY1305. 123 124config CRYPTO_LIB_POLY1305 125 tristate 126 help 127 Enable the Poly1305 library interface. This interface may be fulfilled 128 by either the generic implementation or an arch-specific one, if one 129 is available and enabled. 130 131config CRYPTO_LIB_CHACHA20POLY1305 132 tristate 133 select CRYPTO_LIB_CHACHA 134 select CRYPTO_LIB_POLY1305 135 select CRYPTO_LIB_UTILS 136 137config CRYPTO_LIB_SHA1 138 tristate 139 140config CRYPTO_LIB_SHA256 141 tristate 142 help 143 Enable the SHA-256 library interface. This interface may be fulfilled 144 by either the generic implementation or an arch-specific one, if one 145 is available and enabled. 146 147config CRYPTO_ARCH_HAVE_LIB_SHA256 148 bool 149 help 150 Declares whether the architecture provides an arch-specific 151 accelerated implementation of the SHA-256 library interface. 152 153config CRYPTO_LIB_SHA256_GENERIC 154 tristate 155 default CRYPTO_LIB_SHA256 if !CRYPTO_ARCH_HAVE_LIB_SHA256 156 help 157 This symbol can be selected by arch implementations of the SHA-256 158 library interface that require the generic code as a fallback, e.g., 159 for SIMD implementations. If no arch specific implementation is 160 enabled, this implementation serves the users of CRYPTO_LIB_SHA256. 161 162config CRYPTO_LIB_SHA512 163 tristate 164 help 165 The SHA-384, SHA-512, HMAC-SHA384, and HMAC-SHA512 library functions. 166 Select this if your module uses any of these functions from 167 <crypto/sha2.h>. 168 169config CRYPTO_LIB_SHA512_ARCH 170 bool 171 depends on CRYPTO_LIB_SHA512 && !UML 172 default y if ARM && !CPU_V7M 173 default y if ARM64 174 default y if MIPS && CPU_CAVIUM_OCTEON 175 default y if RISCV && 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO 176 default y if S390 177 default y if SPARC64 178 default y if X86_64 179 180config CRYPTO_LIB_SM3 181 tristate 182 183if !KMSAN # avoid false positives from assembly 184if ARM 185source "lib/crypto/arm/Kconfig" 186endif 187if ARM64 188source "lib/crypto/arm64/Kconfig" 189endif 190if MIPS 191source "lib/crypto/mips/Kconfig" 192endif 193if PPC 194source "lib/crypto/powerpc/Kconfig" 195endif 196if RISCV 197source "lib/crypto/riscv/Kconfig" 198endif 199if S390 200source "lib/crypto/s390/Kconfig" 201endif 202if SPARC 203source "lib/crypto/sparc/Kconfig" 204endif 205if X86 206source "lib/crypto/x86/Kconfig" 207endif 208endif 209 210endmenu 211