- Install GPG2 - on mac, I use GPG tools[1]
- Create GPG key
- Back up your GPG key (including private)
- GPG tools has a feature that allows backing up public key with secret
- Make sure to select the include secret checkbox
- Encrypt/Decrypt files using GPG2 and Emacs
- Point Emacs to GPG tools
;; Add to your ~/.emacs.d/init.el
(require 'epa-file)
(epa-file-enable)
;; Point emacs can find the gpg executable
(add-to-list 'exec-path "/usr/local/bin")
(setq epg-gpg-program "/usr/local/bin/gpg")
- Remove saving backup files
- Save file with .gpg extension [2]
- Setup each file to be encrypted seamlessly [4]
# -*- mode:org; epa-file-encrypt-to: ("me@emailaddress.com") -*-
- Save the file [3]
- A pop up ask you for password.