SM2Q cryptographic algorithm is a commercial cryptographic algorithm published by China 20 10, which belongs to public key cryptographic algorithm and has also become an asymmetric key mechanism cryptographic algorithm. SM2 is based on elliptic curve discrete logarithm problem, which is better than RSA based on factorization of large integers. Sm2 signature algorithm is a digital signature algorithm based on elliptic curve cryptography.
SM2 is asymmetric encryption based on ECCQ. The algorithm has been published. Because the algorithm is based on ECC, its signature speed and key generation speed are faster than RSA. The security strength of ECC 256 bit is higher than RSA2048 bit, but the operation speed is faster than RSA. The encryption sort of the old standard is C 1C2C3, and the new standard C 1C3C2, C 1 is 65 bytes. 1 byte is a compressed identifier, which is fixed as Ox04 here, and the next 64 bytes are 32 bytes of the xy component. C3 is 32 bytes. The length of C2 is consistent with the original text.
Brief introduction of digital signature algorithm
In the digital signature algorithm, the signer generates a digital signature on the data and the verifier verifies the reliability of the signature. Each signer consists of a public key and a private key, in which the private key is used to generate the signature and the verifier verifies the signature with the signer's public key. Generally speaking, digital signature does not directly sign the original data, but uses cryptographic hash algorithm to compress the original data and output a summary value, and then signs the summary value. At the time of verification, you also need to get the summary value for comparative verification.
The private key and public key are mentioned above. Specifically, the private key dA is a 256-bit random number, and the corresponding public key PA=dA]G=(XA, YA). XA and YA are both 256 bits, so the length of PA is 5 12 bits. According to the disclosure of SM2 parameters, SM2 uses a 256-bit elliptic curve in the prime number field, with the base point G as (xG, yG) and P as a large prime number, which is an elliptic curve defined in the finite field GF.