NodeCrypto Help

ARIA Encrypt

Category: Symmetric Ciphers ยท Node Type ID: symmetric-aria-encrypt

KISA Standard ARIA (128/192/256-bit) Block Cipher (RFC 5794)

Overview

Encrypts data using the Korean national standard 128-bit involution SPN block cipher ARIA (KS X 1213 / ISO/IEC 18033-3 / RFC 5794). The key size (128-bit / 12 rounds, 192-bit / 14 rounds, or 256-bit / 16 rounds) is selected automatically from the byte length (16, 24, or 32 bytes) of the connected Key.

Supports CBC, GCM, CCM, CTR, ECB, CFB, and OFB modes over 16-byte blocks.

When to Use

Parameter Configuration

Parameter (ID)Type & DefaultVisibility ConditionDescription & Options
Cipher Mode
mode
select
Default: ECB
Always visible Selects the operating mode (CBC, GCM, CCM, CTR, ECB, CFB, or OFB). See Block Cipher Modes for full details.
  • ECB: ECB (Electronic Codebook)
  • CBC: CBC (Cipher Block Chaining)
  • GCM: GCM (AEAD)
  • CCM: CCM (AEAD)
  • CTR: CTR (Counter Mode)
  • CFB: CFB (Cipher Feedback)
  • OFB: OFB (Output Feedback)
Padding
padding
select
Default: None
Always visible 16-byte block padding scheme applied in ECB and CBC modes. See Padding Schemes for full details.
Unify Errors
errorUnify
boolean
Default: false
Supports Variable Reference ($var: bool)
Always visible Replaces built-in errors with a custom error code/message when enabled.
Unified Error Code
errorUnifyCode
text
Default: "" (empty)
Supports Variable Reference ($var: string)
When errorUnify is true Custom error code when Unify Errors is enabled.
Unified Error Message
errorUnifyMessage
text
Default: "" (empty)
Supports Variable Reference ($var: string)
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 (5 total; conditionally visible ports depend on parameter settings as shown below).

Port NamePort IDData TypeRequiredVisibility ConditionDescription
Key key Bytes (16/24/32B) Required Always visible ARIA secret key: 16 bytes (ARIA-128), 24 bytes (ARIA-192), or 32 bytes (ARIA-256).
Plaintext plaintext Bytes Required Always visible Plaintext bytes (Uint8Array) to encrypt.
IV iv Bytes (16B) Optional When mode is CBC or CTR or CFB or OFB 16-byte IV for CBC, CTR, CFB, and OFB modes (defaults to 16 zero bytes if unconnected).
Nonce nonce Bytes (12B) Optional When mode is GCM or CCM 12-byte AEAD nonce for GCM and CCM modes (defaults to 12 zero bytes if unconnected).
AAD aad Bytes (GCM/CCM) Optional When mode is GCM or CCM Optional Additional Authenticated Data for GCM and CCM modes.

Output Ports

Port Nature: Fixed Output Ports (2 total; conditionally visible ports depend on parameter settings as shown below).

Port NamePort IDData TypeVisibility ConditionDescription
Ciphertext ciphertext Bytes Always visible Encrypted output bytes (Uint8Array).
Auth Tag tag Bytes (GCM/CCM) When mode is GCM or CCM 16-byte authentication tag produced in GCM and CCM modes.

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 CodeDefault Engine MessageTrigger 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.
PLAINTEXT_NOT_BLOCK_ALIGNED In NoPad mode the plaintext length must be a multiple of the block size Raised in ECB/CBC mode when Padding = None and Plaintext length is not a multiple of 16 bytes.
INVALID_NONCE_LENGTH Invalid nonce length Raised when a connected AEAD or stream-cipher Nonce is not 12 bytes (96 bits).

Examples

Encrypting with ARIA-256-GCM

Perform authenticated encryption using a 32-byte ARIA key.

  1. Set Cipher Mode to GCM.
  2. Connect a 32-byte key to Key, a 12-byte nonce to Nonce, and your payload to Plaintext.