5

With GPG I can encrypt file symmetrically, as for example described here: How do I symmetrically encrypt a file using gpg?. On decryption it will show (among other lines):

gpg: encrypted with 1 passphrase

How can I add more than one passphrase on encrypting the file?


Notes:

  • I know it is possible to add multiple recipients in the asymmetric encryption.
  • One can encrypt the file both symmetric and asymmetric at the same time. From the manpage of gpg:

    -e     Encrypt data. This option may be combined with --sign (for  a
           signed  and  encrypted  message),  --symmetric (for a message
           that may be decrypted via a secret key or a  passphrase),  [...]
    
  • A message on the gnupg mailing list from 2004 indicates that it is not yet possible. Now almost 10 years later and this might not be correct anymore.

3 Answers 3

4

GnuPG still has not implemented the ability to add multiple passphrases for symmetric encryption.

2
  • 1
    If you could add a (recent) source or reference for this, I'm happy to accept this answer.
    – gertvdijk
    Aug 20, 2013 at 22:15
  • That's easy to prove, run the command (gpg -c <filename>) on something. You will be prompted for one passphrase and that's it.
    – Ben
    Sep 29, 2013 at 22:41
3

Combine with using "ssss"
Split and Combine Secrets using Shamir's Secret Sharing Scheme.

1
  • I think this was unfairly downvoted, maybe an explanation of what SSSS is would have helped but I found this useful. Feb 6, 2018 at 12:16
1

Run gpg2 -c on it twice: first, the file you want to encrypt and second, the encrypted file.

4
  • No, this doesn't work. It will result in a GPG-encrypted file within another GPG encrypted file (filename.gpg.gpg). The only way to decrypt it is by using the second and the first passphrase together. This is not what I'm asking for. Please elaborate.
    – gertvdijk
    Nov 16, 2013 at 14:31
  • 2
    Your Q was not entirely clear whether you wanted to require either passphrase or both passphrases to decrypt. This answers if both passphrases are required.
    – Xen2050
    Feb 14, 2016 at 14:21
  • The main problem with this I see, other than that it's now apparently not what gertvdijk wanted, is that you have to use the passphrases in a certain order. Sep 6, 2018 at 23:26
  • The only alternative that comes to mind is using asymmetric encryption (you can have as many recipients as you want—each of their secret keys will decrypt it), but the questioner specifically asked for symmetric. Sep 7, 2018 at 2:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .