1 # SPDX-License-Identifier: GPL-2.0
3 menu "Crypto library routines"
11 config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
14 Declares whether the architecture provides an arch-specific
15 accelerated implementation of the Blake2s library interface,
16 either builtin or as a module.
18 config CRYPTO_LIB_BLAKE2S_GENERIC
19 def_bool !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
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.
27 config CRYPTO_ARCH_HAVE_LIB_CHACHA
30 Declares whether the architecture provides an arch-specific
31 accelerated implementation of the ChaCha library interface,
32 either builtin or as a module.
34 config CRYPTO_LIB_CHACHA_GENERIC
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
44 config CRYPTO_LIB_CHACHA
45 tristate "ChaCha library interface"
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
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.
54 config CRYPTO_ARCH_HAVE_LIB_CURVE25519
57 Declares whether the architecture provides an arch-specific
58 accelerated implementation of the Curve25519 library interface,
59 either builtin or as a module.
61 config CRYPTO_LIB_CURVE25519_GENERIC
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.
70 config 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
75 Enable the Curve25519 library interface. This interface may be
76 fulfilled by either the generic implementation or an arch-specific
77 one, if one is available and enabled.
82 config CRYPTO_LIB_POLY1305_RSIZE
86 default 9 if ARM || ARM64
89 config CRYPTO_ARCH_HAVE_LIB_POLY1305
92 Declares whether the architecture provides an arch-specific
93 accelerated implementation of the Poly1305 library interface,
94 either builtin or as a module.
96 config CRYPTO_LIB_POLY1305_GENERIC
99 This symbol can be depended upon by arch implementations of the
100 Poly1305 library interface that require the generic code as a
101 fallback, e.g., for SIMD implementations. If no arch specific
102 implementation is enabled, this implementation serves the users
103 of CRYPTO_LIB_POLY1305.
105 config CRYPTO_LIB_POLY1305
106 tristate "Poly1305 library interface"
107 depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
108 select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
110 Enable the Poly1305 library interface. This interface may be fulfilled
111 by either the generic implementation or an arch-specific one, if one
112 is available and enabled.
114 config CRYPTO_LIB_CHACHA20POLY1305
115 tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library version)"
116 depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
117 depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
119 select CRYPTO_LIB_CHACHA
120 select CRYPTO_LIB_POLY1305
123 config CRYPTO_LIB_SHA256
126 config CRYPTO_LIB_SM4