网络与信息安全学报 (Dec 2022)
Public key cryptographic algorithm SM2 optimized implementation on low power embedded platform
Abstract
With the development of wireless communication technology and the popularization of intelligent terminals, more and more cryptographic algorithms are applied to IoT devices to ensure the security of communication and data.Among them, the SM2 elliptic curve public key cryptography proposed by the State Cryptography Administration is an elliptic curve public key cryptography algorithm developed domestically, which has the advantages of high security and short key.SM2 has been widely deployed in various communication systems and is used in essential parts such as identity authentication and key negotiation.However, since SM2 involves large integer operations on finite fields, the computational cost is high, and its execution on a low-power embedded platform seriously affects the user experience.Therefore, an efficient implementation scheme of SM2 algorithm for low-power embedded platform was proposed for ARM-m series processors.Specifically, Thumb-2 instruction set was adopted to handle carry and save addressing cycles, basic operations such as modulo addition and sub-traction of large integers were optimized, and the number of available registers on the platform was combined to build efficient basic operations.Besides, based on the short multiplication and accumulation instruction cycle of ARM-m series processors, the implementation of Montgomery multiplication was optimized, and an efficient modular multiplication scheme was designed in combination with the CIOS algorithm.The scheme was no longer limited to Mersenne primes, and greatly improved the speed and flexibility of modular multiplication.Based on the theoretical analysis and experimental test, the window length selection method of the multiple point-scalar multiplication wNAF sliding window method on the embedded platform was given.The experimental test results show that the proposed scheme can effectively improve the computational efficiency of the SM2 algorithm on the resource-constrained low-power embedded platform.Without pre-calculation, the test signature speed can reach 0.204s/time, the signature verification speed is 0.388s/time, the encryption speed is 0.415s/time, and the decryption speed is 0.197s/time.