HomeSM2 Online Encryption/Decryption

SM2 Online Encryption/Decryption

Chinese commercial cryptography standard SM2 algorithm, elliptic curve-based public key encryption, supporting key pair generation, encryption/decryption, multiple ciphertext modes and data formats

SM2 Elliptic Curve Public Key Cryptography

Key Generation

C1=Elliptic Curve Point, C2=Ciphertext Data, C3=SM3 Digest

Encrypt

Decrypt



Documentation

This tool supports SM2 key generation, encryption, and decryption with multiple key/cipher formats, all processed locally in the browser.

Key Features

  • Generate SM2 public/private keys
  • Support C1C3C2 and C1C2C3 cipher modes
  • Input/output formats: Text/Base64/Hex/Spaced Hex/C-style Hex
  • One-click copy for results

Steps

  1. Generate or paste your key pair.
  2. Select cipher mode and formats.
  3. Encrypt with public key and plaintext, decrypt with private key and ciphertext.
  4. Run and copy the output.

Use Cases

  • Frontend demos under Chinese cryptography standards
  • SM2 interoperability testing in enterprise systems
  • Learning and validating national crypto workflows

Notes

  • Use public key for encryption and private key for decryption.
  • Both sides must agree on cipher mode (C1C3C2 or C1C2C3).
  • For production, combine with secure key management and access control.