LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-05-2007, 09:34 PM   #1
JenniJenni
LQ Newbie
 
Registered: Aug 2007
Posts: 14

Rep: Reputation: 0
PGP encryption


I am trying to understand the PGP Encryption along with Digital Signature.

CASE 1

When I send an encrypted File to my Business Partner
-----------------------------------------
gpg -e "Publickey1" "PrivateKey1" .

Note
Publickey1 is to encrypt the file (Its provided by my business partner)

here Privatekey1 is used to do the Digital signature (Created by our company)

CASE 2

When I receive an Encrypted file from my Business Partner
---------------------------------------------------------
While doing the DECRYPTION

GPG -d "Privatekey1" "PublicKey2"

Privatekey1 : used to decrypt the file(in case 1 it was used to create the digital signature)

PublicKey2 : Used to verify the digital signature (Provided by our business partner)

Now my question here whether the Same key(PrivateKey1) is used for Digital Signature (while sending the file - Case 1) and also to do the Decryption (Case 2) ?

Whether my understanding is correct?

Last edited by JenniJenni; 09-05-2007 at 10:03 PM.
 
Old 09-05-2007, 10:42 PM   #2
lostnhell
Member
 
Registered: Sep 2005
Location: Virginia Beach, VA
Distribution: Slackware-current
Posts: 50

Rep: Reputation: 17
http://en.wikipedia.org/wiki/Pretty_...n.2Fdecryption will give you the answer you are seeking.
 
Old 09-05-2007, 10:54 PM   #3
JenniJenni
LQ Newbie
 
Registered: Aug 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks a lot.

But still I am not clear. Whether the pseduocode above what I have placed and my understanding is correct or wrong/
 
Old 09-05-2007, 11:03 PM   #4
lostnhell
Member
 
Registered: Sep 2005
Location: Virginia Beach, VA
Distribution: Slackware-current
Posts: 50

Rep: Reputation: 17
Quote:
Originally Posted by JenniJenni View Post
Thanks a lot.

But still I am not clear. Whether the pseduocode above what I have placed and my understanding is correct or wrong/

If you and the recipient have exchanged keys then the message is encrypted using the recipient's public key and appends the digital signature from your public key to verify that the package and or message was originally from you.

The file is decrypted using the recipient's private key and their system uses the signature from your public key to confirm the sending user.
 
Old 09-05-2007, 11:21 PM   #5
JenniJenni
LQ Newbie
 
Registered: Aug 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks LostnHell for your help.

Would you kindly say whether my Pseudocode is correct?

I understand completely while doing the Encryption we need the Public Key(Supplied by our Business Partner)

While Decrypting we need the Private Key.

Now when its comes to Digital Signature , when we encrypt the file we use the Public key (given by our bUsiness partner) Plus the Private KEY

This is where I got confused, the Private Key to sign the document what it is? The Private key what we use in sign the File during the encryption process and the Private key what we use to decrypt the file are same?

Sorry , I was totally confused with this simple logic. Please help me
 
Old 09-05-2007, 11:48 PM   #6
lostnhell
Member
 
Registered: Sep 2005
Location: Virginia Beach, VA
Distribution: Slackware-current
Posts: 50

Rep: Reputation: 17
The syntax is incorrect.

ENCRYPT
gpg -o OutPut_File.gpg -e -r Recipient_Name File_to_encrypt.ext


DECYRPT

gpg -o Output_FIle.ext --decrypt Encrypted_Archive.gpg

http://www.penguin-soft.com/penguin/man/1/gpg.html Contains the GNUpg man page which will give you all options and some syntax.
 
  


Reply

Tags
encryption, help


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
PGP Encryption script question jdiazaz Linux - Security 9 12-11-2009 05:07 AM
Linux password encryption and data encryption Tux-Slack Programming 4 06-20-2007 06:46 AM
LXer: PGP Corporation Announces New Mainframe and Mid-Range Encryption Solutions for IBM Platforms LXer Syndicated Linux News 0 02-13-2006 10:46 PM
gpg / pgp encryption pteren Linux - Software 8 07-26-2003 03:14 AM
Mandrake 9.0 Wireless Works without encryption.. does not with encryption topcat Linux - Wireless Networking 3 05-04-2003 08:47 PM


All times are GMT -5. The time now is 11:05 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration