Overview
This node provides PGP (Pretty Good Privacy) cryptographic operations to secure data by encrypting, decrypting, signing, and verifying messages or binary files. It supports both text and binary inputs, allowing users to handle plain messages or files securely within their workflows.
Common scenarios include:
- Encrypting sensitive text or files before sending them over insecure channels.
- Signing messages or files to ensure authenticity and integrity.
- Decrypting received encrypted content.
- Verifying signatures on received messages or files to confirm the sender's identity.
Practical examples:
- Encrypt a confidential email message as text before sending.
- Sign a document file in binary form to prove authorship.
- Decrypt an encrypted attachment received from a partner.
- Verify the signature of a downloaded software package.
Properties
Name | Meaning |
---|---|
Input Type | Choose whether the input is "Text" or "Binary". |
Message | The plaintext message to process (used only if Input Type is "Text"). |
Binary Property Name | The name of the binary property containing the file data to process (used only if Input Type is "Binary"). |
Output
The output depends on the operation and input type:
For text input:
json
contains fields such as:encrypted
: The encrypted message string.decrypted
: The decrypted message string.signature
: The generated signature string.verified
: A boolean indicating if verification succeeded.
For binary input:
binary
contains processed files with properties:message
: The encrypted binary data with MIME typeapplication/pgp-encrypted
and filename ending with.pgp
.signature
: The signature file with MIME typeapplication/pgp-signature
, extension.sig
.decrypted
: The decrypted binary data with MIME typeapplication/octet-stream
.
json
may also contain verification results (verified
boolean).
Binary outputs are base64 encoded strings representing the PGP encrypted or signed data.
Dependencies
- Requires an API key credential providing:
- A private PGP key (optionally protected by a passphrase).
- A public PGP key.
- Uses the OpenPGP.js library for cryptographic operations.
- Supports optional compression algorithms (uncompressed, zip, zlib) for binary data.
- No additional external services are required beyond the provided keys.
Troubleshooting
- Invalid Private/Public Key: Errors occur if the provided armored keys are invalid or improperly formatted. Ensure keys are correctly pasted and valid.
- Missing Binary Data: If binary input is selected but the specified binary property is missing, an error will be thrown.
- Decryption Failure: If decryption fails, verify that the correct private key and passphrase are used and that the message was properly encrypted.
- Uncompression Error: When using compression, uncompression errors indicate a mismatch between the compression algorithm used during encryption and the one selected during decryption.
- Signature Verification Fails: This indicates either the signature or the public key does not match the message. Confirm the correct keys and signatures are used.
To resolve errors, check credentials, input data correctness, and parameter settings carefully.