Research on Efficient Implementation of SM2 for Mobile Devices

被引:0
|
作者
Zhang J.-P. [1 ]
Huang J.-H. [2 ,3 ]
Yu X. [1 ]
Liu Z. [1 ,4 ]
机构
[1] College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Jiangsu, Nanjing
[2] Hong Kong Baptist University, Hong Kong
[3] BNU-HKBU United International College, Guangdong, Zhuhai
[4] Zhejiang Laboratory, Zhejiang, Hangzhou
来源
关键词
ARMv8-A platform; elliptic curve cryptography; finite field operation; modular inversion operation; optimized implementation of SM2;
D O I
10.12263/DZXB.20221419
中图分类号
学科分类号
摘要
SM2 has been fully studied on x86-64 architecture, but its optimization on ARMv8-A architecture is inadequate. In this work, we propose the following optimizations to fill this gap: for the modular multiplication/squaring of p and n in SM2, we optimize Montgomery modular multiplication/squaring by leveraging the numerical characteristics of p and n; for the modular inversion of p and n in SM2, we derive and implement a faster modular inversion algorithm based on Fermat's little theorem; for fixed-point and unknown-point scalar multiplication, we implement window algorithms with a window width of 7 and 5, respectively; for the calculation of s during the signature generation process, we replace a modular multiplication of n with a cheaper modular addition/subtraction of n. After integrating the optimizations mentioned above into OpenSSL (3.0.0-beta1), the benchmark on the HUAWEI Cloud Kunpeng 920 computing platform shows that the performance of SM2 signature generation is accelerated by 8.7 times; the performance of SM2 signature verification is accelerated by 3.5 times. Meanwhile, on the mobile device Raspberry Pi 4 platform, the performance of SM2 signature generation is accelerated by 9.7 times; the performance of SM2 signature verification is accelerated by 3.4 times. © 2023 Chinese Institute of Electronics. All rights reserved.
引用
收藏
页码:3437 / 3443
页数:6
相关论文
共 18 条
  • [1] HANKERSON D, MENEZES A J, VANSTONE S., Guide to Elliptic Curve Cryptography, (2006)
  • [2] ADALIER M, TEKNIK A., Efficient and secure elliptic curve cryptography implementation of curve p-256, Workshop on Elliptic Curve Cryptography Standards, pp. 1-10, (2015)
  • [3] BERNSTEIN D J., Curve25519: New Diffie-Hellman speed records, International Workshop on Public Key Cryptography, pp. 207-228, (2006)
  • [4] BERNSTEIN D J, DUIF N, LANGE T, Et al., High-speed high-security signatures, Journal of Cryptographic Engineering, 2, 2, pp. 77-89, (2012)
  • [5] XIA J, CHENG C N, ZHOU X P, Et al., Kunpeng 920: The first 7-nm chiplet-based 64-core ARM SoC for cloud services, IEEE Micro, 41, 5, pp. 67-75, (2021)
  • [6] DONGARRA J., Report on the Fujitsu Fugaku system
  • [7] BERNSTEIN D J, SCHWABE P., NEON crypto, International Workshop on Cryptographic Hardware and Embedded Systems, pp. 320-339, (2012)
  • [8] FAZ-HERNANDEZ A, LOPEZ J, DAHAB R., High-performance implementation of elliptic curve cryptography using vector instructions, ACM Transactions on Mathematical Software, 45, 3, pp. 1-35, (2019)
  • [9] KOC C K, ACAR T, KALISKI B S., Analyzing and comparing Montgomery multiplication algorithms, IEEE Micro, 16, 3, pp. 26-33, (1996)
  • [10] MAI L, YAN Y, JIA S L, Et al., Accelerating SM2 digital signature algorithm using modern processor features, International Conference on Information and Communications Security, pp. 430-446, (2019)