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_ARCH_HAVE_LIB_BLAKE2S
17 Declares whether the architecture provides an arch-specific
18 accelerated implementation of the Blake2s library interface,
19 either builtin or as a module.
21 config CRYPTO_LIB_BLAKE2S_GENERIC
22 def_bool !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
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.
30 config CRYPTO_ARCH_HAVE_LIB_CHACHA
33 Declares whether the architecture provides an arch-specific
34 accelerated implementation of the ChaCha library interface,
35 either builtin or as a module.
37 config CRYPTO_LIB_CHACHA_GENERIC
39 select CRYPTO_LIB_UTILS
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
47 config 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
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.
56 config CRYPTO_ARCH_HAVE_LIB_CURVE25519
59 Declares whether the architecture provides an arch-specific
60 accelerated implementation of the Curve25519 library interface,
61 either builtin or as a module.
63 config CRYPTO_LIB_CURVE25519_GENERIC
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.
72 config 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
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.
85 config CRYPTO_LIB_POLY1305_RSIZE
89 default 9 if ARM || ARM64
92 config CRYPTO_ARCH_HAVE_LIB_POLY1305
95 Declares whether the architecture provides an arch-specific
96 accelerated implementation of the Poly1305 library interface,
97 either builtin or as a module.
99 config CRYPTO_LIB_POLY1305_GENERIC
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.
108 config 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
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.
117 config 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
122 select CRYPTO_LIB_CHACHA
123 select CRYPTO_LIB_POLY1305
126 config CRYPTO_LIB_SHA1
129 config CRYPTO_LIB_SHA256