1 # SPDX-License-Identifier: GPL-2.0
3 menu "Crypto library routines"
5 config CRYPTO_LIB_UTILS
11 config CRYPTO_LIB_ARC4
14 config CRYPTO_LIB_GF128MUL
17 config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
20 Declares whether the architecture provides an arch-specific
21 accelerated implementation of the Blake2s library interface,
22 either builtin or as a module.
24 config CRYPTO_LIB_BLAKE2S_GENERIC
25 def_bool !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
27 This symbol can be depended upon by arch implementations of the
28 Blake2s library interface that require the generic code as a
29 fallback, e.g., for SIMD implementations. If no arch specific
30 implementation is enabled, this implementation serves the users
31 of CRYPTO_LIB_BLAKE2S.
33 config CRYPTO_ARCH_HAVE_LIB_CHACHA
36 Declares whether the architecture provides an arch-specific
37 accelerated implementation of the ChaCha library interface,
38 either builtin or as a module.
40 config CRYPTO_LIB_CHACHA_GENERIC
42 select CRYPTO_LIB_UTILS
44 This symbol can be depended upon by arch implementations of the
45 ChaCha library interface that require the generic code as a
46 fallback, e.g., for SIMD implementations. If no arch specific
47 implementation is enabled, this implementation serves the users
50 config CRYPTO_LIB_CHACHA
51 tristate "ChaCha library interface"
52 depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
53 select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
55 Enable the ChaCha library interface. This interface may be fulfilled
56 by either the generic implementation or an arch-specific one, if one
57 is available and enabled.
59 config CRYPTO_ARCH_HAVE_LIB_CURVE25519
62 Declares whether the architecture provides an arch-specific
63 accelerated implementation of the Curve25519 library interface,
64 either builtin or as a module.
66 config CRYPTO_LIB_CURVE25519_GENERIC
69 This symbol can be depended upon by arch implementations of the
70 Curve25519 library interface that require the generic code as a
71 fallback, e.g., for SIMD implementations. If no arch specific
72 implementation is enabled, this implementation serves the users
73 of CRYPTO_LIB_CURVE25519.
75 config CRYPTO_LIB_CURVE25519
76 tristate "Curve25519 scalar multiplication library"
77 depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519
78 select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
79 select CRYPTO_LIB_UTILS
81 Enable the Curve25519 library interface. This interface may be
82 fulfilled by either the generic implementation or an arch-specific
83 one, if one is available and enabled.
88 config CRYPTO_LIB_POLY1305_RSIZE
92 default 9 if ARM || ARM64
95 config CRYPTO_ARCH_HAVE_LIB_POLY1305
98 Declares whether the architecture provides an arch-specific
99 accelerated implementation of the Poly1305 library interface,
100 either builtin or as a module.
102 config CRYPTO_LIB_POLY1305_GENERIC
105 This symbol can be depended upon by arch implementations of the
106 Poly1305 library interface that require the generic code as a
107 fallback, e.g., for SIMD implementations. If no arch specific
108 implementation is enabled, this implementation serves the users
109 of CRYPTO_LIB_POLY1305.
111 config CRYPTO_LIB_POLY1305
112 tristate "Poly1305 library interface"
113 depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
114 select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
116 Enable the Poly1305 library interface. This interface may be fulfilled
117 by either the generic implementation or an arch-specific one, if one
118 is available and enabled.
120 config CRYPTO_LIB_CHACHA20POLY1305
121 tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library version)"
122 depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
123 depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
125 select CRYPTO_LIB_CHACHA
126 select CRYPTO_LIB_POLY1305
129 config CRYPTO_LIB_SHA1
132 config CRYPTO_LIB_SHA256