GPG encrypt a file with only a passphrase (no key storage needed)
9,604
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.
Related videos on Youtube
Author by
user123456
Updated on September 18, 2022Comments
-
user123456 over 1 year
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.
-
Videonauth over 7 yearsI 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.
-
user123456 over 7 yearsI guess a passphrase protected private key uploaded on server would make it.
-
-
addicted about 4 yearsHow do you combine the symmetric and asymmetric mode?
-
Penguin9 over 3 yearsHow do you combine the symmetric and asymmetric mode?
-
Kevin Detrain over 3 years@addicted @Penguin9 I guess I thought it was obvious what "combine these two modes" meant... You can do this simply by using all 3 options, e.g.,
gpg -c -e -r RECIPIENT
.