SM4是中国分组密码国家标准,广泛应用于各种信息系统和安全产品。某些应用环境对密码算法的软件实现性能有很高的需求。目前SM4的软件实现方法仅限于查表实现,因此,研究SM4算法的快速软件实现技术很重要。利用SIMD技术,给出SM4的软件优化实现。与目前基于查表的软件实现相比,它有明显优势。在Intel Core i7-6700处理器上,相比于查表方法,利用SIMD技术的软件实现性能提高1.38倍。
SM4 is the national block cipher standard of China widely used in various information systems and security products.Some application environments have high demands for software implementation performance of cryptographic algorithms. Currently, SM4 software implementation is based on look-up table. Therefore, fast software implementation of SM4 algorithm has become an important research topic. This work investigates the software optimization implementation of SM4. Using SIMD technique, we present software optimization implementation of SM4, which has a significant advantage over current software implementation based on look-up table. On the Intel Core i7-6700 processor, the software performance improves by 1.38 times compared to implementation based on look-up table.
[1] 国家密码管理局.GM/T0002-2012. SM4分组密码算法[S]. 北京:中国标准出版社, 2012.
[2] 国家密码管理局. 国家密码管理局公告第23号[EB/OL]. (2012-02-21)[2017-01-20]. http://www.oscca.gov.cn/News/201204/News_1227.htm.
[3] U.S. Department of Commerce/National Institute of Standards and Technology.Data encryption standard(DES), federal information processing standards publication[S/OL]. Gaithersburg, MD(1999)[2017-01-20]. http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf.
[4] Daemen J, Rijmen V. The design of Rijndael:AES-the advanced encryption standard[M]. Springer Science & Business Media, 2013.
[5] Gueron S. Intel advanced encryption standard (AES) new instructions set[R/OL]. Intel White Paper Rev3.01. (2012)[2017-01-20]. https://software.intel.com/sites/default/files/article/165683/aes-wp-2012-09-22-v01.pdf.
[6] Intel:advanced vector extensions programming reference[R/OL]. Intel corporation (2009)[2016-12-29]. https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf.
[7] Seiichi M, Shiho M. Lightweight cryptography for the cloud:exploit the power of bitslice implementation[C]//Prouff E, Patrick S. CHES 2012. Berlin Heidelberg:Springer, 2012:408-425.
[8] Biham E. A fast new DES implementation in software[C]//Biham E. FSE1997. Berlin Heidelberg:Springer, 1997:260-272.
[9] Bogdanov A, Knudsen L R, Leander G, et al. PRESENT:an ultra-lightweight block cipher[C]//Paillier P, Verbauwhede I. CHES 2007. Berlin Heidelberg:Springer, 2007:450-466.
[10] Shibutani K, Isobe T, Hiwatari H, et al. Piccolo:an ultra-lightweight block cipher[C]//Preneel B, Takagi T. CHES 2011. Berlin Heidelberg:Springer, 2011:342-357.
[11] Neves S, Aumasson J P. Implementing BLAKE with AVX, AVX2, and XOP[J]. IACR Cryptology ePrint Archive, 2012, 2012:275.
[12] Aumasson J, Henzen L, Meier W, et al. SHA-3 proposal BLAKE[J/OL]. Submission to NIST, 2008.[2017-01-20]. http://www.131002.net/blake/.
[13] Ryad B, Guo J, Victor L, et al. Implementing lightweight block ciphers on x86 architectures[C]//Lange T, Lauter K. SAC 2013. Berlin Heidelberg:Springer, 2014:324-351.