Next: , Previous: Commands, Up: Top

4 Caching Passphrases

Typing passphrases is an irritating task if you frequently open and close the same file. GnuPG and EasyPG Assistant provide mechanisms to remember your passphrases. However, the configuration is a bit confusing since it depends on your GnuPG installation (GnuPG version 1 or GnuPG version 2), encryption method (symmetric or public key), and whether or not you want to use gpg-agent. Here are some questions:

  1. Do you use GnuPG version 2 instead of GnuPG version 1?
  2. Do you use symmetric encryption rather than public key encryption?
  3. Do you want to use gpg-agent?

Here are configurations depending on your answers:

1 2 3 Configuration
Yes Yes Yes Set up gpg-agent.
Yes Yes No You can't, without gpg-agent.
Yes No Yes Set up gpg-agent.
Yes No No You can't, without gpg-agent.
No Yes Yes Set up elisp passphrase cache.
No Yes No Set up elisp passphrase cache.
No No Yes Set up gpg-agent.
No No No You can't, without gpg-agent.

To set up gpg-agent, follow the instruction in GnuPG manual. see Invoking GPG-AGENT.

To set up elisp passphrase cache, set epa-file-cache-passphrase-for-symmetric-encryption. See Encrypting/decrypting *.gpg files.