5

I want to tell epa to encrypt for two of my public keys. (stored in two different places). I have this at the top of the file:

# -*- mode:org; epa-file-encrypt-to: ("arthur@ul___dt.com") -*-

which causes it to select the first one key for that email. If i run epa-file-select-keys I can choose the two keys I want, though only for that session. I would prefer it remember this decision in the file so I don't have to remember to do this each time on each new computer this file is opened on.

  1. How can I specify two keys by key-id on that line?
  2. What is the actual syntax of the strings in the epa-file-encrypt-to variable? Is it defined somewhere? How are specific keys selected from this string

PS: these keys have the same user-id string and I'd prefer not to have to change that.

PPS: there is also a revoked key with the same email that it needs to not choose. I have tried on emacs 24.3.1 and emacs 25-snapshot

2 Answers2

6
# -*- mode:org; epa-file-encrypt-to: ("arthur@ul___dt.com" "foo@bar.baz") -*-

When a mail address is associated to several keys switch to the key ids. E.g. a call to epa-file-select-keys reveals key ids. The header line with fake key ids looks like:

# -*- mode:org; epa-file-encrypt-to: ("12345678ABCDEF00" "12345678ABCDEF01") -*-

I have not found a syntax-definition for variable epa-file-encrypt-to. I guess it's supposed to be a list containing identifiers for keys as they can be understood by the gpg program.

Marco Wahl
  • 2,796
  • 11
  • 13
0

for me leaving the comma away work. Looks like this:

# -*- mode:org; epa-file-encrypt-to: ("arthur@ul___dt.com" "foo@bar.baz") -*-