xref: /openbmc/linux/lib/crypto/Kconfig (revision 747f7a29)
1# SPDX-License-Identifier: GPL-2.0
2
3menu "Crypto library routines"
4
5config CRYPTO_LIB_AES
6	tristate
7
8config CRYPTO_LIB_ARC4
9	tristate
10
11config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
12	bool
13	help
14	  Declares whether the architecture provides an arch-specific
15	  accelerated implementation of the Blake2s library interface,
16	  either builtin or as a module.
17
18config CRYPTO_LIB_BLAKE2S_GENERIC
19	def_bool !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
20	help
21	  This symbol can be depended upon by arch implementations of the
22	  Blake2s library interface that require the generic code as a
23	  fallback, e.g., for SIMD implementations. If no arch specific
24	  implementation is enabled, this implementation serves the users
25	  of CRYPTO_LIB_BLAKE2S.
26
27config CRYPTO_ARCH_HAVE_LIB_CHACHA
28	tristate
29	help
30	  Declares whether the architecture provides an arch-specific
31	  accelerated implementation of the ChaCha library interface,
32	  either builtin or as a module.
33
34config CRYPTO_LIB_CHACHA_GENERIC
35	tristate
36	select XOR_BLOCKS
37	help
38	  This symbol can be depended upon by arch implementations of the
39	  ChaCha 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_CHACHA.
43
44config CRYPTO_LIB_CHACHA
45	tristate "ChaCha library interface"
46	depends on CRYPTO
47	depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
48	select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
49	help
50	  Enable the ChaCha library interface. This interface may be fulfilled
51	  by either the generic implementation or an arch-specific one, if one
52	  is available and enabled.
53
54config CRYPTO_ARCH_HAVE_LIB_CURVE25519
55	tristate
56	help
57	  Declares whether the architecture provides an arch-specific
58	  accelerated implementation of the Curve25519 library interface,
59	  either builtin or as a module.
60
61config CRYPTO_LIB_CURVE25519_GENERIC
62	tristate
63	help
64	  This symbol can be depended upon by arch implementations of the
65	  Curve25519 library interface that require the generic code as a
66	  fallback, e.g., for SIMD implementations. If no arch specific
67	  implementation is enabled, this implementation serves the users
68	  of CRYPTO_LIB_CURVE25519.
69
70config CRYPTO_LIB_CURVE25519
71	tristate "Curve25519 scalar multiplication library"
72	depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519
73	select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
74	select LIB_MEMNEQ
75	help
76	  Enable the Curve25519 library interface. This interface may be
77	  fulfilled by either the generic implementation or an arch-specific
78	  one, if one is available and enabled.
79
80config CRYPTO_LIB_DES
81	tristate
82
83config CRYPTO_LIB_POLY1305_RSIZE
84	int
85	default 2 if MIPS
86	default 11 if X86_64
87	default 9 if ARM || ARM64
88	default 1
89
90config CRYPTO_ARCH_HAVE_LIB_POLY1305
91	tristate
92	help
93	  Declares whether the architecture provides an arch-specific
94	  accelerated implementation of the Poly1305 library interface,
95	  either builtin or as a module.
96
97config CRYPTO_LIB_POLY1305_GENERIC
98	tristate
99	help
100	  This symbol can be depended upon by arch implementations of the
101	  Poly1305 library interface that require the generic code as a
102	  fallback, e.g., for SIMD implementations. If no arch specific
103	  implementation is enabled, this implementation serves the users
104	  of CRYPTO_LIB_POLY1305.
105
106config CRYPTO_LIB_POLY1305
107	tristate "Poly1305 library interface"
108	depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
109	select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
110	help
111	  Enable the Poly1305 library interface. This interface may be fulfilled
112	  by either the generic implementation or an arch-specific one, if one
113	  is available and enabled.
114
115config CRYPTO_LIB_CHACHA20POLY1305
116	tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library version)"
117	depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
118	depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
119	depends on CRYPTO
120	select CRYPTO_LIB_CHACHA
121	select CRYPTO_LIB_POLY1305
122	select CRYPTO_ALGAPI
123
124config CRYPTO_LIB_SHA1
125	tristate
126
127config CRYPTO_LIB_SHA256
128	tristate
129
130endmenu
131