SYSEC WebTools

SM2 Tools

Generating a pair replaces the keys currently shown. Copy a private key only to a trusted location if you need it; clearing or leaving this page discards it from the interface.

Raw ciphertext includes the 04 prefix. DER uses SEQUENCE {x, y, C3, C2}. Format conversion checks structure and curve points; only decryption checks ciphertext integrity.

Raw signature = r || s (64 bytes). Signing and verification always use SM3 with ZA and the User ID, which must match on both sides. Signature format conversion does not verify a message.

Keys, messages, and results stay in this browser. No uploads, URL parameters, logs, or automatic storage. This developer testing tool is not a certified cryptographic product or production key management system.

How to use

Generate a key pair, enter a message, and encrypt. Use the result button to prepare decryption with the matching format and encodings. For signatures, select Sign, run, then use the result button to prepare verification of the same message and User ID.

Only the recommended SM2 curve (sm2p256v1) is supported. Private keys are raw Hex scalars, not passwords or PEM/PKCS#8 files. Public keys must include 04 (uncompressed) or 02/03 (compressed). Maximum message: 64 KiB; User ID: 8191 UTF-8 bytes. Encryption requires a nonempty message. No file processing or key import/export containers.