# SM4 Decrypt

SM4 is a 128-bit block cipher, currently established as a national standard (GB/T 32907-2016) of China. SM4 Decrypt lives in the **Cryptography** category of the `fx` menu.

## Parameters

| Parameter | Type   | Required | Default | Description                                                                         |
| --------- | ------ | -------- | ------- | ----------------------------------------------------------------------------------- |
| Input     | string | yes      | —       | Value to transform. Previous step output or a literal.                              |
| Key       | string | no       | —       | Argument value for this operation.                                                  |
| IV        | string | no       | —       | Argument value for this operation.                                                  |
| Mode      | string | no       | `CBC`   | Choose one of: `CBC`, `CFB`, `OFB`, `CTR`, `ECB`, `CBC/NoPadding`, `ECB/NoPadding`. |
| Input     | string | no       | `Raw`   | Choose one of: `Raw`, `Hex`.                                                        |
| Output    | string | no       | `Hex`   | Choose one of: `Hex`, `Raw`.                                                        |

`Input` is the primary value (previous step output or a literal).

## Returned value

| Type     | Description                               |
| -------- | ----------------------------------------- |
| `string` | Result of the SM4 Decrypt transformation. |

## Limitations

- Wrong key, algorithm options, or malformed input typically raises an evaluation error — fix Input or options before re-running.

## Example

<details>
<summary>Run SM4 Decrypt</summary>

SM4 is a 128-bit block cipher, currently established as a national standard (GB/T 32907-2016) of China. Adjust optional parameters when the defaults do not match your payload.

1. Set **Input** to the value to transform (previous step output or a literal).

2. Review **Key**, **IV**, **Mode**, **Input**, **Output** and keep defaults unless your format requires otherwise.

3. Confirm **Output value** shows the transformed result.

</details>
