Encrypt and decrypt using SM2 — Chinese national standard for elliptic curve public-key cryptography
SM2 is an elliptic curve cryptography (ECC) standard published by the Chinese State Cryptography Administration as GM/T 0003. It defines algorithms for digital signatures, key exchange, and public key encryption using a 256-bit elliptic curve. It is widely used in Chinese government, financial, and commercial systems.
No. All key generation, encryption, and decryption operations happen entirely in your browser. No data is ever sent to any server. Your keys and plaintext remain on your device at all times.
SM2 is an <strong>asymmetric</strong> (public-key) algorithm — it uses a key pair (public and private). SM4 is a <strong>symmetric</strong> (secret-key) block cipher. SM2 is used for key exchange and digital signatures, while SM4 is used for bulk data encryption. They often work together: SM2 exchanges a session key, then SM4 encrypts the data.