Before using PGP encryption in Apple Mail, you need to generate a PGP key pair.
- Install GnuPG (GPG) if you haven't already:
brew install gnupg
- Generate a new key pair:
gpg --full-generate-key
- Follow the prompts to:
- Select key type (RSA and RSA recommended)
- Choose a key size (4096 bits recommended)
- Set an expiration date
- Enter your name and email address
- Set a strong passphrase
- List your generated keys:
Note the key ID of your new key.
gpg --list-keys
- Export your public key:
gpg --armor --export your-key-id > public-key.asc
- Export your private key (for backup, store securely!):
gpg --armor --export-secret-key your-key-id > private-key.asc
- Download and install GPG Suite.
- Open GPG Keychain and import your generated key if it's not listed:
gpg --import public-key.asc gpg --import private-key.asc
- Open Apple Mail, go to Mail > Settings > GPG Mail.
- Ensure your key is selected under Default Key.
- Compose a new email in Apple Mail.
- Ensure the recipient’s PGP public key is imported into your keychain:
gpg --import recipient-public-key.asc
- Click the lock icon in the message window to enable encryption.
- If the recipient has a PGP key, Apple Mail will encrypt the email.
- Click Send.
- When receiving a PGP-encrypted email, open it in Apple Mail.
- Enter your passphrase when prompted to decrypt the message.
To allow others to send you encrypted emails, publish your PGP public key:
Upload your key to a public keyserver:
gpg --send-keys --keyserver keyserver.ubuntu.com your-key-id
You can also publish your public-key.asc
file on your personal website and share the URL.
Include your public key fingerprint in your email signature:
PGP Fingerprint: ABCD 1234 EFGH 5678 IJKL 9012 MNOP 3456 QRST 7890
Public Key: https://yourwebsite.com/your-public-key.asc
If you need to revoke your key (e.g., lost key, compromised key):
- Generate a revocation certificate:
gpg --output revoke.asc --gen-revoke your-key-id
- Upload the revocation certificate to the keyserver:
gpg --send-keys --keyserver keyserver.ubuntu.com your-key-id
- Inform your contacts to stop using your revoked key.
By setting up PGP encryption in Apple Mail, you enhance your email security and ensure privacy in communications. Make sure to securely back up your private key and periodically refresh your encryption setup.
For additional information, refer to the GPG Tools documentation and GNU Privacy Handbook.