SM2 is an asymmetric encryption algorithm that can also be used to directly
encrypt data. Typically, A encrypts a file or data using the public key,
passes the ciphertext to B, and B decrypts it using the corresponding private key.
SM2 encryption and decryption are suitable for shorter texts only.
For larger files, the process can be very slow. According to the SM2 algorithm
usage specifications, the encrypted ciphertext needs to be ASN.1 encoded.
We provide the functions sm2_encrypt_asna1 and sm2_decrypt_asna1 for this purpose.
Additionally, some scenarios use different arrangements of c1, c2, c3,
so we also offer the functions sm2_encrypt_c1c2c3 and sm2_decrypt_c1c2c3.
To facilitate the transmission of binary data, we also provide functions
to encrypt data into hexadecimal or base64 strings and decrypt from them.