Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Cryptography: Using PGP I. Generating and managing keys Listing, extracting and.

Slides:



Advertisements
Similar presentations
11/2/2013 2:02:38 AM 5864_ER_FED 1 Importing Certificates into Lotus Notes R6.
Advertisements

Public Key Infrastructure A Quick Look Inside PKI Technology Investigation Center 3/27/2002.
Security 1. is one of the most widely used and regarded network services currently message contents are not secure may be inspected either.
CIS 193A – Lesson6 CRYPTOGRAPHY RAPELCGRQ. CIS 193A – Lesson6 Focus Question Which cryptographic methods help computer users maintain confidentiality,
Public Key Cryptography and GnuPG CPT 555 Network Security.
Authentication Cristian Solano. Cryptography is the science of using mathematics to encrypt and decrypt data. Public Key Cryptography –Problems with key.
Lecture 5: security: PGP Anish Arora CSE 5473 Introduction to Network Security.
Lecture 5: security: PGP Anish Arora CIS694K Introduction to Network Security.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Chapter 5 Electronic mail security. Outline Pretty good privacy S/MIME Recommended web sites.
Presented by Xiaoping Yu Cryptography and PKI Cosc 513 Operating System Presentation Presented to Dr. Mort Anvari.
Tony BrettOUCS Course Code ZAB 9 February Security – Encryption and Digital Signatures Tony Brett Oxford University Computing Services February.
1 CA201 Word Application Collaborating with Others Week # 8 By Tariq Ibn Aziz Dammam Community college.
Cryptography and Network Security Chapter 15 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
Security Jonathan Calazan December 12, 2005.
Public Key Cryptography & PGP Jay D. Dyson, Computer Systems Specialist "If you think cryptography can solve your problem, then you don't understand your.
Pretty Good Privacy (PGP)
E- Business Digital Signature Varna Free University Prof. Teodora Bakardjieva.
Computer Science Public Key Management Lecture 5.
Digital Signature Xiaoyan Guo/ Xiaohang Luo/
INTRODUCTION Why Signatures? A uthenticates who created a document Adds formality and finality In many cases, required by law or rule Digital Signatures.
Lecture 9: Security via PGP CS 436/636/736 Spring 2012 Nitesh Saxena.
1 Fluency with Information Technology Lawrence Snyder Chapter 17 Privacy & Digital Security Encryption.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. M I C R O S O F T ® Preparing for Electronic Distribution Lesson 14.
Electronic Mail Security
Secure r How do you do it? m Need to worry about sniffing, modifying, end- user masquerading, replaying. m If sender and receiver have shared secret.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Security Keys, Signatures, Encryption. Slides by Jyrki Nummenmaa ‘
Electronic mail security. Outline Pretty good privacy S/MIME.
Security.  is one of the most widely used and regarded network services  currently message contents are not secure may be inspected either.
Chapter 6 Electronic Mail Security MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.
Word Lesson 13 Sharing Documents Microsoft Office 2010 Advanced Cable / Morrison 1.
Cryptography and Network Security (CS435) Part Twelve (Electronic Mail Security)
Chapter 15: Electronic Mail Security
Using Google Docs: The Basics for Students Paul Jude Beauvais August 29, 2010.
Microsoft Access 2010 Chapter 10 Administering a Database System.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
Pretty Good Privacy (PGP) Security for Electronic .
CSCE 815 Network Security Lecture 11 Security PGP February 25, 2003.
1 ADVANCED MICROSOFT POWERPOINT Lesson 9 – Importing and Exporting Information Microsoft Office 2003: Advanced.
SECURITY – Chapter 15 SECURITY – Chapter 15 ….for authentication and confidentiality PGP 1.Uses best algorithms as building blocks 2.General.
NETWORK SECURITY.
Security PGP IT352 | Network Security |Najwa AlGhamdi 1.
Introduction to Unix (CA263) File Editing By Tariq Ibn Aziz.
Security Using PGP - Prajakta Bahekar. Importance of Security is one of the most widely used network service on Computer Currently .
Electronic Commerce School of Library and Information Science Cryptography: Using PGP I. Generating and managing keys Signing keys Extracting and sending.
Security fundamentals Topic 5 Using a Public Key Infrastructure.
Network Security Continued. Digital Signature You want to sign a document. Three conditions. – 1. The receiver can verify the identity of the sender.
1 CA203 Presentation Application Reviewing and Sharing a Presentation Lecture # 11.
Electronic Commerce School of Library and Information Science PGP and cryptography I. What is encryption? Cryptographic systems II. What is PGP? How does.
1 of 4 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2006 Microsoft Corporation.
© Copyright 2009 SSLPost 01. © Copyright 2009 SSLPost 02 a recipient is sent an encrypted that contains data specific to that recipient the data.
Digital Signatures and Digital Certificates Monil Adhikari.
Private key
Electronic Mail Security Prepared by Dr. Lamiaa Elshenawy
Security  is one of the most widely used and regarded network services  currently message contents are not secure may be inspected either.
By Marwan Al-Namari & Hafezah Ben Othman Author: William Stallings College of Computer Science at Al-Qunfudah Umm Al-Qura University, KSA, Makkah 1.
Security By Meenal Mandalia. What is ? stands for Electronic Mail. much the same as a letter, only that it is exchanged in a different.
2013Prof. Reuven Aviv, Mail Security1 Pretty Good Privacy (PGP) Prof. Reuven Aviv Dept. of Computer Science Tel Hai Academic College.
Lecture 8 (Chapter 18) Electronic Mail Security Prepared by Dr. Lamiaa M. Elshenawy 1.
第五章 电子邮件安全. Security is one of the most widely used and regarded network services currently message contents are not secure –may be inspected.
Security Depart. of Computer Science and Engineering 刘胜利 ( Liu Shengli) Tel:
Security is one of the most widely used and regarded network services
Campbell R. Harvey Duke University and NBER
Campbell R. Harvey Duke University and NBER
An Installation Guide of PGP on Windows 2000
Secure How do you do it? Need to worry about sniffing, modifying, end-user masquerading, replaying. If sender and receiver have shared secret keys,
Fluency with Information Technology Lawrence Snyder
Cryptography and Network Security
Presentation transcript:

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Cryptography: Using PGP I. Generating and managing keys Listing, extracting and sending keys Adding, and removing keys Key signing and the web of trust II. Encrypting files Encrypting with signature III. Decrypting files IV. PGP options

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Cryptography: Using PGP I. Generating and managing keys Note: To use PGP while using “pine” you may begin at the menu and then type: "!" This will put you at in the UNIX shell

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Generating a Key 1. To create your PGP directory, at the UNIX prompt type: mkdir.pgp 2. To start up the PGP software, at the UNIX prompt, type: pgp -kg [Key generation] 3. Choose a key size. For faster operation, choose "1" (512 bits) For more secure operation, choose “3" (1024 bits)

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli 4. Enter a user ID that your key will be known by - use Firstname Lastname (You should use your name and username) 5. Your private key will be encrypted so that if it is lost, someone else cannot use it You must type in a passphrase that will be used to encrypt your password The passphrase can be as long as you want, and can include punctuation 6. The computer will generate some random number to use to create the keys Wait until the system responds that the keys have been generated

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli You see: ezmail% mkdir pgp Type 'exit' to return to Pine. ezmail% pgp -kg Pretty Good Privacy(tm) Public-key encryption for the masses (c) Philip Zimmermann, Phil's Pretty Good Software. 11 Oct 94 Uses the RSAREF(tm) Toolkit, which is copyright RSA Data Security, Inc Distributed by the Massachusetts Institute of Technology. Export of this software may be restricted by the U.S. government. Current time: 1998/02/03 21:59 GMT I won’t repeat this again

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli And: Pick your RSA key size: 1) 512 bits- Low commercial grade, fast but less secure 2) 768 bits- High commercial grade, medium speed, good security 3) 1024 bits- "Military" grade, slow, highest security Choose 1, 2, or 3, or enter desired number of bits: 1

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli You see: Choose 1, 2, or 3, or enter desired number of bits: 1 Generating an RSA key with a 512-bit modulus. You need a user ID for your public key. The desired form for this user ID is your name, followed by your address enclosed in, if you have an address. For example: John Q. Smith Enter a user ID for your public key: Sheizaf Rafaeli

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli You see: You need a pass phrase to protect your RSA secret key. Your pass phrase can be any sentence or phrase and may have many words, spaces, punctuation, or any other printable characters. Enter pass phrase: XXXXXXXXXXXX Enter same pass phrase again: XXXXXXXXXXXX Note that key generation is a lengthy process.

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Then you see: We need to generate 240 random bits. This is done by measuring the time intervals between your keystrokes. Please enter some random text on your keyboard until you hear the beep: 0 * -Enough, thank you.....**** **** Key generation completed.

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Listing the keys in your keyring To list the keys in your (public) keyring, type: pgp -kv [Key view] To list the keys in your public keyring with just signatures, type: pgp -kvv [Key view verbose] To list the keys in your public keyring with signatures and levels of trust displayed, type: pgp -kc [Key check]

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli You see (-kv) ezmail% pgp -kv Pretty Good Privacy(tm) the U.S. government. Current time: 1998/02/09 18:55 GMT Key ring: '/home/u3/sheizaf/.pgp/pubring.pgp' Type bits/keyID Date User ID pub 512/7E3E525D 1998/02/09 infosoc pub 512/897B /02/08 Sheizaf Rafaeli 2 matching keys found.

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli You see (-kvv): ezmail% pgp -kvv Pretty Good Privacy(tm) U.S. government. Current time: 1998/02/10 14:14 GMT Key ring: '/home/u3/sheizaf/.pgp/pubring.pgp' Type bits/keyID Date User ID pub 512/7E3E525D 1998/02/09 infosoc sig 897B0849 Sheizaf Rafaeli pub 512/897B /02/08 Sheizaf Rafaeli This key is signed by me

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Extracting a key from your keyring This takes a key from your keyring and puts it in a file, which you can send to someone via 1. To extract a key from your keyring, type: pgp -kxa -or- userID filename (optional) [Key extract armored] where or userID is the address or userID of the key that you want to extract from your keyring (usually your own!) 2. The computer will prompt you for a file name you use to save your public key

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli You’ll see: ezmail% pgp -kxa Sheizaf sheizafkey Pretty Good Privacy(tm) the U.S. government. Current time: 1998/02/09 18:42 GMT Extracting from key ring: '/home/u3/sheizaf/.pgp/pubring.pgp', userid ”Sheizaf". Key for user ID: Sheizaf Rafaeli 512-bit key, Key ID 897B0849, created 1998/02/08 Transport armor file: sheizafkey.asc Key extracted to file ’sheizafkey.asc'.

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli You’ll see: -----BEGIN PGP PUBLIC KEY BLOCK----- Version: mQBNAzTeFVMAAAECAOd0Go+wiJTLZPvfMIgm/dT7KJVzA+o4Neph7Sce58KRS8SD Y3+MJ9BXs65NgFo2+gpvd4ruQd72bmkyp4l7CEkABRG0J0hvd2FyZCBSb3NlbmJh dW0gPGhyb3NlbmJhQGluZGlhbmEuZWR1PokAVQMFEDTgZLZuaTKniXsISQEBnUQ C ANF+5c6iRahTuoa5sh8UGKG+RDethVz9C1+2nfsUMvFPLNcq7pZmH43dsSJXWtaW ws9yRzi7G94pdp7MlIwEKDi0Bmhvd2FyZA== =bHK END PGP PUBLIC KEY BLOCK-----.

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Using PINE, you can now send the key (in the form of the file to someone else You format a message and use the to attach the file ~or~ You can open the.asc file with pico and then copy and paste the public key into an message as text ~or~ Use Windows cut and paste commands

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli You can use the -f (filter) option to send your public key directly to another person The filter option allows PGP to print the public key directly into the mail program (in our case, ) To use it, type: pgp -kxaf your_userID | mail -s “descriptive text” Your public key is printed into an message and sent to the specified address without you having to exit the UNIX shell

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Adding a Key to Your Keyring For you to be able to encrypt a document to someone else (or verify a digital signature) you must add their public key to your keyring For you to do this, they must first extract their public key, and send it to you You must then save it into a file and follow the instructions to add it to your keyring

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli 1. Type: pgp -ka filename [Key add] where filename is the file that contains the public key that you want to add to your keyring 2. If the key is not certified, you have to decide if you want to want to certify (e.g. trust) it You need your private key passphrase to do this 3. The selection you make from the menu determines how much trust you have in the person This is important because it maintains and extends the “web of trust” that makes PGP work You have just added the key in to your keyring!

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Removing a key from your keyring At the UNIX prompt, you type: pgp -kr userID [Key remove] where the userID is the name attached to the key Then, when prompted, type to remove the key If you don’t recall the names of the keys in your keyring, you can see them if you type: pgp -kv [Key view]

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Key signing and the web of trust Levels of trust 1 = I don’t know: This means that you will be prompted to certify each new public key added which has this person’s signature 2 = No: PGP will ignore certification by this person on new public keys you add 3 = Usually: A key with signatures from two “3” people is accepted 4 = Always: the key is accepted without question

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli To sign a key, you type pgp -ks userID [Key sign] Experts recommend that you sign your own public key because anyone can create keys with your userID, but only you can sign yours To do this, type: pgp -ks your_userID -u your_userID A self-signed key means that others know it belongs to you

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli When you add a public key, you certify its validity by signing or “certifying” it This links the userID to the public key When you extract it and send it along, your signature goes with it People who receive the key look at your signature and use it to trust that the key belongs to who it is supposed to You can also manually sign keys

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli It is possible to change the level of trust you have assigned to a public key To do this, type: pgp -ke userID [Key edit] You reduce trust if you find out that someone signs and distributes keys without really checking You might raise levels of trust if you find out that a person really understands how the web of trust works and is careful about certifying keys

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Another component of the web of trust is the “fingerprint” of a key When a key is generated, it receives a unique identifier composed of 16 “hexadecimal” numbers People will often provide the “fingerprint” for their public keys in their signature files so that others can make note of it This fingerprint allows you to verify that the key belongs to the person who claims to have created it

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli This is an example of a public key fingerprint (it’s mine): Key fingerprint = DD DB 14 3D 5E 95 FD A0 7B E3 9A AA 91 F0 05 F4 To see the fingerprint of the keys in your public keyring, type: pgp -kvc [Key view check] The “fingerprint” will be listed after each key in your public keyring

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Cryptography: Using PGP I. Generating and managing keys Listing, extracting and sending keys Adding, and removing keys Key signing and the web of trust II. Encrypting files Encrypting with signature III. Decrypting files IV. PGP options

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Encrypting a file to someone else To encrypt and sign a file named to someone whose address is, you type: pgp -eas filename -u yourID The extension “e” encryptq with a specified public key The extension “a” applies ASCII armor to the file (making a binary file readable as text) The extension “s” uses a secret key to sign the file The extension “u” tells PGP which secret key to use This file appears in encrypted form

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli You will have to enter your passphrase in order to digitally sign (e.g. encrypt with your private key) the file The encrypted file is saved as filename.asc (where filename is the name of the original file) To view this file, you can type: pico filename.asc ~or~ more filename.asc (this command will not allow you to make changes to the file) You can now use to mail this document to the intended recipient as an attachment

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli And, using pico, we see: -----BEGIN PGP MESSAGE----- Version: hEwDbmkyp4l7CEkBAf4izmZs4LTfWgiyr3t4//efsP8kCrQ7Tx7Cc/djoK4ZytF/ nEIT5CUCx3AQCKUZA+gKcUR5Fp4f8zJfz1aHnyM6pgAAASwp/X0fbk4upFpr5r30 ps+BAgwgCffkuApcoKHnt+R+lFyDYlarQpkXpS/Tw8Zc5rZBA/deuGnekdlIS4o4 huw2BigCWCmiQOZeLLZmmcJIjaNkEV+dEWAJufysZOZXMVq2I4Fd4QvThQFObc3i PC7KzMbkAEsj7WXb+t8/o3ltQBVSEgDBP+m/GbQe8+s2CJutC3w+EQ5GBNCCcgBU Z7X/eEdqtN50U+KD/uZNNXSEOQ1BpmzPihV7O9qMTZGCfDt3lh9jMEctfZd5IzpN Os/Y6y+m357olx1yx7lfq+77rNK3qtBonTBjNCeFk1xhRA09KVwHp0V+gGGpsyPA tpNu1qUeQ247x0W7Z/FQn3Nwb2LJVmQb7sNsBI2izCRi+LAtfbCc2c4aPr/tzjU= =VIXw -----END PGP MESSAGE-----

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Other ways to use PGP in the UNIX shell: To send mail directly from the UNIX shell, use: ezmail% mail < file.asc To encrypt and send a message from the UNIX shell, use: ezmail% pgp -eatf their_userID | mail

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli 6. To compose, encrypt, and send the message from the UNIX shell, use: ezmail% pgp -eatf their_userID | mail Note: you must have the public key belonging to the person at in order to encrypt a document to that person You’ll see a blank line - that’s where you begin typing When you’re done, press: ^D

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Using [ ezmail% pgp -eatf their_userID | mail you see: ezmail% pgp -eatf infosoc | mail Pretty Good Privacy(tm) the U.S. government. Current time: 1998/02/10 17:50 GMT Here's another way to send encrypted messages directly from the UNIX shell. The use of the option combined with the pipe option makes this possible. ^D Key for user ID: infosoc 512-bit key, Key ID 7E3E525D, created 1998/02/09 Text that I typed How to stop

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli To sign a plaintext file with your secret key, type: pgp -sta filename -u your_userID The extension “s” is the command to sign with a secret key The extension “t” saves the file in a text format The extension “a” applies ASCII armor to the file (making a binary file readable as text) The extension “u” tells PGP which secret key to use Although the text can be read, the digital signature is encrypted PGP must be used to verify the signature

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli And, with pico, you see: -----BEGIN PGP SIGNED MESSAGE----- This is a test message. It will be encrypted with your public key and you will need your private key to decrypt and read it. This is a demonstration of the way in which PGP protects the integrity and authenticity of your files BEGIN PGP SIGNATURE----- Version: iQBVAwUBNsHjoqiNX5P7lAgZAQGG3QIAh8ZlL4aK/VsdqENFHzTbnYWCWE6bC4E 4 u+SwL99Q3AT8wlTlteabXkpNTz4sgIiwpu5XlxW+gj4eJEDaYZ7oDA== =vYVw -----END PGP SIGNATURE-----

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Cryptography: Using PGP I. Generating and managing keys Listing, extracting and sending keys Adding, and removing keys Key signing and the web of trust II. Encrypting files Encrypting with signature III. Decrypting files IV. PGP options

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Decrypting a File When you receive the file, you save it to the UNIX shell, where you will then decode it 1.To decrypt an encrypted file called “filename” (e.g. encrypted with your public key), you type: pgp filename.asc Or whatever the file extension is 2. You will have to type in the password to your secret key 3. If you are able to decrypt the file properly, PGP will tell you the filename of the decrypted file 4. You can then view this file with the UNIX command or edit it with the word processor

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli You type “v” to move to the viewer and you see: 1 0 lines Text/PLAIN 2 ~489 bytes Text/PLAIN, "decrypt this!" Then you type “s” to save the message to a file in your directory 1 0 lines Text/PLAIN 2 ~489 bytes Text/PLAIN, "decrypt this!" Copy attachment to file in home directory: test.asc

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Then, to decrypt and read the message, you go back to the main menu and UNIX shell typing “!” from the main Pine menu You see: Type 'exit' to return to Pine. ezmail% ls Mail somefile.txttest.asc Text another.txtprop.txt Type 'exit' to return to Pine. ezmail% The one we want!

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Decrypting and checking signatures After saving the message to your directory, type: pgp filename.asc -o filename [Output] The second is optional and will name the file after it is decrypted Note that the verification of the signature is done automatically during encryption, and depends on you having the senders public key in your pubring.pgp keyring

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Decrypting a message and leaving the signature in it You type: pgp -d filename [Decrypt with signature] You are left with a plaintext message that has the encrypted signature at the bottom This can be useful if you want to send the message to a third party and allow them to also verify the signature

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Cryptography: Using PGP I. Generating and managing keys Listing, extracting and sending keys Adding, and removing keys Key signing and the web of trust II. Encrypting files Encrypting with signature III. Decrypting files IV. PGP options

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli IV. PGP options -e = Encrypt with a public key -a = ASCII armor -s = Sign with your secret key -t = Converts PGP files into text files -f = Filter will write the file to standard file output -o = Output will specify the name for a decrypted file -w = Wipes or erases the original plaintext file

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Here's a quick summary of PGP v2.6 commands. To encrypt a plaintext file with the recipient's public key: pgp -e textfile her_userid To sign a plaintext file with your secret key and encrypt it in ACSCII form with her public key: pgp -eas textfile her_userid [-u your_userid] To sign a plaintext file with your secret key and have the output readable to people without running PGP first: pgp -sta textfile [-u your_userid]

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli To sign a plaintext file with your secret key, and then encrypt it with the recipient's public key: pgp -es textfile her_userid [-u your_userid] To decrypt an encrypted file, or to check the signature integrity of a signed file: pgp ciphertextfile [-o plaintextfile] To decrypt a message leaving the signature intact: pgp -d ciphertextfile To create a signature certificate that is detached from the document: pgp -sb textfile [-u your_userid]

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli To detach a signature certificate from a signed message: pgp -b ciphertextfile To view the decrypted plaintext output on your screen (like the Unix-style "more" command), without writing it to a file, use the -m (more) option while decrypting: pgp -m ciphertextfile To specify that the recipient's decrypted plaintext will be shown ONLY on her screen and cannot be saved to disk, add the -m option: pgp -steam message.txt her_userid To recover the original plaintext filename while decrypting, add the -p option: pgp -p ciphertextfile

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli Key management: To generate your own unique public/secret key pair: pgp -kg To add a public or secret key file's contents to your public or secret key ring: pgp -ka keyfile [keyring] To extract (copy) a key from your public or secret key ring: pgp -kx userid keyfile [keyring] ~or~ pgp -kxa userid keyfile [keyring]

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli To view the contents of your public key ring: pgp -kv[v] [userid] [keyring] To view the "fingerprint" of a public key, to help verify it over the telephone with its owner: pgp -kvc [userid] [keyring] To view the contents and check the certifying signatures of your public key ring: pgp -kc [userid] [keyring] To edit the userid or pass phrase for your secret key: pgp -ke userid [keyring]

Electronic Commerce : Using PGP Electronic Commerce Prof. Sheizaf Rafaeli To edit the trust parameters for a public key: pgp -ke userid[keyring] To remove a key or just a userid from your public key ring: pgp -kr userid [keyring] To sign and certify someone else's public key on your public key ring: pgp -ks her_userid [-u your_userid] [keyring]