Wednesday, November 3, 2010

Pretty Good Privacy (PGP)

Pretty Good Privacy (PGP) is a data encryption and decryption computer program that provides cryptographic privacy and authentication for data communication.It increase the security of e-mail communications.It was created by Philip Zimmermann in 1991.

PGP is based on the public-key method, which uses two keys -- one is a public key that you disseminate to anyone from whom you want to receive a message. The other is a private key that you use to decrypt messages that you receive.

Following step help to create public key and after export that key we can send it to other end.(communication other party)

Step 1: -
pgp –version
check the PGP version
Step 2:-
pgp –h
get the pgp help

Step 2:-
pgp --gen-key "Joe User" --key-type RSA --bits 2048 --passphrase "my passphrase"

create pgp public key
Here Joe User is the key word we are used.
Key-type -> RSA should be the correct one to select two way communication. The default is DH/DSS and should be fine for new users.
Bits ->
1024 or 2048 is fine. 2048 or greater will be much better to used.
Below 1024 is not good. Then crackers can easily guess the public key.
Passphrase -> This is one of the most important steps (next to backing
up your keyring). If someone were to get a hold of your secret key, and figure
out your passphrase then there is NOTHING that you can do to prevent that
person from opening your encrypted files or reading your mail.
The passphrase should be a good length, and include upper and lower case
characters, number and symbols. A good choice is to make a sentence and
add punctuation and numbers. Of course, you should not write it down
anywhere where others may find it. If your passphrase is weak, then it can be
hacked.


After execute the above command ,

PGP Command line will now generate your keypair. You should see your Key ID (i.e. 0X12345678), and a message that the key was successfully generated.



Step 3:-
pgp --list-keys

list the public keys in the PGP server

Step 4:-
pgp --export 0x12345678
Export The Public Key

Now Public key creation process is over.
After that you can send the export public key to customer
After sending the customer your public key , we have to collect customer’s public key

First we need to import that public key.
pgp --import "PGP Joe.asc"

PGP Joe.asc is the public key of the customer

For this way we can use PGP encryption process.

No comments: