How to encrypt and sign text or files with GPG Services?
Encrypt files
- right-click the file or folder you want to encrypt in Finder and select
Services > OpenPGP: Encrypt File
- select recipients to encrypt the message with their public keys - if you only want to encrypt for yourself you need to tick the
Add to Recipients
option in theYour Key:
section - optionally sign the file to ensure it did not get tampered with when decrypting after some time
- click
Encrypt
- a new
.gpg
file will be created next to the original file, if you do not want to keep the unencrypted file make sure to delete it securely
To sign a file select Services > OpenPGP: Sign File
.
Encrypt text
- open TextEdit (do not use Word, Pages or other formatting TextEditors)
- open TextEdit > Preferences and make sure you have selected
Plain text
as format - paste or type your message
- press ⌘A to select all text
- right-click and select
Services > OpenPGP: Encrypt Selection
- select recipients to encrypt the message with their public keys - if you only want to encrypt for yourself you need to tick the
Add to Recipients
option in theYour Key:
section - click
Encrypt
and you will see the encrypted text in TextEdit
To only sign a text message select Services > OpenPGP: Sign Selection
.
Note: GPG Services is invoked via right-click. Sadly some programs do not offer a services menu option. Known cases are Firefox and Atom. For Firefox you can invoke GPG Services via menubar > Program name > Services > OpenPGP: …
, sadly for Atom no workaround is available. You can ask GitHub to add the functionality in the open issue.