16

Encryption using password + key This does not save the password directly in the file but does something similar without any security risk and helps you achieve what you want. You need to use asymmetric encryption so that your password is associated with an email ID in a keyring. Save the below at the top of your .gpg file -*- epa-file-encrypt-to: ("...


15

Turns out all I had to do was (setq epa-file-cache-passphrase-for-symmetric-encryption t) This solution works on both Linux and Windows, and is a courtesy of Ted and Michael over at help-gnu-emacs.


13

You just need to add ".gpg" at the end of the file name (for example, you could use "private.org.gpg" for an org file), and put at the end # Local Variables: # epa-file-encrypt-to: "someone@somwhere.org" # End: where someone@somwhere.org identify a gpg key you use for encrypting this file.


5

https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html#Agent-Options In this documentation, the options you might be interested in default-cache-ttl n, Set the time a cache entry is valid to n seconds. The default is 600 seconds. Each time a cache entry is accessed, the entry’s timer is reset. To set an entry’s maximum lifetime, use max-cache-...


5

I had this problem and got it to work. Needed to spelunk through the code in epg.el and epg-config.el to determine what to fiddle with. This is what worked for me: (custom-set-variables '(epg-gpg-home-directory "c:/Users/MYUSER/AppData/Roaming/gnupg") '(epg-gpg-program "C:/Progra~2/gnupg/bin/gpg.exe") '(epg-gpgconf-program "c:/progra~2/gnupg/bin/gpgconf....


4

We can set (setq mm-sign-option 'guided) and now we will be prompted with key selection menu before sending a message. As described: mm-sign-option - Option of creating signed parts. nil, use default signing keys; guided, ask user to select signing keys from the menu. We should be able to automate key selection based on e.g. From: field with ...


2

When encrypting, GPG uses the recipient's public key (so only she can decrypt it, with her private key). Your own keys are not used (neither private nor public). You private key is only used either to sign what you send, or to decrypt what ou receive.


2

I had the same problem -- for me the private key set up for the encryption was expired. # First try whether you can encrpyt anything from the command line touch /tmp/test.txt gpg --encrypt --recipient "your_mailaddress@example.org" /tmp/test.txt This failed for me with /tmp/test.txt: encryption failed: No public key (which I found slightly misleading). But ...


2

From the view buffer press a R and see if that works for you. (defun mu4e-repair-file (msg) (let ((path (mu4e-message-field msg :path)) (maildir (mu4e-message-field msg :maildir))) (shell-command (format "yourscript %s" path)) (mu4e-refresh-message path maildir))) (add-to-list 'mu4e-view-actions '("Repair file" . mu4e-repair-...


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/...


1

Set the time on your computer to last year ? I guess any year after 1970 can be set , though individual hardware, software, interfaces would add restrictions.


1

To encrypt or decrypt the contents under headings using different keys you will need to set the CRYPTKEY property value to the uid of the desired key as listed in your key-ring. Setup gpg key-ring as needed. For this example, let's imagine that both the public and secret keys are already setup in your key-ring. $ gpg --list-public-keys /home/melioratus/....


1

Based on the comments to my question, I was able to come up with a (partial?) solution: Create a list of variables with sensitive information. Create a function that makes them local to a buffer. Create another function that sets them to nil. Add a find-file-hook to conditionally call the first function. Add a kill-buffer-hook to conditionally call the ...


Only top voted, non community-wiki answers of a minimum length are eligible