xref: /linux/arch/riscv/crypto/Kconfig (revision 13150742b09e720fdf021de14cd2b98b37415a89)
1# SPDX-License-Identifier: GPL-2.0
2
3menu "Accelerated Cryptographic Algorithms for CPU (riscv)"
4
5config CRYPTO_AES_RISCV64
6	tristate "Ciphers: AES, modes: ECB, CBC, CTS, CTR, XTS"
7	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
8	select CRYPTO_ALGAPI
9	select CRYPTO_LIB_AES
10	select CRYPTO_SKCIPHER
11	help
12	  Block cipher: AES cipher algorithms
13	  Length-preserving ciphers: AES with ECB, CBC, CTS, CTR, XTS
14
15	  Architecture: riscv64 using:
16	  - Zvkned vector crypto extension
17	  - Zvbb vector extension (XTS)
18	  - Zvkb vector crypto extension (CTR)
19	  - Zvkg vector crypto extension (XTS)
20
21config CRYPTO_GHASH_RISCV64
22	tristate "Hash functions: GHASH"
23	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
24	select CRYPTO_GCM
25	help
26	  GCM GHASH function (NIST SP 800-38D)
27
28	  Architecture: riscv64 using:
29	  - Zvkg vector crypto extension
30
31config CRYPTO_SM3_RISCV64
32	tristate "Hash functions: SM3 (ShangMi 3)"
33	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
34	select CRYPTO_HASH
35	select CRYPTO_LIB_SM3
36	help
37	  SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012)
38
39	  Architecture: riscv64 using:
40	  - Zvksh vector crypto extension
41	  - Zvkb vector crypto extension
42
43config CRYPTO_SM4_RISCV64
44	tristate "Ciphers: SM4 (ShangMi 4)"
45	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
46	select CRYPTO_ALGAPI
47	select CRYPTO_SM4
48	help
49	  SM4 block cipher algorithm (OSCCA GB/T 32907-2016,
50	  ISO/IEC 18033-3:2010/Amd 1:2021)
51
52	  SM4 (GBT.32907-2016) is a cryptographic standard issued by the
53	  Organization of State Commercial Administration of China (OSCCA)
54	  as an authorized cryptographic algorithm for use within China.
55
56	  Architecture: riscv64 using:
57	  - Zvksed vector crypto extension
58	  - Zvkb vector crypto extension
59
60endmenu
61