Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: arm64/sm4 - add CE implementation for XTS mode

This patch is a CE-optimized assembly implementation for XTS mode.

Benchmark on T-Head Yitian-710 2.75 GHz, the data comes from the 218 mode of
tcrypt, and compared the performance before and after this patch (the driver
used before this patch is xts(ecb-sm4-ce)). The abscissas are blocks of
different lengths. The data is tabulated and the unit is Mb/s:

Before:

xts(ecb-sm4-ce) | 16 64 128 256 1024 1420 4096
----------------+--------------------------------------------------------------
XTS enc | 117.17 430.56 732.92 1134.98 2007.03 2136.23 2347.20
XTS dec | 116.89 429.02 733.40 1132.96 2006.13 2130.50 2347.92

After:

xts-sm4-ce | 16 64 128 256 1024 1420 4096
----------------+--------------------------------------------------------------
XTS enc | 224.68 798.91 1248.08 1714.60 2413.73 2467.84 2612.62
XTS dec | 229.85 791.34 1237.79 1720.00 2413.30 2473.84 2611.95

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Tianjia Zhang and committed by
Herbert Xu
01f63311 b1863fd0

+504 -2
+3 -1
arch/arm64/crypto/Kconfig
··· 231 231 - NEON (Advanced SIMD) extensions 232 232 233 233 config CRYPTO_SM4_ARM64_CE_BLK 234 - tristate "Ciphers: SM4, modes: ECB/CBC/CFB/CTR (ARMv8 Crypto Extensions)" 234 + tristate "Ciphers: SM4, modes: ECB/CBC/CFB/CTR/XTS (ARMv8 Crypto Extensions)" 235 235 depends on KERNEL_MODE_NEON 236 236 select CRYPTO_SKCIPHER 237 237 select CRYPTO_SM4 ··· 242 242 - CBC (Cipher Block Chaining) mode (NIST SP800-38A) 243 243 - CFB (Cipher Feedback) mode (NIST SP800-38A) 244 244 - CTR (Counter) mode (NIST SP800-38A) 245 + - XTS (XOR Encrypt XOR with ciphertext stealing) mode (NIST SP800-38E 246 + and IEEE 1619) 245 247 246 248 Architecture: arm64 using: 247 249 - ARMv8 Crypto Extensions
+343
arch/arm64/crypto/sm4-ce-core.S
··· 35 35 #define RTMP3 v19 36 36 37 37 #define RIV v20 38 + #define RMASK v21 38 39 39 40 40 41 .align 3 ··· 664 663 665 664 ret 666 665 SYM_FUNC_END(sm4_ce_ctr_enc) 666 + 667 + 668 + #define tweak_next(vt, vin, RTMP) \ 669 + sshr RTMP.2d, vin.2d, #63; \ 670 + and RTMP.16b, RTMP.16b, RMASK.16b; \ 671 + add vt.2d, vin.2d, vin.2d; \ 672 + ext RTMP.16b, RTMP.16b, RTMP.16b, #8; \ 673 + eor vt.16b, vt.16b, RTMP.16b; 674 + 675 + .align 3 676 + SYM_FUNC_START(sm4_ce_xts_enc) 677 + /* input: 678 + * x0: round key array, CTX 679 + * x1: dst 680 + * x2: src 681 + * x3: tweak (big endian, 128 bit) 682 + * w4: nbytes 683 + * x5: round key array for IV 684 + */ 685 + ld1 {v8.16b}, [x3] 686 + 687 + cbz x5, .Lxts_enc_nofirst 688 + 689 + SM4_PREPARE(x5) 690 + 691 + /* Generate first tweak */ 692 + SM4_CRYPT_BLK(v8) 693 + 694 + .Lxts_enc_nofirst: 695 + SM4_PREPARE(x0) 696 + 697 + ands w5, w4, #15 698 + lsr w4, w4, #4 699 + sub w6, w4, #1 700 + csel w4, w4, w6, eq 701 + uxtw x5, w5 702 + 703 + movi RMASK.2s, #0x1 704 + movi RTMP0.2s, #0x87 705 + uzp1 RMASK.4s, RMASK.4s, RTMP0.4s 706 + 707 + cbz w4, .Lxts_enc_cts 708 + 709 + .Lxts_enc_loop_8x: 710 + sub w4, w4, #8 711 + tbnz w4, #31, .Lxts_enc_4x 712 + 713 + tweak_next( v9, v8, RTMP0) 714 + tweak_next(v10, v9, RTMP1) 715 + tweak_next(v11, v10, RTMP2) 716 + tweak_next(v12, v11, RTMP3) 717 + tweak_next(v13, v12, RTMP0) 718 + tweak_next(v14, v13, RTMP1) 719 + tweak_next(v15, v14, RTMP2) 720 + 721 + ld1 {v0.16b-v3.16b}, [x2], #64 722 + ld1 {v4.16b-v7.16b}, [x2], #64 723 + eor v0.16b, v0.16b, v8.16b 724 + eor v1.16b, v1.16b, v9.16b 725 + eor v2.16b, v2.16b, v10.16b 726 + eor v3.16b, v3.16b, v11.16b 727 + eor v4.16b, v4.16b, v12.16b 728 + eor v5.16b, v5.16b, v13.16b 729 + eor v6.16b, v6.16b, v14.16b 730 + eor v7.16b, v7.16b, v15.16b 731 + 732 + SM4_CRYPT_BLK8(v0, v1, v2, v3, v4, v5, v6, v7) 733 + 734 + eor v0.16b, v0.16b, v8.16b 735 + eor v1.16b, v1.16b, v9.16b 736 + eor v2.16b, v2.16b, v10.16b 737 + eor v3.16b, v3.16b, v11.16b 738 + eor v4.16b, v4.16b, v12.16b 739 + eor v5.16b, v5.16b, v13.16b 740 + eor v6.16b, v6.16b, v14.16b 741 + eor v7.16b, v7.16b, v15.16b 742 + st1 {v0.16b-v3.16b}, [x1], #64 743 + st1 {v4.16b-v7.16b}, [x1], #64 744 + 745 + tweak_next(v8, v15, RTMP3) 746 + 747 + cbz w4, .Lxts_enc_cts 748 + b .Lxts_enc_loop_8x 749 + 750 + .Lxts_enc_4x: 751 + add w4, w4, #8 752 + cmp w4, #4 753 + blt .Lxts_enc_loop_1x 754 + 755 + sub w4, w4, #4 756 + 757 + tweak_next( v9, v8, RTMP0) 758 + tweak_next(v10, v9, RTMP1) 759 + tweak_next(v11, v10, RTMP2) 760 + 761 + ld1 {v0.16b-v3.16b}, [x2], #64 762 + eor v0.16b, v0.16b, v8.16b 763 + eor v1.16b, v1.16b, v9.16b 764 + eor v2.16b, v2.16b, v10.16b 765 + eor v3.16b, v3.16b, v11.16b 766 + 767 + SM4_CRYPT_BLK4(v0, v1, v2, v3) 768 + 769 + eor v0.16b, v0.16b, v8.16b 770 + eor v1.16b, v1.16b, v9.16b 771 + eor v2.16b, v2.16b, v10.16b 772 + eor v3.16b, v3.16b, v11.16b 773 + st1 {v0.16b-v3.16b}, [x1], #64 774 + 775 + tweak_next(v8, v11, RTMP3) 776 + 777 + cbz w4, .Lxts_enc_cts 778 + 779 + .Lxts_enc_loop_1x: 780 + sub w4, w4, #1 781 + 782 + ld1 {v0.16b}, [x2], #16 783 + eor v0.16b, v0.16b, v8.16b 784 + 785 + SM4_CRYPT_BLK(v0) 786 + 787 + eor v0.16b, v0.16b, v8.16b 788 + st1 {v0.16b}, [x1], #16 789 + 790 + tweak_next(v8, v8, RTMP0) 791 + 792 + cbnz w4, .Lxts_enc_loop_1x 793 + 794 + .Lxts_enc_cts: 795 + cbz x5, .Lxts_enc_end 796 + 797 + /* cipher text stealing */ 798 + 799 + tweak_next(v9, v8, RTMP0) 800 + ld1 {v0.16b}, [x2] 801 + eor v0.16b, v0.16b, v8.16b 802 + SM4_CRYPT_BLK(v0) 803 + eor v0.16b, v0.16b, v8.16b 804 + 805 + /* load permute table */ 806 + adr_l x6, .Lcts_permute_table 807 + add x7, x6, #32 808 + add x6, x6, x5 809 + sub x7, x7, x5 810 + ld1 {v3.16b}, [x6] 811 + ld1 {v4.16b}, [x7] 812 + 813 + /* overlapping loads */ 814 + add x2, x2, x5 815 + ld1 {v1.16b}, [x2] 816 + 817 + /* create Cn from En-1 */ 818 + tbl v2.16b, {v0.16b}, v3.16b 819 + /* padding Pn with En-1 at the end */ 820 + tbx v0.16b, {v1.16b}, v4.16b 821 + 822 + eor v0.16b, v0.16b, v9.16b 823 + SM4_CRYPT_BLK(v0) 824 + eor v0.16b, v0.16b, v9.16b 825 + 826 + 827 + /* overlapping stores */ 828 + add x5, x1, x5 829 + st1 {v2.16b}, [x5] 830 + st1 {v0.16b}, [x1] 831 + 832 + b .Lxts_enc_ret 833 + 834 + .Lxts_enc_end: 835 + /* store new tweak */ 836 + st1 {v8.16b}, [x3] 837 + 838 + .Lxts_enc_ret: 839 + ret 840 + SYM_FUNC_END(sm4_ce_xts_enc) 841 + 842 + .align 3 843 + SYM_FUNC_START(sm4_ce_xts_dec) 844 + /* input: 845 + * x0: round key array, CTX 846 + * x1: dst 847 + * x2: src 848 + * x3: tweak (big endian, 128 bit) 849 + * w4: nbytes 850 + * x5: round key array for IV 851 + */ 852 + ld1 {v8.16b}, [x3] 853 + 854 + cbz x5, .Lxts_dec_nofirst 855 + 856 + SM4_PREPARE(x5) 857 + 858 + /* Generate first tweak */ 859 + SM4_CRYPT_BLK(v8) 860 + 861 + .Lxts_dec_nofirst: 862 + SM4_PREPARE(x0) 863 + 864 + ands w5, w4, #15 865 + lsr w4, w4, #4 866 + sub w6, w4, #1 867 + csel w4, w4, w6, eq 868 + uxtw x5, w5 869 + 870 + movi RMASK.2s, #0x1 871 + movi RTMP0.2s, #0x87 872 + uzp1 RMASK.4s, RMASK.4s, RTMP0.4s 873 + 874 + cbz w4, .Lxts_dec_cts 875 + 876 + .Lxts_dec_loop_8x: 877 + sub w4, w4, #8 878 + tbnz w4, #31, .Lxts_dec_4x 879 + 880 + tweak_next( v9, v8, RTMP0) 881 + tweak_next(v10, v9, RTMP1) 882 + tweak_next(v11, v10, RTMP2) 883 + tweak_next(v12, v11, RTMP3) 884 + tweak_next(v13, v12, RTMP0) 885 + tweak_next(v14, v13, RTMP1) 886 + tweak_next(v15, v14, RTMP2) 887 + 888 + ld1 {v0.16b-v3.16b}, [x2], #64 889 + ld1 {v4.16b-v7.16b}, [x2], #64 890 + eor v0.16b, v0.16b, v8.16b 891 + eor v1.16b, v1.16b, v9.16b 892 + eor v2.16b, v2.16b, v10.16b 893 + eor v3.16b, v3.16b, v11.16b 894 + eor v4.16b, v4.16b, v12.16b 895 + eor v5.16b, v5.16b, v13.16b 896 + eor v6.16b, v6.16b, v14.16b 897 + eor v7.16b, v7.16b, v15.16b 898 + 899 + SM4_CRYPT_BLK8(v0, v1, v2, v3, v4, v5, v6, v7) 900 + 901 + eor v0.16b, v0.16b, v8.16b 902 + eor v1.16b, v1.16b, v9.16b 903 + eor v2.16b, v2.16b, v10.16b 904 + eor v3.16b, v3.16b, v11.16b 905 + eor v4.16b, v4.16b, v12.16b 906 + eor v5.16b, v5.16b, v13.16b 907 + eor v6.16b, v6.16b, v14.16b 908 + eor v7.16b, v7.16b, v15.16b 909 + st1 {v0.16b-v3.16b}, [x1], #64 910 + st1 {v4.16b-v7.16b}, [x1], #64 911 + 912 + tweak_next(v8, v15, RTMP3) 913 + 914 + cbz w4, .Lxts_dec_cts 915 + b .Lxts_dec_loop_8x 916 + 917 + .Lxts_dec_4x: 918 + add w4, w4, #8 919 + cmp w4, #4 920 + blt .Lxts_dec_loop_1x 921 + 922 + sub w4, w4, #4 923 + 924 + tweak_next( v9, v8, RTMP0) 925 + tweak_next(v10, v9, RTMP1) 926 + tweak_next(v11, v10, RTMP2) 927 + 928 + ld1 {v0.16b-v3.16b}, [x2], #64 929 + eor v0.16b, v0.16b, v8.16b 930 + eor v1.16b, v1.16b, v9.16b 931 + eor v2.16b, v2.16b, v10.16b 932 + eor v3.16b, v3.16b, v11.16b 933 + 934 + SM4_CRYPT_BLK4(v0, v1, v2, v3) 935 + 936 + eor v0.16b, v0.16b, v8.16b 937 + eor v1.16b, v1.16b, v9.16b 938 + eor v2.16b, v2.16b, v10.16b 939 + eor v3.16b, v3.16b, v11.16b 940 + st1 {v0.16b-v3.16b}, [x1], #64 941 + 942 + tweak_next(v8, v11, RTMP3) 943 + 944 + cbz w4, .Lxts_dec_cts 945 + 946 + .Lxts_dec_loop_1x: 947 + sub w4, w4, #1 948 + 949 + ld1 {v0.16b}, [x2], #16 950 + eor v0.16b, v0.16b, v8.16b 951 + 952 + SM4_CRYPT_BLK(v0) 953 + 954 + eor v0.16b, v0.16b, v8.16b 955 + st1 {v0.16b}, [x1], #16 956 + 957 + tweak_next(v8, v8, RTMP0) 958 + 959 + cbnz w4, .Lxts_dec_loop_1x 960 + 961 + .Lxts_dec_cts: 962 + cbz x5, .Lxts_dec_end 963 + 964 + /* cipher text stealing */ 965 + 966 + tweak_next(v9, v8, RTMP0) 967 + ld1 {v0.16b}, [x2] 968 + eor v0.16b, v0.16b, v9.16b 969 + SM4_CRYPT_BLK(v0) 970 + eor v0.16b, v0.16b, v9.16b 971 + 972 + /* load permute table */ 973 + adr_l x6, .Lcts_permute_table 974 + add x7, x6, #32 975 + add x6, x6, x5 976 + sub x7, x7, x5 977 + ld1 {v3.16b}, [x6] 978 + ld1 {v4.16b}, [x7] 979 + 980 + /* overlapping loads */ 981 + add x2, x2, x5 982 + ld1 {v1.16b}, [x2] 983 + 984 + /* create Cn from En-1 */ 985 + tbl v2.16b, {v0.16b}, v3.16b 986 + /* padding Pn with En-1 at the end */ 987 + tbx v0.16b, {v1.16b}, v4.16b 988 + 989 + eor v0.16b, v0.16b, v8.16b 990 + SM4_CRYPT_BLK(v0) 991 + eor v0.16b, v0.16b, v8.16b 992 + 993 + 994 + /* overlapping stores */ 995 + add x5, x1, x5 996 + st1 {v2.16b}, [x5] 997 + st1 {v0.16b}, [x1] 998 + 999 + b .Lxts_dec_ret 1000 + 1001 + .Lxts_dec_end: 1002 + /* store new tweak */ 1003 + st1 {v8.16b}, [x3] 1004 + 1005 + .Lxts_dec_ret: 1006 + ret 1007 + SYM_FUNC_END(sm4_ce_xts_dec) 667 1008 668 1009 669 1010 .section ".rodata", "a"
+158 -1
arch/arm64/crypto/sm4-ce-glue.c
··· 17 17 #include <crypto/internal/simd.h> 18 18 #include <crypto/internal/skcipher.h> 19 19 #include <crypto/scatterwalk.h> 20 + #include <crypto/xts.h> 20 21 #include <crypto/sm4.h> 21 22 22 23 #define BYTES2BLKS(nbytes) ((nbytes) >> 4) ··· 41 40 u8 *iv, unsigned int nblks); 42 41 asmlinkage void sm4_ce_ctr_enc(const u32 *rkey, u8 *dst, const u8 *src, 43 42 u8 *iv, unsigned int nblks); 43 + asmlinkage void sm4_ce_xts_enc(const u32 *rkey1, u8 *dst, const u8 *src, 44 + u8 *tweak, unsigned int nbytes, 45 + const u32 *rkey2_enc); 46 + asmlinkage void sm4_ce_xts_dec(const u32 *rkey1, u8 *dst, const u8 *src, 47 + u8 *tweak, unsigned int nbytes, 48 + const u32 *rkey2_enc); 44 49 45 50 EXPORT_SYMBOL(sm4_ce_expand_key); 46 51 EXPORT_SYMBOL(sm4_ce_crypt_block); 47 52 EXPORT_SYMBOL(sm4_ce_cbc_enc); 48 53 EXPORT_SYMBOL(sm4_ce_cfb_enc); 54 + 55 + struct sm4_xts_ctx { 56 + struct sm4_ctx key1; 57 + struct sm4_ctx key2; 58 + }; 49 59 50 60 static int sm4_setkey(struct crypto_skcipher *tfm, const u8 *key, 51 61 unsigned int key_len) ··· 70 58 sm4_ce_expand_key(key, ctx->rkey_enc, ctx->rkey_dec, 71 59 crypto_sm4_fk, crypto_sm4_ck); 72 60 kernel_neon_end(); 61 + return 0; 62 + } 63 + 64 + static int sm4_xts_setkey(struct crypto_skcipher *tfm, const u8 *key, 65 + unsigned int key_len) 66 + { 67 + struct sm4_xts_ctx *ctx = crypto_skcipher_ctx(tfm); 68 + int ret; 69 + 70 + if (key_len != SM4_KEY_SIZE * 2) 71 + return -EINVAL; 72 + 73 + ret = xts_verify_key(tfm, key, key_len); 74 + if (ret) 75 + return ret; 76 + 77 + kernel_neon_begin(); 78 + sm4_ce_expand_key(key, ctx->key1.rkey_enc, 79 + ctx->key1.rkey_dec, crypto_sm4_fk, crypto_sm4_ck); 80 + sm4_ce_expand_key(&key[SM4_KEY_SIZE], ctx->key2.rkey_enc, 81 + ctx->key2.rkey_dec, crypto_sm4_fk, crypto_sm4_ck); 82 + kernel_neon_end(); 83 + 73 84 return 0; 74 85 } 75 86 ··· 392 357 return err; 393 358 } 394 359 360 + static int sm4_xts_crypt(struct skcipher_request *req, bool encrypt) 361 + { 362 + struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); 363 + struct sm4_xts_ctx *ctx = crypto_skcipher_ctx(tfm); 364 + int tail = req->cryptlen % SM4_BLOCK_SIZE; 365 + const u32 *rkey2_enc = ctx->key2.rkey_enc; 366 + struct scatterlist sg_src[2], sg_dst[2]; 367 + struct skcipher_request subreq; 368 + struct scatterlist *src, *dst; 369 + struct skcipher_walk walk; 370 + unsigned int nbytes; 371 + int err; 372 + 373 + if (req->cryptlen < SM4_BLOCK_SIZE) 374 + return -EINVAL; 375 + 376 + err = skcipher_walk_virt(&walk, req, false); 377 + if (err) 378 + return err; 379 + 380 + if (unlikely(tail > 0 && walk.nbytes < walk.total)) { 381 + int nblocks = DIV_ROUND_UP(req->cryptlen, SM4_BLOCK_SIZE) - 2; 382 + 383 + skcipher_walk_abort(&walk); 384 + 385 + skcipher_request_set_tfm(&subreq, tfm); 386 + skcipher_request_set_callback(&subreq, 387 + skcipher_request_flags(req), 388 + NULL, NULL); 389 + skcipher_request_set_crypt(&subreq, req->src, req->dst, 390 + nblocks * SM4_BLOCK_SIZE, req->iv); 391 + 392 + err = skcipher_walk_virt(&walk, &subreq, false); 393 + if (err) 394 + return err; 395 + } else { 396 + tail = 0; 397 + } 398 + 399 + while ((nbytes = walk.nbytes) >= SM4_BLOCK_SIZE) { 400 + if (nbytes < walk.total) 401 + nbytes &= ~(SM4_BLOCK_SIZE - 1); 402 + 403 + kernel_neon_begin(); 404 + 405 + if (encrypt) 406 + sm4_ce_xts_enc(ctx->key1.rkey_enc, walk.dst.virt.addr, 407 + walk.src.virt.addr, walk.iv, nbytes, 408 + rkey2_enc); 409 + else 410 + sm4_ce_xts_dec(ctx->key1.rkey_dec, walk.dst.virt.addr, 411 + walk.src.virt.addr, walk.iv, nbytes, 412 + rkey2_enc); 413 + 414 + kernel_neon_end(); 415 + 416 + rkey2_enc = NULL; 417 + 418 + err = skcipher_walk_done(&walk, walk.nbytes - nbytes); 419 + if (err) 420 + return err; 421 + } 422 + 423 + if (likely(tail == 0)) 424 + return 0; 425 + 426 + /* handle ciphertext stealing */ 427 + 428 + dst = src = scatterwalk_ffwd(sg_src, req->src, subreq.cryptlen); 429 + if (req->dst != req->src) 430 + dst = scatterwalk_ffwd(sg_dst, req->dst, subreq.cryptlen); 431 + 432 + skcipher_request_set_crypt(&subreq, src, dst, SM4_BLOCK_SIZE + tail, 433 + req->iv); 434 + 435 + err = skcipher_walk_virt(&walk, &subreq, false); 436 + if (err) 437 + return err; 438 + 439 + kernel_neon_begin(); 440 + 441 + if (encrypt) 442 + sm4_ce_xts_enc(ctx->key1.rkey_enc, walk.dst.virt.addr, 443 + walk.src.virt.addr, walk.iv, walk.nbytes, 444 + rkey2_enc); 445 + else 446 + sm4_ce_xts_dec(ctx->key1.rkey_dec, walk.dst.virt.addr, 447 + walk.src.virt.addr, walk.iv, walk.nbytes, 448 + rkey2_enc); 449 + 450 + kernel_neon_end(); 451 + 452 + return skcipher_walk_done(&walk, 0); 453 + } 454 + 455 + static int sm4_xts_encrypt(struct skcipher_request *req) 456 + { 457 + return sm4_xts_crypt(req, true); 458 + } 459 + 460 + static int sm4_xts_decrypt(struct skcipher_request *req) 461 + { 462 + return sm4_xts_crypt(req, false); 463 + } 464 + 395 465 static struct skcipher_alg sm4_algs[] = { 396 466 { 397 467 .base = { ··· 575 435 .setkey = sm4_setkey, 576 436 .encrypt = sm4_cbc_cts_encrypt, 577 437 .decrypt = sm4_cbc_cts_decrypt, 438 + }, { 439 + .base = { 440 + .cra_name = "xts(sm4)", 441 + .cra_driver_name = "xts-sm4-ce", 442 + .cra_priority = 400, 443 + .cra_blocksize = SM4_BLOCK_SIZE, 444 + .cra_ctxsize = sizeof(struct sm4_xts_ctx), 445 + .cra_module = THIS_MODULE, 446 + }, 447 + .min_keysize = SM4_KEY_SIZE * 2, 448 + .max_keysize = SM4_KEY_SIZE * 2, 449 + .ivsize = SM4_BLOCK_SIZE, 450 + .walksize = SM4_BLOCK_SIZE * 2, 451 + .setkey = sm4_xts_setkey, 452 + .encrypt = sm4_xts_encrypt, 453 + .decrypt = sm4_xts_decrypt, 578 454 } 579 455 }; 580 456 ··· 607 451 module_cpu_feature_match(SM4, sm4_init); 608 452 module_exit(sm4_exit); 609 453 610 - MODULE_DESCRIPTION("SM4 ECB/CBC/CFB/CTR using ARMv8 Crypto Extensions"); 454 + MODULE_DESCRIPTION("SM4 ECB/CBC/CFB/CTR/XTS using ARMv8 Crypto Extensions"); 611 455 MODULE_ALIAS_CRYPTO("sm4-ce"); 612 456 MODULE_ALIAS_CRYPTO("sm4"); 613 457 MODULE_ALIAS_CRYPTO("ecb(sm4)"); ··· 615 459 MODULE_ALIAS_CRYPTO("cfb(sm4)"); 616 460 MODULE_ALIAS_CRYPTO("ctr(sm4)"); 617 461 MODULE_ALIAS_CRYPTO("cts(cbc(sm4))"); 462 + MODULE_ALIAS_CRYPTO("xts(sm4)"); 618 463 MODULE_AUTHOR("Tianjia Zhang <tianjia.zhang@linux.alibaba.com>"); 619 464 MODULE_LICENSE("GPL v2");