-   Linux - Newbie (
-   -   gpg question (

gazza 04-30-2004 04:50 AM

gpg question
I have generated my keys and mail encryption is fine, my question is though what if I wanted to encrypt a file and have another user unencrypt it with a password i set ?

How would this be done ?

robartes 04-30-2004 05:14 AM


what you want to do is symmetric encryption (single key). You can do this with the -c or --symmetric flags to gpg:


gpg -c my_file
This will ask for a passphrase twice, and the encrypted version of the file will end up in my_file.gpg.

You could also use asymmetric encryption (which solves the key distribution problem and is what gpg is actually built for), by using the recipients public key to encrypt the message. That way, only the recipient can decrypt it, without the need for a shared secret.


gpg -e my_file
This will ask for the recipient. Specify the recipient by either his id (usually email) or pubkey ID.

gazza 04-30-2004 05:28 AM



All times are GMT -5. The time now is 11:06 AM.