Current location - Quotes Website - Signature design - What is sm algorithm?
What is sm algorithm?
Domestic cryptographic algorithm (state secret algorithm) refers to the domestic commercial cryptographic algorithm approved by the State Cryptography Administration. At present, three public algorithms are mainly used, namely asymmetric algorithm, hash algorithm and symmetric algorithm.

1.SM2 algorithm: SM2 elliptic curve public key cryptosystem is a public key cryptosystem independently designed in China, including SM2- 1 elliptic curve digital signature algorithm, SM2-2 elliptic curve key exchange protocol and SM2-3 elliptic curve public key encryption algorithm, which are used to realize digital signature key negotiation and data encryption respectively. The difference between SM2 algorithm and RSA algorithm is that SM2 algorithm is based on the discrete logarithm problem of point group on elliptic curve. Compared with RSA algorithm, the strength of 256-bit SM2 password is already higher than that of 2048-bit RSA password. Elliptic curve parameters do not give a recommended curve, and curve parameters need to be generated by a certain algorithm. However, in practice, the National Secret Service recommends the use of a 256-bit elliptic curve in the prime number domain, and its curve equation is y 2 = x 3+ax+b (where p is a big prime number greater than 3, n is the order of the base point G, Gx and Gy are the x and y values of the base point G respectively, and A and B are the curve equation coefficients with a circle y 2 = x 3+ax+b).

2.SM3 algorithm: SM3 hashing algorithm is a password hashing algorithm independently designed by China, which is suitable for the generation and verification of digital signatures and authentication codes and the generation of random numbers in commercial password applications, and can meet the security requirements of various password applications. In order to ensure the security of hash algorithm, the generated hash value should not be too short. For example, MD5 outputs a hash value of 128 bits, and the output length is too short, which affects its security. The output length of SHA- 1 algorithm is 160 bits, and that of SM3 algorithm is 256 bits, so the security of SM3 algorithm is higher than that of MD5 algorithm and SHA-65438+.

3.SM4 algorithm: SM4 block cipher algorithm is a block symmetric cipher algorithm independently designed in China, which is used to encrypt/decrypt data and ensure the confidentiality of data and information. The basic condition to ensure the security of symmetric cryptographic algorithm is that it has enough key length. SM4 algorithm has the same key length as AES algorithm, and the packet length is 128 bits, so it is more secure than 3DES algorithm.