Home
last modified time | relevance | path

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

12

/Linux-v6.1/drivers/crypto/keembay/
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 …]
Dkeembay-ocs-aes-core.c43 * @key: AES/SM4 key.
45 * @cipher: OCS cipher to use (either AES or SM4).
144 * Ensure key is 128-bit or 256-bit for AES or 128-bit for SM4 and an actual
159 /* For SM4, only 128-byte keys are supported. */ in check_key()
1373 .base.cra_name = "ecb(sm4)",
1374 .base.cra_driver_name = "ecb-sm4-keembay-ocs",
1393 .base.cra_name = "cbc(sm4)",
1394 .base.cra_driver_name = "cbc-sm4-keembay-ocs",
1413 .base.cra_name = "ctr(sm4)",
1414 .base.cra_driver_name = "ctr-sm4-keembay-ocs",
[all …]
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-v6.1/arch/x86/crypto/
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"
59 .cra_name = "__ecb(sm4)",
60 .cra_driver_name = "__ecb-sm4-aesni-avx2",
75 .cra_name = "__cbc(sm4)",
76 .cra_driver_name = "__cbc-sm4-aesni-avx2",
92 .cra_name = "__cfb(sm4)",
93 .cra_driver_name = "__cfb-sm4-aesni-avx2",
[all …]
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"
378 .cra_name = "__ecb(sm4)",
379 .cra_driver_name = "__ecb-sm4-aesni-avx",
394 .cra_name = "__cbc(sm4)",
395 .cra_driver_name = "__cbc-sm4-aesni-avx",
411 .cra_name = "__cfb(sm4)",
412 .cra_driver_name = "__cfb-sm4-aesni-avx",
[all …]
DMakefile97 obj-$(CONFIG_CRYPTO_SM4_AESNI_AVX_X86_64) += sm4-aesni-avx-x86_64.o
98 sm4-aesni-avx-x86_64-y := sm4-aesni-avx-asm_64.o sm4_aesni_avx_glue.o
100 obj-$(CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64) += sm4-aesni-avx2-x86_64.o
101 sm4-aesni-avx2-x86_64-y := sm4-aesni-avx2-asm_64.o sm4_aesni_avx2_glue.o
DKconfig192 tristate "Ciphers: SM4 with modes: ECB, CBC, CFB, CTR (AES-NI/AVX)"
199 Length-preserving ciphers: SM4 cipher algorithms
207 we can use the AES S-Box to simulate the SM4 S-Box to achieve the
213 tristate "Ciphers: SM4 with modes: ECB, CBC, CFB, CTR (AES-NI/AVX2)"
221 Length-preserving ciphers: SM4 cipher algorithms
229 we can use the AES S-Box to simulate the SM4 S-Box to achieve the
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:
103 * These allow exposing SM4 S-Box from AES SubByte.
106 /* pre-SubByte affine transform, from SM4 field to AES field. */
112 /* post-SubByte affine transform, from AES field to SM4 field. */
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:
88 * These allow exposing SM4 S-Box from AES SubByte.
91 /* pre-SubByte affine transform, from SM4 field to AES field. */
97 /* post-SubByte affine transform, from AES field to SM4 field. */
Dsm4-avx.h6 #include <crypto/sm4.h>
/Linux-v6.1/arch/arm64/crypto/
DMakefile23 obj-$(CONFIG_CRYPTO_SM4_ARM64_CE) += sm4-ce-cipher.o
24 sm4-ce-cipher-y := sm4-ce-cipher-glue.o sm4-ce-cipher-core.o
26 obj-$(CONFIG_CRYPTO_SM4_ARM64_CE_BLK) += sm4-ce.o
27 sm4-ce-y := sm4-ce-glue.o sm4-ce-core.o
29 obj-$(CONFIG_CRYPTO_SM4_ARM64_NEON_BLK) += sm4-neon.o
30 sm4-neon-y := sm4-neon-glue.o sm4-neon-core.o
Dsm4-ce-glue.c3 * SM4 Cipher Algorithm, using ARMv8 Crypto Extensions
5 * https://tools.ietf.org/id/draft-ribose-cfrg-sm4-10.html
19 #include <crypto/sm4.h>
289 .cra_name = "ecb(sm4)",
290 .cra_driver_name = "ecb-sm4-ce",
303 .cra_name = "cbc(sm4)",
304 .cra_driver_name = "cbc-sm4-ce",
318 .cra_name = "cfb(sm4)",
319 .cra_driver_name = "cfb-sm4-ce",
334 .cra_name = "ctr(sm4)",
[all …]
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>
359 .cra_name = "ecb(sm4)",
360 .cra_driver_name = "ecb-sm4-neon",
373 .cra_name = "cbc(sm4)",
374 .cra_driver_name = "cbc-sm4-neon",
388 .cra_name = "cfb(sm4)",
389 .cra_driver_name = "cfb-sm4-neon",
404 .cra_name = "ctr(sm4)",
[all …]
Dsm4-ce-cipher-glue.c5 #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);
DKconfig211 tristate "Ciphers: SM4 (ARMv8.2 Crypto Extensions)"
216 Block ciphers: SM4 cipher algorithms (OSCCA GB/T 32907-2016)
223 tristate "Ciphers: SM4, modes: ECB/CBC/CFB/CTR (ARMv8 Crypto Extensions)"
228 Length-preserving ciphers: SM4 cipher algorithms (OSCCA GB/T 32907-2016)
240 tristate "Ciphers: SM4, modes: ECB/CBC/CFB/CTR (NEON)"
245 Length-preserving ciphers: SM4 cipher algorithms (OSCCA GB/T 32907-2016)
/Linux-v6.1/crypto/
Dsm4_generic.c4 * SM4 Cipher Algorithm.
10 #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");
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");
Dtcrypt.c1699 ret += tcrypt_test("gcm(sm4)"); in do_test()
1703 ret += tcrypt_test("ccm(sm4)"); in do_test()
1807 ret += tcrypt_test("cbcmac(sm4)"); in do_test()
1811 ret += tcrypt_test("cmac(sm4)"); in do_test()
1845 ret += tcrypt_test("ecb(sm4)"); in do_test()
1846 ret += tcrypt_test("cbc(sm4)"); in do_test()
1847 ret += tcrypt_test("cfb(sm4)"); in do_test()
1848 ret += tcrypt_test("ctr(sm4)"); in do_test()
2104 test_cipher_speed("ecb(sm4)", ENCRYPT, sec, NULL, 0, in do_test()
2106 test_cipher_speed("ecb(sm4)", DECRYPT, sec, NULL, 0, in do_test()
[all …]
/Linux-v6.1/include/crypto/
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-v6.1/Documentation/translations/zh_TW/arm64/
Delf_hwcaps.rst125 ID_AA64ISAR0_EL1.SM4 == 0b0001 表示有此功能。
193 ID_AA64ZFR0_EL1.SM4 == 0b0001 表示有此功能。
/Linux-v6.1/Documentation/translations/zh_CN/arm64/
Delf_hwcaps.rst122 ID_AA64ISAR0_EL1.SM4 == 0b0001 表示有此功能。
190 ID_AA64ZFR0_EL1.SM4 == 0b0001 表示有此功能。
/Linux-v6.1/drivers/crypto/inside-secure/
Dsafexcel_cipher.c24 #include <crypto/sm4.h>
3133 .cra_name = "ecb(sm4)",
3134 .cra_driver_name = "safexcel-ecb-sm4",
3171 .cra_name = "cbc(sm4)",
3172 .cra_driver_name = "safexcel-cbc-sm4",
3209 .cra_name = "ofb(sm4)",
3210 .cra_driver_name = "safexcel-ofb-sm4",
3247 .cra_name = "cfb(sm4)",
3248 .cra_driver_name = "safexcel-cfb-sm4",
3300 .cra_name = "rfc3686(ctr(sm4))",
[all …]
/Linux-v6.1/drivers/crypto/ccree/
Dcc_cipher.c10 #include <crypto/sm4.h>
386 else /* Must be SM4 since due to sethkey registration */ in cc_cipher_sethkey()
1328 .name = "cbc(sm4)",
1329 .driver_name = "cbc-sm4-ccree",
1345 .name = "ecb(sm4)",
1346 .driver_name = "ecb-sm4-ccree",
1362 .name = "ctr(sm4)",
1363 .driver_name = "ctr-sm4-ccree",
/Linux-v6.1/Documentation/devicetree/bindings/crypto/
Dintel,keembay-ocs-aes.yaml14 hardware-accelerated AES/SM4 encryption/decryption.
/Linux-v6.1/Documentation/arm64/
Delf_hwcaps.rst131 Functionality implied by ID_AA64ISAR0_EL1.SM4 == 0b0001.
192 Functionality implied by ID_AA64ZFR0_EL1.SM4 == 0b0001.

12