What advantages does the SM2 algorithm have over the RSA algorithm?

Both the SM2 algorithm and the RSA algorithm are public-key cryptographic algorithms. The SM2 algorithm is a more advanced and secure algorithm, which is superior to the RSA algorithm in terms of security performance and speed performance. It is used to replace the RSA algorithm in my country's commercial encryption system. The State Encryption Administration released the SM2 algorithm on December 17, 2010, and required the existing electronic authentication system, key management system, and application system based on the RSA algorithm to be upgraded and upgraded to use the SM2 algorithm.

Introduction to SM2 Algorithm and RSA Algorithm

The RSA public key encryption algorithm was proposed by American computer scientists Ron Rivest, Adi Shamir and Leonard Adleman in 1977. It is one of the earliest public key encryption algorithms and is widely used around the world. With the development of cryptography and computer technology, the current 1024-bit RSA algorithm has been proven to be at risk of being cracked. In 2010, the US NIST (National Institute of Standards and Technology) requested that the 1024-bit RSA algorithm be completely banned and upgraded to 2048-bit RSA algorithm. . In addition, after the Snowden incident broke out, the leaked confidential documents showed that there may be NSA preset backdoors in the RSA algorithm, which has a huge impact on the security of the RSA algorithm.

The SM2 algorithm was released by the State Cryptography Administration on December 17, 2010. It is a public key cryptography algorithm independently designed by my country. It is based on a more secure and advanced elliptic curve cryptography mechanism and independently developed on the basis of the international standard ECC elliptic curve cryptography theory. Design, with the performance characteristics of the ECC algorithm and to achieve optimization and improvement.

Performance comparison between SM2 algorithm and RSA algorithm

Both the SM2 algorithm and the RSA algorithm belong to the public key encryption algorithm, but they are based on different mathematical theoretical foundations. Compared with the RSA algorithm, the SM2 algorithm has the characteristics of strong attack resistance, less CPU usage, less content usage, lower network consumption, and faster encryption speed.

(1) Comparison of security performance between SM2 algorithm and RSA algorithm

The RSA algorithm is designed based on the mathematical problem of large integer factorization (IFP). Its mathematical principle is relatively simple, and it is relatively easy to implement in engineering applications, but its unit security strength is relatively low. The difficulty of factorizing large integers determines the reliability of the RSA algorithm. With the improvement of computer computing speed and the development of distributed computing, coupled with the improvement of factorization methods, it has become possible to crack low-digit keys.

ECC (Elliptic Curves Cryptography, Elliptic Curve Cryptography) was proposed by Koblitz and Miller in 1985, and its mathematical basis is based on the discrete logarithm calculation problem (ECDLP) on elliptic curves. The mathematical theory of the ECC algorithm is very profound and complex, and it is difficult to realize in engineering applications, but its unit security strength is relatively high. Use the internationally recognized most effective attack method against the ECC algorithm—the Pollard rho method to decipher and attack the ECC algorithm. The difficulty of deciphering or solving it is basically exponential.

Therefore, the unit security strength of the ECC algorithm is much higher than that of the RSA algorithm, and it can provide higher security strength than the RSA algorithm with less computing power, while the required key length is much lower than that of the RSA algorithm. At present, ECC-based SM2 certificates generally use 256-bit key length, and the encryption strength is equivalent to 3072-bit RSA certificates, much higher than the 2048-bit RSA certificates commonly used in the industry .

In addition, in order to improve the security strength, the key length must be continuously increased. The key length of the ECC algorithm increases slowly (for example: 224-256-384), while the key length of the RSA algorithm needs to increase in multiples (for example: 1024-2048- 4096).

(2) Comparison of speed performance between SM2 algorithm and RSA algorithm

During the TLS handshake, longer keys mean more data must be sent back and forth to verify the connection, resulting in greater performance loss and time delay. Therefore, the ECC algorithm can establish an HTTPS connection with a smaller key and less data transfer, and improve the connection speed while ensuring the same security strength. Tested by relevant foreign authorities, the Apache and IIS servers use the ECC algorithm, and the response time of the Web server is more than ten times faster than the RSA algorithm.

Optimization and Advancement of SM2 Algorithm

The SM2 algorithm is independently developed and designed by China based on the ECC elliptic curve cryptography theory. It was released by the State Cryptography Administration on December 17, 2010. A 256-bit curve was recommended as the standard curve in the password industry standard GMT 0003.1-2012 SM2 General Rules. The signature algorithm, key exchange protocol and public key encryption algorithm generate key pairs based on the finite fields and elliptic curves selected by the general rules of SM2; in terms of digital signature and key exchange, they are different from international algorithms such as ECDSA and ECDH, but adopt more For a safe mechanism, the amount of calculation and complexity is increased; in terms of digital signature and verification, message authentication code generation and verification, and random number generation, etc., use the SM3 cryptographic hash algorithm and random number generator approved by the State Secrets Administration . The SM3 hash algorithm is a cryptographic hash algorithm independently designed by our country. It is more secure than the MD5 algorithm (128 bits) and the SHA-1 algorithm (160 bits). The compression function of the SM3 algorithm has a similar structure to SHA-256, but the design is more complicated. The SM4 block cipher algorithm is a block symmetric cipher algorithm independently designed by our country. It has the same key length of 128 bits as the AES algorithm, and its security is higher than that of the 3DES algorithm. It can resist various attacks against the block cipher algorithm in practical applications. method.

Application and promotion of SM2 algorithm

The security of cryptographic algorithms is the core of information security assurance. Protecting the security of important data through independent and controllable domestic cryptographic technology is an important measure to effectively improve the level of information security assurance in my country. my country vigorously promotes the SM2 domestic encryption algorithm to replace the currently used RSA algorithm. On the one hand, it avoids the security risks such as the vulnerability of the RSA algorithm and the "preset back door". The security and credibility of my country's information security infrastructure. Document No. 36 of the Office of the Central Committee of the Communist Party of China in 2018 "Planning for the Application and Innovation and Development of Cryptography in Financial and Important Fields (2018-2022)" and related regulatory documents require that my country's financial and important fields use the SM2 domestic cryptographic algorithm system for cryptographic applications.

However, since the national encryption algorithm has not yet been widely compatible and is not trusted in terminal environments such as mainstream browsers and operating systems, the use of domestic encryption algorithms in Internet-oriented product applications will not be able to meet the needs of usability, ease of use, and global versatility , it is difficult to implement it in practical applications.

In response to this application problem, WoSign CA proposed a "dual-track system" application model, and launched SM2/RSA dual certificate services as well as MeSign browser, MeSign mail client, MeSign PDF Reader and other client products that support national secret algorithms build a series of national The application solution makes the application based on the national secret algorithm truly feasible and implementable, helps the government, enterprises and institutions to smoothly realize the upgrade and transformation of the national secret algorithm, and promotes the popularization and application of the national secret algorithm.

Guess you like

Origin blog.csdn.net/lavin1614/article/details/131380147