xref: /linux/arch/riscv/crypto/Kconfig (revision 4f9786035f9e519db41375818e1d0b5f20da2f10)
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_CHACHA_RISCV64
22	tristate "Ciphers: ChaCha"
23	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
24	select CRYPTO_SKCIPHER
25	help
26	  Length-preserving ciphers: ChaCha20 stream cipher algorithm
27
28	  Architecture: riscv64 using:
29	  - Zvkb vector crypto extension
30
31config CRYPTO_GHASH_RISCV64
32	tristate "Hash functions: GHASH"
33	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
34	select CRYPTO_GCM
35	help
36	  GCM GHASH function (NIST SP 800-38D)
37
38	  Architecture: riscv64 using:
39	  - Zvkg vector crypto extension
40
41config CRYPTO_SHA256_RISCV64
42	tristate "Hash functions: SHA-224 and SHA-256"
43	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
44	select CRYPTO_SHA256
45	help
46	  SHA-224 and SHA-256 secure hash algorithm (FIPS 180)
47
48	  Architecture: riscv64 using:
49	  - Zvknha or Zvknhb vector crypto extensions
50	  - Zvkb vector crypto extension
51
52config CRYPTO_SHA512_RISCV64
53	tristate "Hash functions: SHA-384 and SHA-512"
54	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
55	select CRYPTO_SHA512
56	help
57	  SHA-384 and SHA-512 secure hash algorithm (FIPS 180)
58
59	  Architecture: riscv64 using:
60	  - Zvknhb vector crypto extension
61	  - Zvkb vector crypto extension
62
63config CRYPTO_SM3_RISCV64
64	tristate "Hash functions: SM3 (ShangMi 3)"
65	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
66	select CRYPTO_HASH
67	select CRYPTO_SM3
68	help
69	  SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012)
70
71	  Architecture: riscv64 using:
72	  - Zvksh vector crypto extension
73	  - Zvkb vector crypto extension
74
75config CRYPTO_SM4_RISCV64
76	tristate "Ciphers: SM4 (ShangMi 4)"
77	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
78	select CRYPTO_ALGAPI
79	select CRYPTO_SM4
80	help
81	  SM4 block cipher algorithm (OSCCA GB/T 32907-2016,
82	  ISO/IEC 18033-3:2010/Amd 1:2021)
83
84	  SM4 (GBT.32907-2016) is a cryptographic standard issued by the
85	  Organization of State Commercial Administration of China (OSCCA)
86	  as an authorized cryptographic algorithm for use within China.
87
88	  Architecture: riscv64 using:
89	  - Zvksed vector crypto extension
90	  - Zvkb vector crypto extension
91
92endmenu
93