DES icon

DES

Use DES to encrypt or decrypt data

Overview

This node performs DES (Data Encryption Standard) encryption and decryption on input text data. It supports multiple cipher modes and padding schemes, allowing users to customize the cryptographic process according to their needs.

Common scenarios for this node include:

  • Decrypting sensitive data that was encrypted using DES with a known key.
  • Encrypting plaintext data before storing or transmitting it securely.
  • Integrating legacy systems that use DES encryption into automated workflows.

For example, a user might decrypt a Base64-encoded ciphertext received from an external system or encrypt a string message to be sent securely over a network.

Properties

Name Meaning
Mode The DES cipher mode to use. Options: CBC, CFB, CTR, ECB, OFB
Padding The padding scheme applied during encryption/decryption. Options: AnsiX923, Iso10126, Iso97971, NoPadding, Pkcs7, ZeroPadding
Encoding The encoding format of the input/output text. Options: Base64, Hex
Type The type of input data. Currently only "String" is supported
Text The actual text to encrypt or decrypt, interpreted as a string

Output

The output JSON contains either an encrypted or decrypted field depending on the operation selected:

  • For Decrypt operation:

    {
      "decrypted": "<plaintext string>"
    }
    

    This field holds the decrypted UTF-8 string result of the input ciphertext.

  • For Encrypt operation:

    {
      "encrypted": "<ciphertext string>"
    }
    

    This field contains the encrypted string encoded in the chosen format (Base64 or Hex).

No binary data output is produced by this node; all outputs are strings.

Dependencies

  • Uses the crypto-js library internally for DES encryption and decryption.
  • Requires a DES key credential containing a key string at least 32 characters long (used as two 16-character parts for key and IV).
  • No additional environment variables or external API services are required.

Troubleshooting

  • Invalid key length or format: The DES key must be provided and correctly formatted. If the key is too short or missing, the node will fail.
  • Incorrect encoding or mode: Using the wrong encoding or cipher mode incompatible with the input data can cause decryption errors or garbled output.
  • Padding mismatch: Selecting a padding scheme different from what was used during encryption may lead to incorrect decryption results or errors.
  • Error messages: Errors thrown typically relate to invalid input parameters or cryptographic failures. Enabling "Continue On Fail" allows processing subsequent items even if one fails.

To resolve issues:

  • Verify the DES key is correct and complete.
  • Confirm the cipher mode, padding, and encoding match those used when the data was originally encrypted.
  • Test with known plaintext-ciphertext pairs to validate settings.

Links and References

Discussion