Acquia Support engineers sometimes need to send you files that contain sensitive information, such as log archives, database exports, or reports. To protect those files in transit and at rest, the engineer can encrypt them with your PGP public key. Only you can open them, because only you hold the matching private key.
This page explains how to create a PGP key pair, export the public key, and share it with Acquia Support in a Support case. It also covers how to decrypt files after you receive them.
How PGP keys work
A PGP key pair has two parts:
- Public key: You share this with Acquia Support. The engineer uses it to encrypt files for you. A public key cannot decrypt anything.
- Private key: You keep this to yourself. You use it, together with your passphrase, to decrypt files that were encrypted with your public key. Keep this key secure, treat it like any other secret. This key should never leave your laptop.
Never send your private key to Acquia Support, in a case or anywhere else. Acquia Support only ever needs your public key.
Before you begin
You need the following:
- A computer where you can install and run GnuPG (also called GPG), the free, open source implementation of OpenPGP.
- The email address you use in the Support case. The key is tied to this address.
- A strong passphrase, stored in a password manager. If you lose the passphrase or the private key, you cannot decrypt files encrypted for that key, and you will need to create a new key pair.
- Access to the Support case where the engineer asked for your key, or permission to open a new case.
Install GnuPG if it is not already on your computer:
Create a key pair with the command line
These steps work on macOS, Linux, and Windows (in a Gpg4win command prompt). Prompts and menu numbers vary slightly between GnuPG versions, so choose options by their labels.
- Confirm that GnuPG is installed by running:
gpg --version
The output should show version 2.1.17 or later. - Start the key generation:
gpg --full-generate-key - At the key type prompt, choose ECC (sign and encrypt). This is the default in current versions.
- At the curve prompt, choose Curve 25519. If you need maximum compatibility with older tools, choose RSA and RSA with a key size of 4096 bits instead.
- At the validity prompt, enter 1y for a key that expires after one year. Expiration limits the damage if the key is ever lost, and you can extend it later. Confirm when GnuPG asks. Choose a validity which aligns with the security policies for your organisation.
- Enter your real name and the email address you use with Acquia Support. The comment field is optional and can stay empty.
- Type "O" to confirm the details, then enter a strong passphrase when prompted.
GnuPG creates the key pair and stores it in your local keyring.
Create a key pair with Kleopatra on Windows
If you prefer a graphical tool, use Kleopatra, which is installed with Gpg4win. Menu labels vary slightly between versions.
- Open Kleopatra and select File, then New Key Pair.
- Select Create a personal OpenPGP key pair.
- Enter your name and the email address you use with Acquia Support.
- Select Advanced Settings. Under Key Material, choose ECC with ed25519 (or RSA with 4096 bits for older tools). Under Valid until, set an expiration date which aligns with the security policies for your organisation.
- Select Create, then enter a strong passphrase when prompted.
Export your public key
Export the public key to a file that you can attach to your Support case.
Command line
- Export the key, replacing the email address with the one you used when you created the key:
gpg --armor --export [email protected] > acquia-support-public-key.asc - Open the file in a text editor. The first line must read -----BEGIN PGP PUBLIC KEY BLOCK-----. If it says PRIVATE KEY instead, delete the file and do not share it. You exported the wrong key.
Kleopatra
- Right-click your key in the certificate list and select Export.
- Save the file with the .asc extension.
Find your key fingerprint
The fingerprint is a short string that uniquely identifies your key. Sharing it lets the Support engineer confirm that the key they imported is the one you intended to send.
gpg --fingerprint [email protected]
In Kleopatra, double-click the key and read the fingerprint on the Details tab.
Share your public key with Acquia Support
- Open the Support case where the engineer asked for your key. If you do not have a case yet, open a new one and say that you want to receive encrypted files.
- Attach the .asc file to the case. You can also paste the full text of the public key into the case comment, from the BEGIN line through the END line.
- Add the key fingerprint to the same comment.
- Tell the engineer which files you expect to receive, if you know.
The engineer imports your public key, encrypts the files, and attaches them to the case or shares them using the method agreed in the case. Encrypted files usually have a .gpg, .pgp, or .asc extension.
Decrypt files from Acquia Support
Download the encrypted file to the computer that holds your private key, then decrypt it.
Command line
gpg --output decrypted-file --decrypt encrypted-file.gpg
Enter your passphrase when prompted. Replace decrypted-file with the name you want for the output, including the correct extension, such as .zip or .sql.gz.
Kleopatra
- Select File, then Decrypt/Verify.
- Select the encrypted file and enter your passphrase when prompted.
Protect your private key
- Keep the private key on a computer you control, and protect it with a strong passphrase.
- Back up the key pair to encrypted, offline storage. Without a backup, a lost computer means lost access to every file encrypted for that key.
- Create a revocation certificate now and store it separately from the key. If the private key is ever lost or exposed, the certificate lets you tell others to stop using the key:
gpg --output revoke.asc --gen-revoke [email protected] - If you suspect that someone else has your private key or passphrase, tell your Support engineer in the case, revoke the key, and create a new pair.
Extend or replace an expiring key
When your key is close to its expiration date, extend it or create a new one:
- Run
gpg --edit-key [email protected]. - Type "expire" and enter a new validity period. Repeat for the encryption subkey if GnuPG offers one (select it with key 1 first).
- Type "save".
- Export the updated public key and attach it to a Support case so the engineer can replace the old copy.
Troubleshooting
Problem | Likely cause | What to do |
|---|
gpg reports "No secret key" when you decrypt | The file was encrypted for a different key, or you are on a computer that does not have your private key. | Run gpg --list-secret-keys to see which keys are available. If the key is missing, restore it from your backup. If the key is present, ask the engineer to confirm which key they used. |
The engineer cannot import or use your key | The key expired, or the exported file contains a private key or a damaged copy of the public key. | Check the expiration date with gpg --list-keys, export the public key again, and attach the new file to the case. |
The passphrase is rejected | Wrong passphrase, or a different key is selected. | Check the passphrase in your password manager. If you have lost it, you cannot recover the key, so create a new pair and send the new public key. |
The encrypted file looks like unreadable text | The file is ASCII armored, which is a normal format for encrypted data. | Decrypt it as described above. Do not open or edit the file in a text editor first. |
Related information