How do I symmetrically encrypt a file using gpg?
Problem
I'm trying to symmetrically encrypt a file using gpg. I enter and re-enter a passphrase, then gpg tells me I don't know what to enter here. I'm symmetrically encrypting (not public key encrypting) so I don't understand why gpg wants to know who the recipient might be. I don't know what the sort of user id gpg is expecting looks like, and I don't know any gpg user ids anyway. If I just enter an empty line, gpg complains that there are "no valid addressees". So how do I symmetrically encrypt a file using gpg? Version: gpg (GnuPG) 1.4.11, as packaged in Ubuntu 11.10.
Error Output
$ gpg --encrypt --symmetric $MYFILE
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: How do I symmetrically encrypt a file using gpg?
The correct command is . The option tells it to use public-key encryption. The "id" it is asking for is the id of the public key, which you must have in your keyring. (Usually you use an email address for this, but there are other ways to specify which public key to use.) Combining the two options, as you did, encrypts the session key with a public key and a symmetric cypher, so that either the private key or the password you enter can be used to decrypt.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix