PGP icon

PGP

PGP Node

Overview

This node performs PGP (Pretty Good Privacy) operations including encryption, decryption, signing, and verification of messages or binary data. It supports text and binary input types, with optional compression for binary data. The node can encrypt messages, sign them, decrypt encrypted messages, and verify signatures, either separately or combined (encrypt-and-sign, decrypt-and-verify). It is useful for secure communication workflows where data confidentiality and authenticity are required, such as sending encrypted emails, securing files, or verifying message integrity.

Use Case Examples

  1. Encrypt a text message using a recipient's public key to ensure only they can read it.
  2. Sign a binary file to provide proof of authorship and integrity.
  3. Encrypt and sign a message to both secure and authenticate it in one step.
  4. Decrypt an encrypted file and verify its signature to confirm it hasn't been tampered with.

Properties

Name Meaning
Input Type Specifies whether the input data is text or binary, affecting how the node processes the message.
Compression Algorithm Selects the compression method (uncompressed, zip, zlib) applied to binary data during encryption or decryption.
Message The text message to be encrypted, decrypted, signed, or verified (used when input type is text).
Binary Property Name The name of the binary property in the input data to process (used when input type is binary).
Embed Signature Determines whether the signature is embedded within the encrypted message (applicable for encrypt-and-sign operation).

Output

Binary

Outputs encrypted or decrypted binary data with appropriate MIME types and file names when processing binary input.

JSON

  • encrypted - Contains the encrypted text message or base64-encoded encrypted binary data.
  • signature - Contains the signature string or base64-encoded signature binary data when signing separately.
  • decrypted - Contains the decrypted text message or base64-encoded decrypted binary data.
  • verified - Boolean indicating whether the signature verification was successful.

Dependencies

  • Requires PGP keys: a private key for signing and decrypting, and a public key for encrypting and verifying.

Troubleshooting

  • Ensure the correct keys (private/public) are provided for the selected operation; missing keys cause errors.
  • Verify that the private key passphrase is correct if the private key is encrypted.
  • Check that the binary property names match the input data structure when using binary input.
  • If using compression, ensure the selected compression algorithm matches the data; decompression errors indicate mismatches.
  • Common error messages include 'Private key is required', 'Public key is required', 'Message could not be decrypted', and 'Message could not be uncompressed'. These indicate missing keys, invalid keys, incorrect passphrases, or data corruption.

Discussion