AnyNPC

SM4 Encryption — Chinese National Standard Symmetric Encryption

Free SM4 encryption tool for key generation, encryption, and decryption. SM4 is the Chinese national standard for symmetric block cipher (GM/T 0002). Supports ECB and CBC modes. All operations performed locally in your browser.

Features

  • Generate SM4 keys (128-bit)
  • Encrypt data with SM4
  • Decrypt ciphertext with SM4
  • Support ECB and CBC modes
  • Auto-generate initialization vector (IV)
  • Chinese national standard GM/T 0002
  • Fast symmetric encryption
  • Suitable for large data encryption
  • Hex key input/output
  • All operations performed locally in browser

How to Use

  1. 1Key Generation: Click 'Generate Key' to create a random 128-bit SM4 key.
  2. 2Encryption: Enter plaintext, key, select mode (ECB/CBC), and click 'Encrypt'.
  3. 3Decryption: Enter ciphertext, key, select mode, and click 'Decrypt'.
  4. 4CBC Mode: Requires an initialization vector (IV). Click 'Generate IV' to create one.

Frequently Asked Questions

Related Tools