![pgp icon](/docs/img/components/icons/60/cGdw.png)

# Pretty Good Privacy Connector

key: pgp[OpenPGP Standard](https://www.openpgp.org/about/standard/)[OpenPGP.js Documentation](https://docs.openpgpjs.org/)[Connector Changelog](#changelog)

## Description[​](#description "Direct link to Description")

[Pretty Good Privacy](https://project.microsoft.com/en-US/) is an encryption program that provides cryptographic privacy and authentication for data communication. This component allows you to encrypt and decrypt strings in an integration.

You can elect to encrypt or decrypt strings using either a password or a public/private key pair. RSA key pairs of any key size are compatible with these actions.

## Actions[​](#actions "Direct link to Actions")

### Decrypt File[​](#decryptfile "Direct link to Decrypt File")

Decrypt a file with a password or PGP private key and passphrase | **key: decryptFile**

| Input                  | Notes                                                                                                                                          | Example                                                                             |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| File to Decrypt        | This should be a reference to a previous step that returns binary data.                                                                        |                                                                                     |
| Private Key Passphrase | Provide a string passphrase for your private key if you are using a private key to decrypt the message.                                        |                                                                                     |
| Password               | Provide a string password to encrypt the message. You can elect to encrypt the message with a password or public PGP key, but not both.        | P\@s$w0Rd                                                                           |
| Private Key            | Provide a string PGP pviate key to decrypt the message. You can elect to decrypt the message with a password or private PGP key, but not both. | -----BEGIN PGP PRIVATE KEY BLOCK----- EXAMPLE== -----END PGP PRIVATE KEY BLOCK----- |

Example Payload for <!-- -->Decrypt File[⤓](https://prismatic.io/docs/example-payloads/pgp/actions/decryptFile.json "Download example payload")

Loading…

***

### Decrypt Message[​](#decryptstring "Direct link to Decrypt Message")

Decrypt a string message with a password or PGP private key and passphrase | **key: decryptString**

| Input                  | Notes                                                                                                                                          | Example                                                                             |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| Encrypted Message      | The message to be decrypted.                                                                                                                   | -----BEGIN PGP MESSAGE----- EXAMPLE== -----END PGP MESSAGE-----                     |
| Private Key Passphrase | Provide a string passphrase for your private key if you are using a private key to decrypt the message.                                        |                                                                                     |
| Password               | Provide a string password to encrypt the message. You can elect to encrypt the message with a password or public PGP key, but not both.        | P\@s$w0Rd                                                                           |
| Private Key            | Provide a string PGP pviate key to decrypt the message. You can elect to decrypt the message with a password or private PGP key, but not both. | -----BEGIN PGP PRIVATE KEY BLOCK----- EXAMPLE== -----END PGP PRIVATE KEY BLOCK----- |

Example Payload for <!-- -->Decrypt Message[⤓](https://prismatic.io/docs/example-payloads/pgp/actions/decryptString.json "Download example payload")

Loading…

***

### Encrypt File[​](#encryptfile "Direct link to Encrypt File")

Encrypt a file with a password or PGP public key | **key: encryptFile**

| Input           | Notes                                                                                                                                         | Example                                                                           |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Filename        | The name of the file to encrypt                                                                                                               | example.txt                                                                       |
| File to Encrypt | This should be a reference to a previous step that returns binary data.                                                                       |                                                                                   |
| Password        | Provide a string password to encrypt the message. You can elect to encrypt the message with a password or public PGP key, but not both.       | P\@s$w0Rd                                                                         |
| Public Key      | Provide a string PGP public key to encrypt the message. You can elect to encrypt the message with a password or public PGP key, but not both. | -----BEGIN PGP PUBLIC KEY BLOCK----- EXAMPLE== -----END PGP PUBLIC KEY BLOCK----- |

Example Payload for <!-- -->Encrypt File[⤓](https://prismatic.io/docs/example-payloads/pgp/actions/encryptFile.json "Download example payload")

Loading…

***

### Encrypt Message[​](#encryptstring "Direct link to Encrypt Message")

Encrypt a string message with a password or PGP public key | **key: encryptString**

| Input              | Notes                                                                                                                                         | Example                                                                           |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Message to Encrypt | The message to be encrypted.                                                                                                                  |                                                                                   |
| Password           | Provide a string password to encrypt the message. You can elect to encrypt the message with a password or public PGP key, but not both.       | P\@s$w0Rd                                                                         |
| Public Key         | Provide a string PGP public key to encrypt the message. You can elect to encrypt the message with a password or public PGP key, but not both. | -----BEGIN PGP PUBLIC KEY BLOCK----- EXAMPLE== -----END PGP PUBLIC KEY BLOCK----- |

Example Payload for <!-- -->Encrypt Message[⤓](https://prismatic.io/docs/example-payloads/pgp/actions/encryptString.json "Download example payload")

Loading…

***

## Changelog[​](#changelog "Direct link to Changelog")

### 2026-09-02[​](#2026-09-02 "Direct link to 2026-09-02")

Fixed an issue that terminated the runner (EC:102) instead of failing the step when a malformed or unparseable PGP key was supplied to the **Encrypt Message**, **Encrypt File**, **Decrypt Message**, or **Decrypt File** actions; these now fail the step with a clear key-parsing error
