Decrypt
AI-generatedOverview
This node performs PGP decryption on input data, supporting both text and binary input types. It can decrypt messages encrypted with a PGP public key using the corresponding private key. The node also supports decompression of binary data if a compression algorithm was applied during encryption. It is useful in scenarios where secure communication is required, such as decrypting confidential emails, files, or messages encrypted with PGP. For example, it can decrypt a PGP-encrypted email body or a PGP-encrypted file received from a secure source.
Use Case Examples
- Decrypting a PGP-encrypted text message to reveal the original plaintext.
- Decrypting a PGP-encrypted binary file, optionally decompressing it if compressed during encryption.
Properties
| Name | Meaning |
|---|---|
| Input Type | Specifies whether the input data to decrypt is plain text or binary data. |
| Compression Algorithm | Specifies the compression algorithm used on the binary data before encryption, to be applied in reverse during decryption. |
| Message | The encrypted message text to decrypt (used when input type is text). |
| Binary Property Name | The name of the binary property that contains the encrypted data to decrypt (used when input type is binary). |
Output
JSON
decrypted- The decrypted message text (for text input) or an object containing the decrypted binary data (for binary input).
Dependencies
- An API key credential for PGP keys (private and public keys) is required.
- Uses the openpgp library for cryptographic operations.
Troubleshooting
- Error 'private key is not valid' indicates the provided private key credential is invalid or malformed.
- Error 'public key is not valid' indicates the provided public key credential is invalid or malformed.
- Error 'Message could not be decrypted' means the decryption failed, possibly due to incorrect keys or corrupted data.
- Error 'Message could not be uncompressed. Please check your compression algorithm.' means the decompression step failed, likely due to a mismatch in the compression algorithm setting.
- If binary input is selected but the specified binary property is missing, an error will be thrown.
Links
- OpenPGP.js - The cryptographic library used for PGP operations in this node.