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