3

I'm trying to get started with encryption on emacs and I'm experiencing the same issue as mentioned in this question:Emacs opens gpg file without asking for passphrase. When I save a .gpg file, emacs prompts for the password to use, but then I can open the file (even after closing and reopening emacs) without re-entering the password. Unlike the user in the question above, there are no stored passwords in the password manager.

edit: forgot to mention that epa-file-cache-passphrase-for-symmetric-encryption is nil

1
  • did you check gpg-agent and epa-file-cache-passphrase-for-symmetric-encryption caching, as mentioned in the question you referred?
    – junnu
    Oct 22, 2018 at 12:06

1 Answer 1

1

For gpg version < 2, caching can be from emacs or the gpg-agent

To disable caching from emacs, set epa-file-cache-passphrase-for-symmetric-encryption to nil if it is not nil in emacs config file

(setq epa-file-cache-passphrase-for-symmetric-encryption nil)

To disable caching by gpg-agent, add default-cache-ttl 0 to gpg config file located at ~/.gnupg/gpg-agent.conf

For gpg version >= 2, disabling gpg-agent cache would suffice. So just add default-cache-ttl 0 to gpg config file located at ~/.gnupg/gpg-agent.conf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.