> For the complete documentation index, see [llms.txt](https://sarpers-organization.gitbook.io/ctftricks/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sarpers-organization.gitbook.io/ctftricks/_chapter-intro-3/pgp/decryption-with-passphrase/trick-0355.md).

# Decrypt PGP File with Found Private Key

***

Import the found PGP private key (`priv.key`) into your GPG keyring.

```bash
gpg --import priv.key
```

GnuPG needs a passphrase to access the key.

Then, decrypt the encrypted file (`CustomerDetails.xlsx.gpg`) using the key now available in your keyring, specifying the desired output file name.

```bash
gpg --decrypt --output CustomerDetails.xlsx CustomerDetails.xlsx.gpg
```
