This is an n8n community node. It lets you use OpenPGP encryption and signing in your n8n workflows.
OpenPGP is a standard for encryption and signing of data.
n8n is a fair-code licensed workflow automation platform.
Follow the installation guide in the n8n community nodes documentation.
- Encrypt: Encrypts text or binary files using a public key. Binary files can be compressed before encryption.
- Decrypt: Decrypts text or binary files using a private key. Compressed files are automatically decompressed after decryption.
- Sign: Creates a digital signature for text or binary files using a private key.
- Verify: Checks if a digital signature is valid for text or binary files using a public key.
- Encrypt-And-Sign: Encrypts and signs text or binary files in one step. Binary files can be compressed before encryption.
- Decrypt-And-Verify: Decrypts and verifies text or binary files in one step. Compressed files can be decompressed after decryption.
To authenticate with this node, you need to provide the following credentials:
- Passphrase: The passphrase for the private key.
- Public Key: Armored public key for encryption and verification.
- Private Key: Armored private key for decryption and signing.
This section displays the results of unit tests for each operation, based on a live n8n instance.
Operation | Last Tested | Status |
---|---|---|
Encrypt (Text) | 2024-12-29 | ✅ Success |
Decrypt (Text) | 2024-12-29 | ✅ Success |
Sign (Text) | 2024-12-29 | ✅ Success |
Verify (Text) | 2024-12-29 | ✅ Success |
Encrypt (Binary) | 2024-12-29 | ✅ Success |
Decrypt (Binary) | 2024-12-29 | ✅ Success |
Sign (Binary) | 2024-12-29 | ✅ Success |
Verify (Binary) | 2024-12-29 | ✅ Success |
Unit tests can be executed with the following command:
npx jest
binary-utils.test.ts
- Convert text data to base64 string
- Convert base64 string back to text data
- Convert binary data to base64 string
- Convert base64 string back to binary data
sign.test.ts
- Signs and verifies text message
- Signs and verifies text message with encrypted private key
- Verify fails with a different keypair
- Signs binary data
- Verify fails with a different keypair
data-compressor.ts
- Compresses and decompresses with zlib
- Compresses and decompresses with zip
- Throws an error for unsupported algorithm during compression
- Throws an error for unsupported algorithm during decompression
encrypt.test.ts
- Encrypts and decrypts a text message
- Encrypts and decrypts a text message with encrypted private key
- Decryption fails with a different private key
- Encrypts and decrypts a binary file
- Binary decryption fails with a dirrent private key
- Encryps and decrypts a compresses binary file
- Statements: 100%
- Branches: 100%
- Functions: 100%
- Lines: 100%