gnu privacy guard - intro

27
Gnu Privacy Guard

Upload: o-r-kumaran

Post on 08-Jun-2015

219 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Gnu Privacy Guard - Intro

Gnu Privacy Guard

Page 2: Gnu Privacy Guard - Intro

Outline

Why Privacy? PGP  is Pretty Good Privacy with IDEA. What is Gnu Privacy Guard?Cryposystems are Mathematical. The Algos used:­Getting Started with GnuPG.Exploring the options.Open PGP Specification – RFC 2440I need your Public Key, Bob; says Alice.GPG + Mutt.

Page 3: Gnu Privacy Guard - Intro

Privacy and SecurityIf Privacy can be outlawed then, only outlaws will have privacy. 

– Phillip Zimmermann                                                                       “Why I wrote PGP”

Network security problems and privacy is essentially about

 Secrecy Authentication Non Repudiation Integrity Control

Page 4: Gnu Privacy Guard - Intro

What is GnuPrivacy Guard (GPG)?● Free Software Replacement of PGP.● It does not use the Patented IDEA Algorithm for encryption (As 

used by PGP)● Supported by German Ministry of Economics and Commerce.  ● Free Software available by default under all major distros of 

Linux, FreeBSD,Solaris and other unices.

Page 5: Gnu Privacy Guard - Intro

alice@hermachine$gpg ­v –versiongpg (GnuPG) 1.2.1Copyright (C) 2002 Free Software Foundation, Inc.  ...

Home: ~/.gnupg

Supported algorithms:

Pubkey: RSA, RSA­E, RSA­S, ELG­E, DSA, ELG

Cipher: 3DES (S2), CAST5 (S3), BLOWFISH (S4), AES (S7), AES192 (S8), AES256 (S9), TWOFISH (S10)

Hash: MD5 (H1), SHA1 (H2), RIPEMD160 (H3)

Compress: Uncompressed (Z0), ZIP (Z1), ZLIB (Z2)

( Difference between gpg –version and gpg ­v –version )

Page 6: Gnu Privacy Guard - Intro

The Bottom line for any Public Key Cryptography

Public Key is for Others to use when encrypting messages to you and when verifying the 

signatures from you.

Private Key is used for creating signatures and for decrypting messages to you.

Page 7: Gnu Privacy Guard - Intro

 Getting Started with GnuPG

    Generating a new keypair

        Generating a revocation certificate

    Exchanging keys

        Exporting a public key        Importing a public key

    Encrypting and decrypting documents    Making and verifying signatures

        Clearsigned documents        Detached signatures

Page 8: Gnu Privacy Guard - Intro

Cocepts of Ciphers

●    Symmetric ciphers●    Public­key ciphers●    Hybrid ciphers●    Digital signatures

Page 9: Gnu Privacy Guard - Intro

Encryption – Decryption

Plain Text Encryption CypherText Decryption PlainText

Page 10: Gnu Privacy Guard - Intro

Conventional CryptoGraphy

Page 11: Gnu Privacy Guard - Intro

Public Key Cryptography

Page 12: Gnu Privacy Guard - Intro

How GPG Works – Hybrid

Page 13: Gnu Privacy Guard - Intro

Decryption in GPG

Page 14: Gnu Privacy Guard - Intro

Key ManagementManaging your own keypair

        Key integrity        Adding and deleting key components        Revoking key components        Updating a key's expiration time

    Validating other keys on your public keyring

        Trust in a key's ownerHa        Using trust to validate keys

    Distributing keysA chain is only as strong as its weakest link.

Page 15: Gnu Privacy Guard - Intro

Need for Message Signatures

Authenticity:                     The From header from an email can be easily                             forged.Integrity:                     The contents of the Message could have altered                         from the original one before you read.

Page 16: Gnu Privacy Guard - Intro

Daily use of GnuPG    Defining your security needs

        Choosing a key size        Protecting your private key        Selecting expiration dates and using subkeys        Managing your web of trust

    Building your web of trust    Using GnuPG legally

Page 17: Gnu Privacy Guard - Intro

Alice Requests Bob for Public KeyWhat will Bob Do?­Follow these Instructions to generate a Public Key and parcipitate in secure communication with Alice.✔ bob@hismachine$ gpg –gen­keys

# This will create a KeyPair for Bob, consisting of Public Key and his Private Key.✔ bob@hismachine$ gpg –list­keys                                                        # Just checks if his keys are present.✔ bob@hismachine$ gpg –output bob.publickey –armor –export bob@hismachine                                                                                         # Bob Exports his public key to bob.publickey(File) in ascii armored form.✔ bob@hismachine $ mutt alice@hermachine ­a bob.publickey      # Bob emails Alice attaching his public key

Page 18: Gnu Privacy Guard - Intro

Alice Imports Bobs Key and Sends him an Encrypted File Alice@hermachine $mutt                                                                #opens her favorite MUA, downloads and saves bobs public key. Alice@hermachine$gpg –import bob.publickey                           #Alice Imports the public key of bob in her king rings. Alice @hermachine$gpg –list­keys                                               #Alice checks for the presence of Bobs Key along with her key ring pairs.                                                                                  /* Alice has a document gpg.txt which she wants to send it to bob */ Alice @ hermachine $ gpg –output gpg.txt­encrypt –encrypt gpg.txt –recipient bob@hismachine                                              # Alice has encrypted the file to gpg.txt­encryptAlice @hermachine $ mutt bob@hismachine ­a gpg.txt­encrypt

Page 19: Gnu Privacy Guard - Intro

Bob Receives and Gets it! bob@hismachine $gpg –output gpg.txt –decrypt gpg.txt­encrypt●  This Command likes to verify if Bob is only trying to decrypt it and it prompts for his passphrase                                                       ● Bob Provides his passphrase successfully.                                                      ●The file is decrypted and the original file is obtained.                           ●Hurray! Bob feels delighted                                                                       ●Bob @hismachine $ vim gpg.txt

Page 20: Gnu Privacy Guard - Intro

Insecure Memory WarningOn many systems this program should be installed as setuid(root). This is necessary to lock memory pages. Locking memory pages prevents the operating system from writing them to disk and thereby keeping your secret keys really secret. If you get no warning message about insecure memory your operating system supports locking without being root. The program drops root privileges as soon as locked memory is allocated.

 But running the program as suid root one should be alert to the danger of Trojan horses. Since a Trojan horse running as superuser can damage an entire system. If for this reason (or any other reason) you choose not run GnuPG as root you can switch off the warning by setting no­secmem­warning in ~/.gnupg/options.

Page 21: Gnu Privacy Guard - Intro

PGP Key Signing Party

For establishing the web of trust and spreading the usage of Gnu Privacy Guard, there can be Key Signing Parties.Steps to Follow.➔Each Attendee creates his key pair➔Notes down the Fingerprint and KeyID in some sheet and brings it along to the key singing party.➔Bring some more Identification like Voter Card, Photo Bank Card, Passport etc.➔Each other member verifies each other and notes down the KeyID and Fingerprint.➔Goes home, imports the KeyIDs,verifies the fingerprint and then signs it to build the web of trust.

Page 22: Gnu Privacy Guard - Intro

RFC 2440OpenPGP Message Format

Popularity of the PGP Software in Secure Communication led way to the Internet Draft RFC 2440 establishing OpenPGP message Format for Communication in the Internet.GPG (expect for few options) complies with the OpenPGP messaging format.General FunctionsData Element FormatsPacket Syntax,Tags,TypesPublic Keys and all other algorithms needed for Secure Communication

Page 23: Gnu Privacy Guard - Intro

KeyManagement Tools●GPA – Privacy Assistant – Gnome.●KGPG – Standard and comes with FC2. ●SeaHorse – For Gnome●Pgp dump – Paste your ASCII Armored key and Show the packets.●Keylookup – Utility to fetch keys from keyserver.  Libraries● Libgcrypt   ●         A general purpose cryptographic library based on the code from GnuPG. It provides functions for all cryptographic building blocks: symmetric ciphers, hash algorithms, MACs, public key algorithms, large integer functions, random numbers and a lot of supporting functions.

Page 24: Gnu Privacy Guard - Intro

References

www.gnupg.org           FAQ           HowTos           Gnu Privacy Handbook           Mailing Lists

www.pgp.com

www.google.com 

Page 25: Gnu Privacy Guard - Intro

Thats all folks!Key ID : 4C88D59C

Key Fingerprint:6C8E 0A4A 64BF 9C70 6034  FD5A 1931 DE09 4C88 D59C

Key Server: gpg.mit.edu 

O.R.Senthil Kumaran 

[email protected]                         [email protected]

Page 26: Gnu Privacy Guard - Intro
Page 27: Gnu Privacy Guard - Intro

 Getting Started with GnuPG

    Generating a new keypair  ­ alice% gpg ­­gen­key        Generating a revocation certificate                      alice% gpg ­­output revoke.asc ­­gen­revoke <mykey>    Exchanging keys        Exporting a public key                     alice% gpg ­­output alice.gpg ­­export [email protected]        Importing a public key

alice% gpg ­­import blake.gpg   Encrypting and decrypting documentsalice% gpg ­­output doc.gpg ­­encrypt ­­recipient [email protected] docblake% gpg ­­output doc ­­decrypt doc.gpg    Making and verifying signaturesalice% gpg ­­output doc.sig ­­sign docblake% gpg ­­output doc ­­decrypt doc.sig        Clearsigned documentsalice% gpg ­­clearsign doc        Detached signatures        ­alice% gpg ­­output doc.sig ­­detach­sig doc