xref: /linux/arch/riscv/crypto/Kconfig (revision 23ca32e4ead48f68e37000f2552b973ef1439acb)
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_SHA512_RISCV64
32	tristate "Hash functions: SHA-384 and SHA-512"
33	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
34	select CRYPTO_SHA512
35	help
36	  SHA-384 and SHA-512 secure hash algorithm (FIPS 180)
37
38	  Architecture: riscv64 using:
39	  - Zvknhb vector crypto extension
40	  - Zvkb vector crypto extension
41
42config CRYPTO_SM3_RISCV64
43	tristate "Hash functions: SM3 (ShangMi 3)"
44	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
45	select CRYPTO_HASH
46	select CRYPTO_LIB_SM3
47	help
48	  SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012)
49
50	  Architecture: riscv64 using:
51	  - Zvksh vector crypto extension
52	  - Zvkb vector crypto extension
53
54config CRYPTO_SM4_RISCV64
55	tristate "Ciphers: SM4 (ShangMi 4)"
56	depends on 64BIT && RISCV_ISA_V && TOOLCHAIN_HAS_VECTOR_CRYPTO
57	select CRYPTO_ALGAPI
58	select CRYPTO_SM4
59	help
60	  SM4 block cipher algorithm (OSCCA GB/T 32907-2016,
61	  ISO/IEC 18033-3:2010/Amd 1:2021)
62
63	  SM4 (GBT.32907-2016) is a cryptographic standard issued by the
64	  Organization of State Commercial Administration of China (OSCCA)
65	  as an authorized cryptographic algorithm for use within China.
66
67	  Architecture: riscv64 using:
68	  - Zvksed vector crypto extension
69	  - Zvkb vector crypto extension
70
71endmenu
72