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: tcrypt - add SM4 cts-cbc/xts/xcbc test

Added CTS-CBC/XTS/XCBC tests for SM4 algorithms, as well as
corresponding speed tests, this is to test performance-optimized
implementations of these modes.

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
3c383637 c24ee936

+21
+21
crypto/tcrypt.c
··· 1710 1710 ret = min(ret, tcrypt_test("gcm(aria)")); 1711 1711 break; 1712 1712 1713 + case 59: 1714 + ret = min(ret, tcrypt_test("cts(cbc(sm4))")); 1715 + break; 1716 + 1713 1717 case 100: 1714 1718 ret = min(ret, tcrypt_test("hmac(md5)")); 1715 1719 break; ··· 1814 1810 ret = min(ret, tcrypt_test("cmac(sm4)")); 1815 1811 break; 1816 1812 1813 + case 160: 1814 + ret = min(ret, tcrypt_test("xcbc(sm4)")); 1815 + break; 1816 + 1817 1817 case 181: 1818 1818 ret = min(ret, tcrypt_test("authenc(hmac(sha1),cbc(des))")); 1819 1819 break; ··· 1853 1845 ret = min(ret, tcrypt_test("cbc(sm4)")); 1854 1846 ret = min(ret, tcrypt_test("cfb(sm4)")); 1855 1847 ret = min(ret, tcrypt_test("ctr(sm4)")); 1848 + ret = min(ret, tcrypt_test("xts(sm4)")); 1856 1849 break; 1857 1850 case 192: 1858 1851 ret = min(ret, tcrypt_test("ecb(aria)")); ··· 2117 2108 speed_template_16); 2118 2109 test_cipher_speed("cbc(sm4)", DECRYPT, sec, NULL, 0, 2119 2110 speed_template_16); 2111 + test_cipher_speed("cts(cbc(sm4))", ENCRYPT, sec, NULL, 0, 2112 + speed_template_16); 2113 + test_cipher_speed("cts(cbc(sm4))", DECRYPT, sec, NULL, 0, 2114 + speed_template_16); 2120 2115 test_cipher_speed("cfb(sm4)", ENCRYPT, sec, NULL, 0, 2121 2116 speed_template_16); 2122 2117 test_cipher_speed("cfb(sm4)", DECRYPT, sec, NULL, 0, ··· 2129 2116 speed_template_16); 2130 2117 test_cipher_speed("ctr(sm4)", DECRYPT, sec, NULL, 0, 2131 2118 speed_template_16); 2119 + test_cipher_speed("xts(sm4)", ENCRYPT, sec, NULL, 0, 2120 + speed_template_32); 2121 + test_cipher_speed("xts(sm4)", DECRYPT, sec, NULL, 0, 2122 + speed_template_32); 2132 2123 break; 2133 2124 2134 2125 case 219: ··· 2646 2629 speed_template_16); 2647 2630 test_acipher_speed("ctr(sm4)", DECRYPT, sec, NULL, 0, 2648 2631 speed_template_16); 2632 + test_acipher_speed("xts(sm4)", ENCRYPT, sec, NULL, 0, 2633 + speed_template_32); 2634 + test_acipher_speed("xts(sm4)", DECRYPT, sec, NULL, 0, 2635 + speed_template_32); 2649 2636 break; 2650 2637 2651 2638 case 519: