SYSEC WebTools

SM4 Encryption

GCM: 12 bytes; CBC: 16 bytes. Never reuse a nonce with the same key. Decryption requires the original IV.

Switching between encrypt and decrypt swaps the input and output encodings, keeping the key, IV, tag, and AAD unchanged.

Keys, plaintext, and results are processed in a local Worker, never uploaded or saved. This developer testing tool is not a certified cryptographic product or a replacement for production key management.

How to use

Generate or enter a 16-byte key, choose an input encoding, and encrypt. Keep the key, IV, ciphertext, and GCM tag. To decrypt, supply these parameters and the same AAD. Input is limited to 1 MiB; file encryption is not supported.