LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2004, 03:50 AM   #1
gazza
Member
 
Registered: Jun 2003
Distribution: Mandrake 10.1 Official
Posts: 157

Rep: Reputation: 30
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 ?
 
Old 04-30-2004, 04:14 AM   #2
robartes
Member
 
Registered: Oct 2003
Location: Mechelen, BE
Distribution: Mandrake as base, most software hand rolled
Posts: 80

Rep: Reputation: 15
Hi,

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

Code:
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.

Code:
gpg -e my_file
This will ask for the recipient. Specify the recipient by either his id (usually email) or pubkey ID.
 
Old 04-30-2004, 04:28 AM   #3
gazza
Member
 
Registered: Jun 2003
Distribution: Mandrake 10.1 Official
Posts: 157

Original Poster
Rep: Reputation: 30
Great

Cheers.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GPG Script Question Keene44 Programming 2 07-22-2005 03:15 PM
gpg --yes -e -r doctor_sniff Linux - Software 2 06-11-2005 12:21 AM
Using gpg? ginda Linux - Security 4 03-10-2005 09:13 AM
gpg chrismiceli Linux - General 1 04-19-2003 05:50 PM
Gpg Ztyx Linux - General 1 09-09-2002 07:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration