4

Is there a GPG encryption mode that does not requires to have a specific public key stored and requires only one passphrase to be decrypted?

It would make the decryption possible on any machine if the passphrase is known.


PS:

I don't want to use openssl since I cannot do in place encryption easily.

In gpg

  cat file | gpg -e >  file

is encrypting the file.

Whereas

cat file | openssl enc -des3   >  file

produces an empty file.

  • I don't think this is possible, pgp or Gnupgp are using two key encryption, so you would always need your private key in whatever environment you trying to decrypt and at least would need the public one for encryption. – Videonauth Dec 15 '16 at 17:09
  • I guess a passphrase protected private key uploaded on server would make it. – user123456 Dec 15 '16 at 17:25
7

What you want is called symmetric encryption -- where the same key is used for both encryption and decryption -- and yes, GnuPG can do it.

Use --symmetric or -c instead of -er RECIPIENT.

PS: You can combine the two modes so that a file can be decrypted by either the symmetric passphrase or by any of the RECIPIENT private keys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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