NodeCrypto Help

TDES Decrypt

Category: Symmetric Ciphers ยท Node Type ID: symmetric-tdes-decrypt

Triple-DES (112 or 168-bit Key) Decryption

Overview

Decrypts ciphertext produced by TDES (3DES) Encrypt using 2-Key (16-byte) or 3-Key (24-byte) Triple-DES in CBC, ECB, CTR, CFB, or OFB mode over 8-byte blocks.

When to Use

Parameter Configuration

Parameter (ID)Type & DefaultVisibility ConditionDescription & Options
Cipher Mode
mode
select
Default: ECB
Always visible Must match the Cipher Mode used during encryption (CBC, ECB, CTR, CFB, or OFB). See Block Cipher Modes for full details.
  • ECB: ECB (Electronic Codebook)
  • CBC: CBC (Cipher Block Chaining)
Padding
padding
select
Default: None
Always visible 8-byte block unpadding scheme applied after decryption 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 single 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 (3 total; conditionally visible ports depend on parameter settings as shown below).

Port NamePort IDData TypeRequiredVisibility ConditionDescription
Key key Bytes (16/24B) Required Always visible TDES key: 16 bytes (2-key) or 24 bytes (3-key).
Ciphertext ciphertext Bytes Required Always visible Encrypted byte array (Uint8Array) to decrypt.
IV iv Bytes (8B) Optional When mode is CBC 8-byte initialization vector used during encryption (hidden in ECB mode; defaults to 8 zero bytes if unconnected).

Output Ports

Port Nature: Fixed Output Ports (1 total).

Port NamePort IDData TypeVisibility ConditionDescription
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 CodeDefault Engine MessageTrigger Condition
INVALID_KEY_LENGTH Invalid key length Raised when Key is neither 16 bytes nor 24 bytes.
CIPHERTEXT_NOT_BLOCK_ALIGNED Ciphertext length is not a multiple of the block size Raised in ECB or CBC mode when Ciphertext length is not a positive multiple of 8 bytes.
INVALID_PADDING Invalid padding Raised when the decrypted or input block's trailing bytes violate the structure of the selected padding standard.

Examples

Decrypting a 3DES-CBC Payload

Recover plaintext from a 3DES-CBC ciphertext.

  1. Connect the 16- or 24-byte Key, 8-byte IV, and Ciphertext to TDES (3DES) Decrypt with matching Cipher Mode and Padding.