ARIA Decrypt
KISA Standard ARIA Block Cipher Decryption
Overview
Decrypts ciphertext produced by ARIA Encrypt using the KISA ARIA block cipher (RFC 5794) with a 16-, 24-, or 32-byte key across CBC, GCM, CCM, CTR, ECB, CFB, and OFB modes.
When to Use
- Decrypting and verifying ARIA-128/192/256 ciphertexts.
Parameter Configuration
| Parameter (ID) | Type & Default | Visibility Condition | Description & Options |
|---|---|---|---|
Cipher Modemode |
selectDefault: ECB |
Always visible | Must match the Cipher Mode used during encryption. See Block Cipher Modes for full details. |
Paddingpadding |
selectDefault: None |
Always visible | 16-byte block unpadding scheme applied in ECB and CBC modes. See Padding Schemes for full details.
|
Unify ErrorserrorUnify |
booleanDefault: false |
Always visible | Replaces built-in errors with a custom error code/message when enabled. |
Unified Error CodeerrorUnifyCode |
textDefault: "" (empty) |
When errorUnify is true |
Custom error code when Unify Errors is enabled. |
Unified Error MessageerrorUnifyMessage |
textDefault: "" (empty) |
When errorUnify is true |
Custom error message when Unify Errors is enabled. |
Port I/O Specification
See Ports & Connections for general wiring rules, data type colors, and dynamic port creation.
Input Ports
Port Nature: Fixed Input Ports (6 total; conditionally visible ports depend on parameter settings as shown below).
| Port Name | Port ID | Data Type | Required | Visibility Condition | Description |
|---|---|---|---|---|---|
Key |
key |
Bytes |
Required | Always visible | ARIA secret key: 16, 24, or 32 bytes. |
Ciphertext |
ciphertext |
Bytes |
Required | Always visible | Encrypted byte array (Uint8Array) to decrypt. |
IV |
iv |
Bytes |
Optional | When mode is CBC or CTR or CFB or OFB |
16-byte IV used during encryption in CBC, CTR, CFB, and OFB modes. |
Nonce |
nonce |
Bytes |
Optional | When mode is GCM or CCM |
12-byte AEAD nonce used during encryption in GCM and CCM modes. |
Auth Tag |
tag |
Bytes |
Optional | When mode is GCM or CCM |
Required 16-byte authentication tag to verify in GCM and CCM modes. |
AAD |
aad |
Bytes |
Optional | When mode is GCM or CCM |
Optional Additional Authenticated Data in GCM and CCM modes. |
Output Ports
Port Nature: Fixed Output Ports (1 total).
| Port Name | Port ID | Data Type | Visibility Condition | Description |
|---|---|---|---|---|
Plaintext |
plaintext |
Bytes |
Always visible | Decrypted plaintext byte array (Uint8Array). |
Error Cases
When any of the following conditions occurs at runtime, this node transitions to an ERROR state and downstream nodes connected to its outputs do not execute. Enabling Unify Errors (errorUnify) replaces all error codes below with your configured unified error code and message.
| Error Code | Default Engine Message | Trigger Condition |
|---|---|---|
INVALID_KEY_LENGTH |
Invalid key length | Raised when Key is not 16, 24, or 32 bytes. |
INVALID_IV_LENGTH |
Invalid IV length | Raised when a connected IV is not 16 bytes or Nonce is not 12 bytes. |
CIPHERTEXT_NOT_BLOCK_ALIGNED |
Ciphertext length is not a multiple of the block size | Raised in ECB/CBC mode when Ciphertext length is not a positive multiple of 16 bytes. |
INVALID_PADDING |
Invalid padding | Raised when the decrypted or input block's trailing bytes violate the structure of the selected padding standard. |
INVALID_NONCE_LENGTH |
Invalid nonce length | Raised when a connected AEAD or stream-cipher Nonce is not 12 bytes (96 bits). |
INVALID_TAG_LENGTH |
Invalid authentication tag length | Raised when the connected AEAD Auth Tag is not 16 bytes (128 bits). |
AUTH_TAG_MISMATCH |
Authentication tag mismatch | Raised in GCM/CCM mode when authentication tag verification fails. |
Examples
Decrypting ARIA-256-GCM Ciphertext
Verify the tag and recover the plaintext from ARIA-GCM.
- Set Cipher Mode to
GCMand connect the matching 32-byteKey, 12-byteNonce,Ciphertext, andAuth Tag.