Overview
The node provides universal cryptographic operations including encryption, decryption, hashing, HMAC generation, key derivation, and encoding/decoding in Base64 or Hex formats. Specifically for the Decrypt operation, it decrypts input data using various symmetric encryption algorithms such as AES (in different key sizes and modes), ChaCha20-Poly1305, and Triple DES.
This node is beneficial when you need to securely handle encrypted data within an automation workflow, for example:
- Decrypting sensitive information received from external systems.
- Processing encrypted payloads before further transformation or storage.
- Integrating with services that require cryptographic operations without custom coding.
Practical example: You receive a Base64-encoded string encrypted with AES-256-CBC and want to decrypt it using a password-derived key to obtain the original plaintext.
Properties
| Name | Meaning |
|---|---|
| Algorithm | The encryption algorithm used for decryption. Options: AES-128-CBC, AES-192-CBC, AES-256-CBC, AES-256-GCM, ChaCha20-Poly1305, DES-EDE3-CBC |
| Key | The secret key or password used for decryption. |
| Input Data | The encrypted data to be decrypted. |
| Key Processing | How to process the key before use: Use as-Is (raw), SHA256 Hash, or PBKDF2 Derive |
| Input Format | Format of the input encrypted data: UTF-8 String, Base64, or Hex |
| Output Format | Format of the decrypted output: Base64, Hex, UTF-8 String, or JSON (auto-parsed if valid JSON) |
Output
The node outputs a JSON object with the following fields:
operation: The performed operation, here always"decrypt".result: The decrypted data formatted according to the selected output format. If "JSON (Auto-Parse)" is selected and the decrypted data is valid JSON, it returns the parsed JSON object; otherwise, it returns a UTF-8 string.success: Boolean indicating whether the decryption succeeded (true).inputLength: Length of the input encrypted data string.
No binary output is produced; all results are returned as strings or JSON objects depending on the output format.
Dependencies
- Uses Node.js built-in
cryptomodule for cryptographic functions. - No external API keys or services are required.
- No special environment variables needed.
- All cryptographic processing is local within the node.
Troubleshooting
Invalid encrypted data: too short for IV
This error occurs if the input data length is less than the expected initialization vector (IV) length for the chosen algorithm. Ensure the input data includes the IV prefix or provide the correct encrypted data.Decryption failed: [error message]
Common causes include incorrect key, wrong key processing method, mismatched algorithm, or corrupted input data. Verify that the key and algorithm match those used during encryption and that the input format is correctly specified.Unknown input format
Occurs if the input format parameter is set incorrectly. Choose among UTF-8, Base64, or Hex matching the actual input data encoding.Unknown key processing method
Happens if an unsupported key processing option is selected. Use one of the supported methods: raw, sha256, or pbkdf2.When using PBKDF2 key processing, ensure the salt and iteration count used during encryption are consistent or default values are acceptable.
Links and References
- Node.js Crypto Module Documentation: https://nodejs.org/api/crypto.html
- AES Encryption Modes Explained: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation
- PBKDF2 Key Derivation Function: https://en.wikipedia.org/wiki/PBKDF2
- ChaCha20-Poly1305 Authenticated Encryption: https://en.wikipedia.org/wiki/ChaCha20-Poly1305