blob: b01253cac70a74998e8c90ae7e203d12a2649170 [file] [log] [blame]
Ard Biesheuvel746b2e02019-11-08 13:22:07 +01001# SPDX-License-Identifier: GPL-2.0
2
Justin M. Forbese56e1892022-01-12 08:01:38 -06003menu "Crypto library routines"
4
Eric Biggers7033b932022-07-25 11:36:34 -07005config CRYPTO_LIB_UTILS
6 tristate
7
Ard Biesheuvel746b2e02019-11-08 13:22:07 +01008config CRYPTO_LIB_AES
9 tristate
10
Ard Biesheuvelf1354402024-04-29 16:27:58 -040011config CRYPTO_LIB_AESCFB
12 tristate
13 select CRYPTO_LIB_AES
14 select CRYPTO_LIB_UTILS
15
Ard Biesheuvel520af5d2022-11-03 20:22:59 +010016config CRYPTO_LIB_AESGCM
17 tristate
18 select CRYPTO_LIB_AES
19 select CRYPTO_LIB_GF128MUL
20 select CRYPTO_LIB_UTILS
21
Ard Biesheuvel746b2e02019-11-08 13:22:07 +010022config CRYPTO_LIB_ARC4
23 tristate
24
Ard Biesheuvel61c581a2022-11-03 20:22:57 +010025config CRYPTO_LIB_GF128MUL
26 tristate
27
Jason A. Donenfeld66d7fb92019-11-08 13:22:28 +010028config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
Jason A. Donenfeld6048fdc2021-12-22 14:56:58 +010029 bool
Jason A. Donenfeld66d7fb92019-11-08 13:22:28 +010030 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
Jason A. Donenfeld6048fdc2021-12-22 14:56:58 +010036 def_bool !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
Jason A. Donenfeld66d7fb92019-11-08 13:22:28 +010037 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
Ard Biesheuvel5fb8ef22019-11-08 13:22:08 +010044config CRYPTO_ARCH_HAVE_LIB_CHACHA
45 tristate
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
Eric Biggers6e78ad02022-07-25 11:36:35 -070053 select CRYPTO_LIB_UTILS
Ard Biesheuvel5fb8ef22019-11-08 13:22:08 +010054 help
55 This symbol can be depended upon by arch implementations of the
56 ChaCha library interface that require the generic code as a
57 fallback, e.g., for SIMD implementations. If no arch specific
58 implementation is enabled, this implementation serves the users
59 of CRYPTO_LIB_CHACHA.
60
61config CRYPTO_LIB_CHACHA
Justin M. Forbese56e1892022-01-12 08:01:38 -060062 tristate "ChaCha library interface"
Ard Biesheuvel5fb8ef22019-11-08 13:22:08 +010063 depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
64 select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
65 help
66 Enable the ChaCha library interface. This interface may be fulfilled
67 by either the generic implementation or an arch-specific one, if one
68 is available and enabled.
69
Jason A. Donenfeld0ed42a6f2019-11-08 13:22:32 +010070config CRYPTO_ARCH_HAVE_LIB_CURVE25519
71 tristate
72 help
73 Declares whether the architecture provides an arch-specific
74 accelerated implementation of the Curve25519 library interface,
75 either builtin or as a module.
76
77config CRYPTO_LIB_CURVE25519_GENERIC
78 tristate
79 help
80 This symbol can be depended upon by arch implementations of the
81 Curve25519 library interface that require the generic code as a
82 fallback, e.g., for SIMD implementations. If no arch specific
83 implementation is enabled, this implementation serves the users
84 of CRYPTO_LIB_CURVE25519.
85
86config CRYPTO_LIB_CURVE25519
Justin M. Forbese56e1892022-01-12 08:01:38 -060087 tristate "Curve25519 scalar multiplication library"
Jason A. Donenfeld0ed42a6f2019-11-08 13:22:32 +010088 depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519
89 select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
Eric Biggers7033b932022-07-25 11:36:34 -070090 select CRYPTO_LIB_UTILS
Jason A. Donenfeld0ed42a6f2019-11-08 13:22:32 +010091 help
92 Enable the Curve25519 library interface. This interface may be
93 fulfilled by either the generic implementation or an arch-specific
94 one, if one is available and enabled.
95
Ard Biesheuvel746b2e02019-11-08 13:22:07 +010096config CRYPTO_LIB_DES
97 tristate
98
Ard Biesheuvela1d93062019-11-08 13:22:21 +010099config CRYPTO_LIB_POLY1305_RSIZE
100 int
Ard Biesheuvela11d0552019-11-08 13:22:26 +0100101 default 2 if MIPS
Jason A. Donenfeldd7d7b852020-01-05 22:40:48 -0500102 default 11 if X86_64
Ard Biesheuvela6b803b2019-11-08 13:22:25 +0100103 default 9 if ARM || ARM64
Ard Biesheuvela1d93062019-11-08 13:22:21 +0100104 default 1
105
106config CRYPTO_ARCH_HAVE_LIB_POLY1305
107 tristate
108 help
109 Declares whether the architecture provides an arch-specific
110 accelerated implementation of the Poly1305 library interface,
111 either builtin or as a module.
112
Ard Biesheuvel48ea8c62019-11-08 13:22:19 +0100113config CRYPTO_LIB_POLY1305_GENERIC
114 tristate
Ard Biesheuvela1d93062019-11-08 13:22:21 +0100115 help
116 This symbol can be depended upon by arch implementations of the
117 Poly1305 library interface that require the generic code as a
118 fallback, e.g., for SIMD implementations. If no arch specific
119 implementation is enabled, this implementation serves the users
120 of CRYPTO_LIB_POLY1305.
121
122config CRYPTO_LIB_POLY1305
Justin M. Forbese56e1892022-01-12 08:01:38 -0600123 tristate "Poly1305 library interface"
Ard Biesheuvela1d93062019-11-08 13:22:21 +0100124 depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
125 select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
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.
Ard Biesheuvel48ea8c62019-11-08 13:22:19 +0100130
Ard Biesheuveled200782019-11-08 13:22:39 +0100131config CRYPTO_LIB_CHACHA20POLY1305
Justin M. Forbese56e1892022-01-12 08:01:38 -0600132 tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library version)"
Ard Biesheuveled200782019-11-08 13:22:39 +0100133 depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
134 depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
Justin M. Forbese56e1892022-01-12 08:01:38 -0600135 depends on CRYPTO
Ard Biesheuveled200782019-11-08 13:22:39 +0100136 select CRYPTO_LIB_CHACHA
137 select CRYPTO_LIB_POLY1305
Justin M. Forbese56e1892022-01-12 08:01:38 -0600138 select CRYPTO_ALGAPI
Ard Biesheuveled200782019-11-08 13:22:39 +0100139
Eric Biggersec8f7f42022-07-09 14:18:49 -0700140config CRYPTO_LIB_SHA1
141 tristate
142
Ard Biesheuvel746b2e02019-11-08 13:22:07 +0100143config CRYPTO_LIB_SHA256
144 tristate
Tianjia Zhang2b312772021-07-20 11:46:39 +0800145
Justin M. Forbese56e1892022-01-12 08:01:38 -0600146endmenu