Overview
This node provides OpenPGP encryption, decryption, signing, and verification functionalities for both text and binary data. It is useful in scenarios where secure message exchange or file protection is required, such as encrypting sensitive emails, signing documents to verify authenticity, or decrypting received encrypted files.
Practical examples:
- Encrypt a plain text message before sending it over an insecure channel.
- Sign a binary file to ensure its integrity and origin.
- Decrypt an encrypted attachment received from a trusted source.
- Verify the signature of a decrypted message to confirm it was not tampered with.
Properties
Name | Meaning |
---|---|
Input Type | Choose the type of input parameter: Text or Binary |
Message | The message text to process (only shown if Input Type is Text) |
Binary Property Name | Name of the binary property to process (only shown if Input Type is Binary) |
Additional properties related to operation and compression are present in the full node but omitted here since only the default resource and operation were requested.
Output
The output structure depends on the operation and input type:
- For text input:
json
contains fields like:encrypted
: The encrypted text result.decrypted
: The decrypted text result.signature
: The generated signature string.verified
: Boolean indicating if signature verification succeeded.
- For binary input:
binary
contains processed binary data with properties such as:message
: The encrypted binary data with MIME typeapplication/pgp-encrypted
.decrypted
: The decrypted binary data with MIME typeapplication/octet-stream
.signature
: The signature binary data with MIME typeapplication/pgp-signature
and.sig
extension.
json
may contain verification results (verified
boolean).
Binary data is base64 encoded when stored in the output.
Dependencies
- Requires an API key credential containing PGP private and public keys, optionally with a passphrase.
- Uses the OpenPGP.js library for cryptographic operations.
- Supports optional compression algorithms (uncompressed, zip, zlib) for binary data.
- No external service calls; all cryptographic processing is local within the node.
Troubleshooting
- Invalid Private/Public Key: Errors thrown if the provided armored keys are invalid or improperly formatted. Ensure keys are correctly pasted and valid.
- Message Could Not Be Decrypted: Occurs if decryption fails due to wrong keys or corrupted data.
- Message Could Not Be Uncompressed: Happens if the compression algorithm does not match the one used during encryption.
- Missing Binary Data: If binary input is selected but the specified binary property is missing, an error will be raised.
- To resolve errors, verify keys, input data correctness, and matching compression settings.