PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA...

21
PGP - Pretty Good Privacy 1 PGP - Pretty Good Privacy • Sistema di cifratura/decifratura PUBBLICO • Sistema basato su algoritmi RSA e IDEA • Sviluppato da Phil Zimmerman (1991) • Oggi standard diffuso nel mondo

Transcript of PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA...

Page 1: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 1

PGP - Pretty Good Privacy

• Sistema di cifratura/decifratura PUBBLICO

• Sistema basato su algoritmi RSA e IDEA

• Sviluppato da Phil Zimmerman (1991)

• Oggi standard diffuso nel mondo

Page 2: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 2

PGP - Pretty Good Privacy

• Servizi di Sicurezza:– Confidenzialita’

• solo l’utente B legge il messaggio dell’utente A

– Autenticazione dell’origine• il messaggio di A proviene proprio da

A

– Integrita’• il messaggio di A non e’ alterato

• Ogni utente ha 2 chiavi:– pubblica – privata

Page 3: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 3

PGP - Pretty Good Privacy

• A che cosa servono le due chiavi?– L’utente X, con la sua chiave

segreta:• FIRMA il messaggio

• DECIFRA il messaggio indirizzatogli

– Gli altri utenti, con la sua chiave pubblica dell’utente X :

• VERIFICANO che il messaggio sia realmente inviato da X

• CIFRANO il messaggio per X

Page 4: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 4

PGP - Pretty Good Privacy

• Chiave PRIVATA– Riservata– Protetta da una password lunga

detta “PASS PHRASE” FIRMA messaggi DECIFRA messaggi

• Chiave PUBBLICA– Distribuibile a chiunque,

attraverso:• key servers

• distribuzione diretta

• pubblicata su WEB

Page 5: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 5

PGP - Pretty Good Privacy

• PERCHE’ USARE “PGP”– PGP non e’ decifrabile

• in teoria !!!

• In pratica…..

– Il messaggio non puo’ essere contraffatto

• con la firma del messaggio vengono aggiunte informazioni, CRC-like.

• Una eventuale manomissione e’ rilevata e notificata

Page 6: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 6

PGP - Pretty Good Privacy

• PERCHE’ USARE “PGP”

– I messaggi sono mantenuti privati• solo il mittente e il/i ricevente/i

conoscono il contenuto

– PGP e’ un sistema pubblico di spedizione, ricezione e verifica conveniente.

Page 7: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 7

PGP - Pretty Good Privacy

• PGP - Utili informazioni

– Dove trovare i sorgenti di PGP:• ftp.pgp.net/pub/pgp (sito di

distribuzione ufficiale)

• www.pgpi.com (The International PGP Home Page)

• ftp.uni-kl.de/pub/aminet/util/crypt

• goya.dit.upm.es

• ftp.germany.eu.net.

Page 8: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 8

PGP - Pretty Good Privacy

• PGP - Utili informazioni

– Key servers pubblici ce ne sono molti. Per pubblicare una chiave:

• spedire una mail a [email protected]

con subject “help”

– Qualsiasi domanda su PGP trova una risposta nel

http://www.pgp.net/pgpnet/pgp-faq/

Page 9: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 9

PGP - Pretty Good Privacy

• PGP - Come si usa

Le chiavi vengono mantenute in due

files indirizzati attraverso la variabile d’ambiente PGPPATH:

+ pubring.pgp

+ secring.pgp

Page 10: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 10

PGP - Pretty Good Privacy

• PGP - Come si usa

GENERAZIONE di una chiave

pgp -kg

Informazioni aggiuntive richieste

+ Complessita’:

• Low commercial grade

• High commercial grade

• Military

+ Identificativo:

Es.: “mark Bogus”

+ Pass Phrase

Page 11: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 11

PGP - Pretty Good Privacy

• PGP - Come si usa

CIFRATURA di un file

pgp -c nomefile

Informazioni aggiuntive richieste:

+ Pass Phrase (*)

Produce:

+ nomefile.pgp

(*) Viene utilizzata solo per questa operazione di cifratura; dovra’ essere riutilizzata per la DECIFRATURA.

Page 12: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 12

PGP - Pretty Good Privacy

• PGP - Come si usa

DECIFRATURA di un file

pgp nomefile.pgp [-o nuovofile]

Informazioni aggiuntive richieste:

+ Pass Phrase (*)

(*) Deve essere la stessa usata in cifratura

Page 13: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 13

PGP - Pretty Good Privacy

• PGP - Come si usa

CIFRATURA di un messaggio indirizzato a: Carol (*)

pgp -e nomefile Carol

Produce:

+ nomefile.pgp

(*) E’ necessario possedere (memorizzata in pubring.pgp) la chiave pubblica di Carol.

Page 14: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 14

PGP - Pretty Good Privacy

• PGP - Come si usa

DECIFRATURA di un messaggio indirizzato ad Carol

pgp -d nomefile.pgp

Informazioni aggiuntive richieste:

+ Pass Phrase (*)

(*) Deve essere la stessa usata in fase di generazione della chiave segreta da “Carol”.

Page 15: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 15

PGP - Pretty Good Privacy

• PGP - Come si usa

FIRMA di un messaggio

pgp -s nomefile

Informazioni aggiuntive richieste:

+ Pass Phrase (*)

Produce:

+ nomefile.pgp

(*) Deve essere la stessa usata in fase di generazione della chiave segreta.

Page 16: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 16

PGP - Pretty Good Privacy

• PGP - Come si usa

FIRMA e CIFRATURA di un messaggio indirizzato a: Carol

pgp -es nomefile Carol

Informazioni aggiuntive richieste:

+ Pass Phrase (*)

Produce:

+ nomefile.pgp

(*) PassPhrase usata in fase di generazione della chiave segreta.

Page 17: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 17

PGP - Pretty Good Privacy

• PGP - Come si usa

FIRMARE, CIFRARE un messaggio indirizzato a Carol e spedirlo via e-mail:

pgp -esa nomefile Carol

Informazioni aggiuntive richieste:

+ Pass Phrase (*)

Produce:

+ nomefile.pgp

e…….mail [email protected] < nomefile.pgp

Page 18: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 18

PGP - Pretty Good Privacy

• PGP - Come si usa

Estrarre una chiave pubblica dal pubring per distribuire:

pgp -kxa Carol file_key $PGPPATH/pubring.pgp

Page 19: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 19

PGP - Pretty Good Privacy

• PGP - Come si usa

Aggiungere una chiave pubblica nel pubring: pgp -ka Carol $PGPPATH/pubring.pgp

Rimuovere una chiave pubblica dal pubring:

pgp -kr Carol $PGPPATH/pubring.pgp

Page 20: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 20

PGP - Pretty Good Privacy

• PGP - Come si usa

Listare le chiavi pubbliche registrate nel pubring:

pgp -kv $PGPPATH/pubring.pgp

Page 21: PGP - Pretty Good Privacy1 Sistema di cifratura/decifratura PUBBLICO Sistema basato su algoritmi RSA e IDEA Sviluppato da Phil Zimmerman (1991) Oggi standard.

PGP - Pretty Good Privacy 21

PGP - Pretty Good Privacy

PGP - Un esempio di chiave pubblica

---BEGIN PGP PUBLIC KEY LOCK---

Version: 2.6.2i

mQBNAzdToVUAAAECALwsn2IkjKfKFN2WxilYM0V0Y79H2tNSHlvcRVAZiY3EYwkd

7eyy2d5Lhf2jKcGvL7GVjJoVGVQ2jFb9j+m/Dr0ABRG0BW1hcmlv=IPuu

---END PGP PUBLIC KEY BLOCK---