Home
last modified time | relevance | path

Searched full:sm4 (Results 1 – 25 of 45) sorted by relevance

12

/linux/drivers/crypto/intel/keembay/
H A DKconfig2 tristate "Support for Intel Keem Bay OCS AES/SM4 HW acceleration"
10 SM4 cipher hardware acceleration for use with Crypto API.
13 cbc(aes), ctr(aes), ccm(aes), gcm(aes), cbc(sm4), ctr(sm4), ccm(sm4)
14 and gcm(sm4).
17 enabled: ecb(aes), cts(cbc(aes)), ecb(sm4) and cts(cbc(sm4)).
20 bool "Support for Intel Keem Bay OCS AES/SM4 ECB HW acceleration"
24 AES/SM4 ECB mode hardware acceleration for use with Crypto API.
26 Provides OCS version of ecb(aes) and ecb(sm4)
28 Intel does not recommend use of ECB mode with AES/SM4.
31 bool "Support for Intel Keem Bay OCS AES/SM4 CTS HW acceleration"
[all …]
H A Docs-aes.c473 * For AES @key_size must be either 16 or 32. For SM4 @key_size must be 16.
491 /* OCS SM4 supports 128-bit keys only. */ in ocs_aes_set_key()
494 "%d-bit keys not supported for SM4 cipher\n", in ocs_aes_set_key()
535 * 1 - SM4 in set_ocs_aes_command()
575 * Write the byte length of the last AES/SM4 block of Payload data (without
783 * ocs_aes_op() - Perform AES/SM4 operation.
786 * @cipher: The cipher to use (AES or SM4).
912 * @cipher: The Cipher to use (AES or SM4).
1022 /* Write encrypted tag to AES/SM4 engine. */
1040 /* Write encrypted tag to AES/SM4 engine. */ in ocs_aes_ccm_write_encrypted_tag()
[all …]
/linux/arch/arm64/crypto/
H A DMakefile26 obj-$(CONFIG_CRYPTO_SM4_ARM64_CE) += sm4-ce-cipher.o
27 sm4-ce-cipher-y := sm4-ce-cipher-glue.o sm4-ce-cipher-core.o
29 obj-$(CONFIG_CRYPTO_SM4_ARM64_CE_BLK) += sm4-ce.o
30 sm4-ce-y := sm4-ce-glue.o sm4-ce-core.o
32 obj-$(CONFIG_CRYPTO_SM4_ARM64_CE_CCM) += sm4-ce-ccm.o
33 sm4-ce-ccm-y := sm4-ce-ccm-glue.o sm4-ce-ccm-core.o
35 obj-$(CONFIG_CRYPTO_SM4_ARM64_CE_GCM) += sm4-ce-gcm.o
36 sm4-ce-gcm-y := sm4-ce-gcm-glue.o sm4-ce-gcm-core.o
38 obj-$(CONFIG_CRYPTO_SM4_ARM64_NEON_BLK) += sm4-neon.o
39 sm4-neon-y := sm4-neon-glue.o sm4-neon-core.o
H A Dsm4-neon-glue.c3 * SM4 Cipher Algorithm, using ARMv8 NEON
5 * https://tools.ietf.org/id/draft-ribose-cfrg-sm4-10.html
19 #include <crypto/sm4.h>
191 .cra_name = "ecb(sm4)",
192 .cra_driver_name = "ecb-sm4-neon",
205 .cra_name = "cbc(sm4)",
206 .cra_driver_name = "cbc-sm4-neon",
220 .cra_name = "ctr(sm4)",
221 .cra_driver_name = "ctr-sm4-neon",
250 MODULE_DESCRIPTION("SM4 ECB/CBC/CTR using ARMv8 NEON");
[all …]
H A Dsm4-ce-glue.c3 * SM4 Cipher Algorithm, using ARMv8 Crypto Extensions
5 * https://tools.ietf.org/id/draft-ribose-cfrg-sm4-10.html
23 #include <crypto/sm4.h>
429 .cra_name = "ecb(sm4)",
430 .cra_driver_name = "ecb-sm4-ce",
443 .cra_name = "cbc(sm4)",
444 .cra_driver_name = "cbc-sm4-ce",
458 .cra_name = "ctr(sm4)",
459 .cra_driver_name = "ctr-sm4-ce",
474 .cra_name = "cts(cbc(sm4))",
[all …]
H A Dsm4-ce-cipher-glue.c6 #include <crypto/sm4.h>
12 MODULE_ALIAS_CRYPTO("sm4");
13 MODULE_ALIAS_CRYPTO("sm4-ce");
14 MODULE_DESCRIPTION("SM4 symmetric cipher using ARMv8 Crypto Extensions");
55 .cra_name = "sm4",
56 .cra_driver_name = "sm4-ce",
81 module_cpu_feature_match(SM4, sm4_ce_mod_init);
H A DKconfig222 tristate "Ciphers: SM4 (ARMv8.2 Crypto Extensions)"
227 Block ciphers: SM4 cipher algorithms (OSCCA GB/T 32907-2016)
234 tristate "Ciphers: SM4, modes: ECB/CBC/CTR/XTS (ARMv8 Crypto Extensions)"
239 Length-preserving ciphers: SM4 cipher algorithms (OSCCA GB/T 32907-2016)
252 tristate "Ciphers: SM4, modes: ECB/CBC/CTR (NEON)"
257 Length-preserving ciphers: SM4 cipher algorithms (OSCCA GB/T 32907-2016)
284 tristate "AEAD cipher: SM4 in CCM mode (ARMv8 Crypto Extensions)"
291 AEAD cipher: SM4 cipher algorithms (OSCCA GB/T 32907-2016) with
300 tristate "AEAD cipher: SM4 in GCM mode (ARMv8 Crypto Extensions)"
307 AEAD cipher: SM4 cipher algorithms (OSCCA GB/T 32907-2016) with
H A Dsm4-ce-gcm-glue.c3 * SM4-GCM AEAD Algorithm using ARMv8 Crypto Extensions
19 #include <crypto/sm4.h>
20 #include "sm4-ce.h"
244 .cra_name = "gcm(sm4)",
245 .cra_driver_name = "gcm-sm4-ce",
279 module_cpu_feature_match(SM4, sm4_ce_gcm_init);
282 MODULE_DESCRIPTION("Synchronous SM4 in GCM mode using ARMv8 Crypto Extensions");
283 MODULE_ALIAS_CRYPTO("gcm(sm4)");
H A Dsm4-ce-ccm-glue.c3 * SM4-CCM AEAD Algorithm using ARMv8 Crypto Extensions
18 #include <crypto/sm4.h>
19 #include "sm4-ce.h"
275 .cra_name = "ccm(sm4)",
276 .cra_driver_name = "ccm-sm4-ce",
301 module_cpu_feature_match(SM4, sm4_ce_ccm_init);
304 MODULE_DESCRIPTION("Synchronous SM4 in CCM mode using ARMv8 Crypto Extensions");
305 MODULE_ALIAS_CRYPTO("ccm(sm4)");
H A Dsm4-ce.h3 * SM4 common functions for Crypto Extensions
/linux/arch/x86/crypto/
H A Dsm4_aesni_avx2_glue.c3 * SM4 Cipher Algorithm, AES-NI/AVX2 optimized.
5 * https://tools.ietf.org/id/draft-ribose-cfrg-sm4-10.html
17 #include <crypto/sm4.h>
18 #include "sm4-avx.h"
51 .cra_name = "__ecb(sm4)",
52 .cra_driver_name = "__ecb-sm4-aesni-avx2",
67 .cra_name = "__cbc(sm4)",
68 .cra_driver_name = "__cbc-sm4-aesni-avx2",
84 .cra_name = "__ctr(sm4)",
85 .cra_driver_name = "__ctr-sm4-aesni-avx2",
[all …]
H A Dsm4_aesni_avx_glue.c3 * SM4 Cipher Algorithm, AES-NI/AVX optimized.
5 * https://tools.ietf.org/id/draft-ribose-cfrg-sm4-10.html
17 #include <crypto/sm4.h>
18 #include "sm4-avx.h"
266 .cra_name = "__ecb(sm4)",
267 .cra_driver_name = "__ecb-sm4-aesni-avx",
282 .cra_name = "__cbc(sm4)",
283 .cra_driver_name = "__cbc-sm4-aesni-avx",
299 .cra_name = "__ctr(sm4)",
300 .cra_driver_name = "__ctr-sm4-aesni-avx",
[all …]
H A DMakefile92 obj-$(CONFIG_CRYPTO_SM4_AESNI_AVX_X86_64) += sm4-aesni-avx-x86_64.o
93 sm4-aesni-avx-x86_64-y := sm4-aesni-avx-asm_64.o sm4_aesni_avx_glue.o
95 obj-$(CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64) += sm4-aesni-avx2-x86_64.o
96 sm4-aesni-avx2-x86_64-y := sm4-aesni-avx2-asm_64.o sm4_aesni_avx2_glue.o
H A DKconfig197 tristate "Ciphers: SM4 with modes: ECB, CBC, CTR (AES-NI/AVX)"
204 Length-preserving ciphers: SM4 cipher algorithms
212 we can use the AES S-Box to simulate the SM4 S-Box to achieve the
218 tristate "Ciphers: SM4 with modes: ECB, CBC, CTR (AES-NI/AVX2)"
226 Length-preserving ciphers: SM4 cipher algorithms
234 we can use the AES S-Box to simulate the SM4 S-Box to achieve the
H A Dsm4-aesni-avx2-asm_64.S3 * SM4 Cipher Algorithm, AES-NI/AVX2 optimized.
5 * https://tools.ietf.org/id/draft-ribose-cfrg-sm4-10.html
12 /* Based on SM4 AES-NI work by libgcrypt and Markku-Juhani O. Saarinen at:
104 * These allow exposing SM4 S-Box from AES SubByte.
107 /* pre-SubByte affine transform, from SM4 field to AES field. */
113 /* post-SubByte affine transform, from AES field to SM4 field. */
H A Dsm4-aesni-avx-asm_64.S3 * SM4 Cipher Algorithm, AES-NI/AVX optimized.
5 * https://tools.ietf.org/id/draft-ribose-cfrg-sm4-10.html
12 /* Based on SM4 AES-NI work by libgcrypt and Markku-Juhani O. Saarinen at:
89 * These allow exposing SM4 S-Box from AES SubByte.
92 /* pre-SubByte affine transform, from SM4 field to AES field. */
98 /* post-SubByte affine transform, from AES field to SM4 field. */
/linux/crypto/
H A Dsm4_generic.c4 * SM4 Cipher Algorithm.
11 #include <crypto/sm4.h>
20 * sm4_setkey - Set the SM4 key.
58 .cra_name = "sm4",
59 .cra_driver_name = "sm4-generic",
89 MODULE_DESCRIPTION("SM4 Cipher Algorithm");
91 MODULE_ALIAS_CRYPTO("sm4");
92 MODULE_ALIAS_CRYPTO("sm4-generic");
H A Dsm4.c3 * SM4, as specified in
4 * https://tools.ietf.org/id/draft-ribose-cfrg-sm4-10.html
12 #include <crypto/sm4.h>
111 * sm4_expandkey - Expands the SM4 key as described in GB/T 32907-2016
155 * sm4_crypt_block - Encrypt or decrypt a single SM4 block
183 MODULE_DESCRIPTION("Generic SM4 library");
/linux/arch/riscv/crypto/
H A Dsm4-riscv64-glue.c3 * SM4 using the RISC-V vector crypto extensions
16 #include <crypto/sm4.h>
74 .cra_name = "sm4",
75 .cra_driver_name = "sm4-riscv64-zvksed-zvkb",
104 MODULE_DESCRIPTION("SM4 (RISC-V accelerated)");
107 MODULE_ALIAS_CRYPTO("sm4");
H A DMakefile22 obj-$(CONFIG_CRYPTO_SM4_RISCV64) += sm4-riscv64.o
23 sm4-riscv64-y := sm4-riscv64-glue.o sm4-riscv64-zvksed-zvkb.o
H A DKconfig77 tristate "Ciphers: SM4 (ShangMi 4)"
82 SM4 block cipher algorithm (OSCCA GB/T 32907-2016,
85 SM4 (GBT.32907-2016) is a cryptographic standard issued by the
H A Dsm4-riscv64-zvksed-zvkb.S43 // - RISC-V Vector SM4 Block Cipher extension ('Zvksed')
92 // Do the 32 rounds of SM4, 4 at a time.
/linux/include/crypto/
H A Dsm4.h4 * Common values for the SM4 algorithm
29 * sm4_expandkey - Expands the SM4 key as described in GB/T 32907-2016
41 * sm4_crypt_block - Encrypt or decrypt a single SM4 block
/linux/Documentation/translations/zh_TW/arch/arm64/
H A Delf_hwcaps.rst125 ID_AA64ISAR0_EL1.SM4 == 0b0001 表示有此功能。
193 ID_AA64ZFR0_EL1.SM4 == 0b0001 表示有此功能。
/linux/Documentation/translations/zh_CN/arch/arm64/
H A Delf_hwcaps.rst122 ID_AA64ISAR0_EL1.SM4 == 0b0001 表示有此功能。
190 ID_AA64ZFR0_EL1.SM4 == 0b0001 表示有此功能。

12