Cryptography & Ciphers
SM4 Decryption
Apply SM4 Decrypt with explicit key, format, and algorithm settings. Enter the data and key material, choose the parameters, then review the result.
This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.
SM4 Decryption uses SM4 block decryption to process the supplied input. It recovers plaintext from the matching ciphertext and settings. The mode list includes CBC/NoPadding and ECB/NoPadding, rather than a separate Padding control.
It recovers plaintext from the matching ciphertext and settings. The mode list includes CBC/NoPadding and ECB/NoPadding, rather than a separate Padding control. Processing runs in the browser for this catalog category, so the result depends on the supplied bytes and settings. Processing runs in the browser.
This tool performs the selected algorithm locally; it does not provide application trust or key management.
Instructions
- Provide text or data for this tool.
- Copy the complete output of the paired encrypt operation, not its displayed plaintext. This applies to SM4 Decryption.
- Match key, IV, mode, and padding before expecting abc. This applies to SM4 Decryption.
Example
Input: First encrypt ASCII abc with SM4, CBC, key 000102030405060708090a0b0c0d0e0f, and an all-zero 16-byte IV. Paste that Hex ciphertext here.
Settings: SM4 Decryption: Key length: 16 bytes. Non-ECB IV length: 16 bytes. CBC and ECB apply padding unless their /NoPadding variants are selected. Input: Hex; Output: Raw for the paired text fixture.
Result: It recovers plaintext from the matching ciphertext and settings. The mode list includes CBC/NoPadding and ECB/NoPadding, rather than a separate Padding control. Processing runs in the browser for this catalog category, so the result depends on the supplied bytes and settings.
Limits
- SM4 Decryption: 16-byte blocks determine alignment requirements when padding is disabled.
- SM4 Decryption: Readable plaintext does not prove that ciphertext is authentic.