1# SPDX-License-Identifier: GPL-2.0 2 3menu "Crypto library routines" 4 5config CRYPTO_HASH_INFO 6 bool 7 8config CRYPTO_LIB_UTILS 9 tristate 10 11config CRYPTO_LIB_AES 12 tristate 13 14config CRYPTO_LIB_AESCFB 15 tristate 16 select CRYPTO_LIB_AES 17 select CRYPTO_LIB_UTILS 18 19config CRYPTO_LIB_AESGCM 20 tristate 21 select CRYPTO_LIB_AES 22 select CRYPTO_LIB_GF128MUL 23 select CRYPTO_LIB_UTILS 24 25config CRYPTO_LIB_ARC4 26 tristate 27 28config CRYPTO_LIB_GF128MUL 29 tristate 30 31# BLAKE2s support is always built-in, so there's no CRYPTO_LIB_BLAKE2S option. 32 33config CRYPTO_LIB_BLAKE2S_ARCH 34 bool 35 depends on !UML 36 default y if ARM 37 default y if X86_64 38 39config CRYPTO_LIB_CHACHA 40 tristate 41 select CRYPTO_LIB_UTILS 42 help 43 Enable the ChaCha library interface. Select this if your module uses 44 chacha_crypt() or hchacha_block(). 45 46config CRYPTO_LIB_CHACHA_ARCH 47 bool 48 depends on CRYPTO_LIB_CHACHA && !UML && !KMSAN 49 default y if ARM 50 default y if ARM64 && KERNEL_MODE_NEON 51 default y if MIPS && CPU_MIPS32_R2 52 default y if PPC64 && CPU_LITTLE_ENDIAN && VSX 53 default y if RISCV && 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO 54 default y if S390 55 default y if X86_64 56 57config CRYPTO_LIB_CURVE25519 58 tristate 59 select CRYPTO_LIB_UTILS 60 help 61 The Curve25519 library functions. Select this if your module uses any 62 of the functions from <crypto/curve25519.h>. 63 64config CRYPTO_LIB_CURVE25519_ARCH 65 bool 66 depends on CRYPTO_LIB_CURVE25519 && !UML && !KMSAN 67 default y if ARM && KERNEL_MODE_NEON 68 default y if PPC64 && CPU_LITTLE_ENDIAN 69 default y if X86_64 70 71config CRYPTO_LIB_CURVE25519_GENERIC 72 bool 73 depends on CRYPTO_LIB_CURVE25519 74 default y if !CRYPTO_LIB_CURVE25519_ARCH || ARM || X86_64 75 76config CRYPTO_LIB_DES 77 tristate 78 79config CRYPTO_LIB_MD5 80 tristate 81 help 82 The MD5 and HMAC-MD5 library functions. Select this if your module 83 uses any of the functions from <crypto/md5.h>. 84 85config CRYPTO_LIB_MD5_ARCH 86 bool 87 depends on CRYPTO_LIB_MD5 && !UML 88 default y if MIPS && CPU_CAVIUM_OCTEON 89 default y if PPC 90 default y if SPARC64 91 92config CRYPTO_LIB_POLY1305 93 tristate 94 help 95 The Poly1305 library functions. Select this if your module uses any 96 of the functions from <crypto/poly1305.h>. 97 98config CRYPTO_LIB_POLY1305_ARCH 99 bool 100 depends on CRYPTO_LIB_POLY1305 && !UML 101 default y if ARM 102 default y if ARM64 && KERNEL_MODE_NEON 103 default y if MIPS 104 # The PPC64 code needs to be fixed to work in softirq context. 105 default y if PPC64 && CPU_LITTLE_ENDIAN && VSX && BROKEN 106 default y if RISCV 107 default y if X86_64 108 109# This symbol controls the inclusion of the Poly1305 generic code. This differs 110# from most of the other algorithms, which handle the generic code 111# "automatically" via __maybe_unused. This is needed so that the Adiantum code, 112# which calls the poly1305_core_*() functions directly, can enable them. 113config CRYPTO_LIB_POLY1305_GENERIC 114 bool 115 depends on CRYPTO_LIB_POLY1305 116 # Enable if there's no arch impl or the arch impl requires the generic 117 # impl as a fallback. (Or if selected explicitly.) 118 default y if !CRYPTO_LIB_POLY1305_ARCH || PPC64 119 120config CRYPTO_LIB_POLY1305_RSIZE 121 int 122 default 2 if MIPS || RISCV 123 default 11 if X86_64 124 default 9 if ARM || ARM64 125 default 1 126 127config CRYPTO_LIB_CHACHA20POLY1305 128 tristate 129 select CRYPTO_LIB_CHACHA 130 select CRYPTO_LIB_POLY1305 131 select CRYPTO_LIB_UTILS 132 133config CRYPTO_LIB_SHA1 134 tristate 135 help 136 The SHA-1 and HMAC-SHA1 library functions. Select this if your module 137 uses any of the functions from <crypto/sha1.h>. 138 139config CRYPTO_LIB_SHA1_ARCH 140 bool 141 depends on CRYPTO_LIB_SHA1 && !UML 142 default y if ARM 143 default y if ARM64 && KERNEL_MODE_NEON 144 default y if MIPS && CPU_CAVIUM_OCTEON 145 default y if PPC 146 default y if S390 147 default y if SPARC64 148 default y if X86_64 149 150config CRYPTO_LIB_SHA256 151 tristate 152 help 153 The SHA-224, SHA-256, HMAC-SHA224, and HMAC-SHA256 library functions. 154 Select this if your module uses any of these functions from 155 <crypto/sha2.h>. 156 157config CRYPTO_LIB_SHA256_ARCH 158 bool 159 depends on CRYPTO_LIB_SHA256 && !UML 160 default y if ARM && !CPU_V7M 161 default y if ARM64 162 default y if MIPS && CPU_CAVIUM_OCTEON 163 default y if PPC && SPE 164 default y if RISCV && 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO 165 default y if S390 166 default y if SPARC64 167 default y if X86_64 168 169config CRYPTO_LIB_SHA512 170 tristate 171 help 172 The SHA-384, SHA-512, HMAC-SHA384, and HMAC-SHA512 library functions. 173 Select this if your module uses any of these functions from 174 <crypto/sha2.h>. 175 176config CRYPTO_LIB_SHA512_ARCH 177 bool 178 depends on CRYPTO_LIB_SHA512 && !UML 179 default y if ARM && !CPU_V7M 180 default y if ARM64 181 default y if MIPS && CPU_CAVIUM_OCTEON 182 default y if RISCV && 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO 183 default y if S390 184 default y if SPARC64 185 default y if X86_64 186 187config CRYPTO_LIB_SM3 188 tristate 189 190source "lib/crypto/tests/Kconfig" 191 192endmenu 193