Computer Cryptografie en PKI “Xbboajoojhf Xjtlvoef” Lex Zwetsloot Csite “Xbboajoojhf...

Preview:

Citation preview

Computer Cryptografie

enPKI

Computer Cryptografie

enPKI

“Xbboajoojhf Xjtlvoef”

Lex ZwetslootCsite

“Xbboajoojhf Xjtlvoef”

Lex ZwetslootCsite

Onderwerpen

• Doel van Computercryptografie• Bouwstenen • Symmetrische Encryptie/Decryptie• Oplossing van het Key-distributieprobleem• Asymmetrische Encryptie/Decryptie• Hash-functies• Certificaten• Toepassing Certificaten• Meer weten…

Doel ComputercryptografieCryptografie wordt ingezet om de volgende doelen te realiseren:

Vertrouwelijkheid (Confidentiality)Het vertrouwelijk behandelen van gegevens bij transport en opslag (Digital sealing)

Identificatie en Authenticatievan gebruikers, computers en computerservices

Integriteit van Data Garantie van authenticiteit (Digital signing)

Bewijslast over verrichte transactiesOnweerlegbaarheid of Non-repudiation

Bouwstenen Computercryptografie

• Symmetrische of “Secret Key” Algoritmen• Asymmetrische of “Public Key” Algoritmen• Hash-functies

• CA’s en Certificaten

Protocollen, Algoritmen en Keys• Protocol:

- Gestandaardiseerde wijze van behandeling (transport en overdracht) van cryptografisch materiaal. Een protocol kan uit meerdere algoritmen zijn samengesteld.

• Algoritme:- Wiskundige wijze waarop versleuteling/ontsleuteling plaatsvindt- Openbaar en gestandaardiseerd

• Key:- Variabele die, samen met de klare tekst en het algoritme, de cijfertekst oplevert (v.v.)- De geheime component bij

* Secret Key of symmetrische algoritmen

* De private key bij asymmetrische algoritmen

Schema Symmetrische Encryptie

Eigenschappen Symmetrische Encryptie

• Eén sleutel voor ver- en ontcijfering

• Voordelen:- Snel algoritme; Beperkte processorbelasting; geschikt voor grote hoeveelheden data, ook streaming

• Nadelen:- Sleuteldistributie !!!- Alleen bij grote sleutellengtes voldoende beschermd tegen “exhaustive search” attacks

Symmetrische Encryptie (2)Algoritmen die gebruik maken van Symmetrische Encryptie

(Secret Key of Shared Secret):• DES• DESX• 3DES• CAST• BlowFish• FEAL• IDEA

Oplossing voor het sleuteldistributieprobleem: Principe Diffie-Hellman Key-Exchange

Diffie-Hellman Group

Zwakte in Diffie-Hellman Key-Exchange

• Geen “Proof of Identity”• Geen bescherming tegen

“(Wo)man in the middle” - attacks

Asymmetrische Encryptie• Ingewikkelde wiskunde;

hoge processorbelasting, daardoor alleen geschikt voor kleine hoeveelheden gegevens. (passwords, Credit Cardnummer etc.)

• Gebruikt grote sleutellengtes: 512, 1024 of 2048 bits.

• Verschillende algoritmen:- RSA, - DSA/DSS(NSA), - ElGamal

Asymmetrische Encryptie (2)

Voorbeeld:RSA met complementaire sleutels (basis van PKI)

Asymmetrische Encryptie (3): Principe van RSA

Asymmetrische Encryptie (4): RSA Sealing

Hash-functies

• Hashing algoritme produceert een message-digest (hash) van een bericht

• Hash bevat geen gegevens uit het bericht• Drie gangbare algoritmen:

- MD4 ; levert 128 bits hash- MD5 ; levert 128 bits hash- SHA ; levert 160 bits hash

• Langere hash-value verkleint kans op “collision”

Toepassing Hashfuncties

• Digitale Handtekeningen (Signing)• NTLM, Challenge/Response• HMAC (RFC 2202)• CHAP, MS-CHAP, MS-CHAP2

RSA+Hashing:Digital Signatures: “Signing”

(PKI) Certificaten

Doel:• Authenticatie:

Koppelen van een Public Key aan een persoon, computer of service

Benodigd:• Een trusted (third) party, de Certificate

Authority• PKI - Aware toepassingen

(Iexplore, Outlook, -Express)

Public Key Infrastructure

• Top van PKI-organisatie is de Root CA:- Publieke CA’s, bijv.: Verisign, Thawte- Enterprise of Privé CA’s

• Root CA maakt z’n eigen Master Keypair en (Self-Signed) Root Certificate

• Subordinate CA’s op diverse locaties• CA publiceert ook CRL en CDP

(Certificate Revocation List, CRL Distribution Point)

Public Key Infrastructure

Installatie van de

Root Certification Authority (Root-CA)

PKI: Installatie CA

CSP

Version: X.509 V3Issued to: Acme-Root CAIssued by: Acme-Root CAValid from: 01-01-2006Valid until: 01-01-2031Key Usage: AuthenticationSerial No: 32 88 8e 9a d2 ..Subject: Acme-Root CAPublic Key: RSA (1024 bits)Hash algorithm: MD5

Bf 9c 0d 32 bd 5c 88 20 1a 08

01 07 bc 59 90 1c 2b 3e 77 ..

MD5-hashvan data in

pseudo-certificaat met Public Key

Met Private Key versleutelde hash-value;

De “Thumbprint”

De Cryptographic Service Provider (CSP) van Windows genereert een

keypair (Private- en Public Key)

Voorbeeld van de omvang van een 1024-bits Public Key

Attributen worden aan de Public Key

toegevoegd

Version: X.509 V3Issued to: Acme-Root CAIssued by: Acme Root CAValid from: 01-01-2006Valid until: 01-01-2031Key Usage: AuthenticationSerial No: 32 88 8e 9a d2 ..Subject: Acme-Root CAPublic Key: RSA (1024 bits)Hash algorithm: MD5

Bf 9c 0d 32 bd 5c 88 20 1a 08

01 07 bc 59 90 1c 2b 3e 77 ..

PKI: Installatie CA

PKI: Installatie CA

Version: X.509 V3Issued to: Acme-Root CAIssued by: Acme Root CAValid from: 01-01-2006Valid until: 01-01-2031Key Usage: AuthenticationSerial No: 32 88 8e 9a d2 ..Subject: Acme-Root CAPublic Key: RSA (1024 bits)Hash algorithm: MD5

01 07 bc 59 90 1c 2b 3e 77 ..

PKI: Installatie CA

Version: X.509 V3Issued to: Acme-Root CAIssued by: Acme Root CAValid from: 01-01-2006Valid until: 01-01-2031Key Usage: AuthenticationSerial No: 32 88 8e 9a d2 ..Subject: Acme-Root CAPublic Key: RSA (1024 bits)Hash algorithm: MD5

01 07 bc 59 90 1c 2b 3e 77 ..

Version: X.509 V3Issued to: Acme-Root CAIssued by: Acme Root CAValid from: 01-01-2006Valid until: 01-01-2031Key Usage: AuthenticationSerial No: 32 88 8e 9a d2 ..Subject: Acme-Root CAPublic Key: RSA (1024 bits)Hash algorithm: MD5

01 07 bc 59 90 1c 2b 3e 77 ..

CA Root Certificate

PKI: Installatie CA

PKI: Distributie van Root Certificate

Export en distributie van root-certificaat in de vorm van *.cer

bestand. (formaat: pkcs#7)

Acme Root CA

PKI: Distributie van Root Certificate

Alle computers waarop een kopie van het Root CA

Certificaat is geïnstalleerd zien deze CA nu als een vertrouwde

instantie

Acme Root CA

Public Key Infrastructure

Aanvraag van een SSL Webserver-Certificaat

PKI: Aanvraag SSL Certificaat

http://www.abc.com

CSP

CERTIFICATE REQUESTKey Usage: SSL - Auth.Company: ABC Corp.Department: IT-ServicesState: MACity: BostonCommon Name: www.abc.comPublic Key: RSA (1024 bits)

Acme Root CA

http://www.abc.com

CERTIFICATE REQUESTKey Usage: SSL - Auth.Company: ABC Corp.Department: IT-ServicesState: MACity: BostonCommon Name: www.abc.comPublic Key: RSA (1024 bits)

ac 2e 9d 01 ec 79 88 20 1a 08

2b 12 0f 28 ec 4c 2f 39 d7 ..

PKI: Aanvraag SSL Certificaat

http://www.abc.com

CERTIFICATE REQUESTKey Usage: SSL - Auth.Company: ABC Corp.Department: IT-ServicesState: MACity: BostonCommon Name: www.abc.comPublic Key: RSA (1024 bits)

2b 12 0f 28 ec 4c 2f 39 d7 ..

PKI: Aanvraag SSL Certificaat

http://www.abc.com

CERTIFICATE REQUESTKey Usage: SSL - Auth.Company: ABC Corp.Department: IT-ServicesState: MACity: BostonCommon Name: www.abc.comPublic Key: RSA (1024 bits)

2b 12 0f 28 ec 4c 2f 39 d7 ..

CERTIFICATE REQUESTKey Usage: SSL - Auth.Company: ABC Corp.Department: IT-ServicesState: MACity: BostonCommon Name: www.abc.comPublic Key: RSA (1024 bits)

2b 12 0f 28 ec 4c 2f 39 d7 ..

PKI: Aanvraag SSL Certificaat

CERTIFICATE REQUESTKey Usage: SSL - Auth.Company: ABC Corp.Department: IT-ServicesState: MACity: BostonCommon Name: www.abc.comPublic Key: RSA (1024 bits)

2b 12 0f 28 ec 4c 2f 39

http://www.abc.com

CERTIFICATE REQUESTKey Usage: SSL - Auth.Company: ABC Corp.Department: IT-ServicesState: MACity: BostonCommon Name: www.abc.comPublic Key: RSA (1024 bits)

2b 12 0f 28 ec 4c 2f 39 d7 ..

PKI: Aanvraag SSL Certificaat

CERTIFICATE REQUESTKey Usage: SSL - Auth.Company: ABC Corp.Department: IT-ServicesState: MACity: BostonCommon Name: www.abc.comPublic Key: RSA (1024 bits)

2b 12 0f 28 ec 4c 2f 39

http://www.abc.com

CERTIFICATE REQUESTKey Usage: SSL - Auth.Company: ABC Corp.Department: IT-ServicesState: MACity: BostonCommon Name: www.abc.comPublic Key: RSA (1024 bits)

2b 12 0f 28 ec 4c 2f 39

PKI: Aanvraag SSL Certificaat

http://www.abc.comhttps://www.abc.com

PKI: Aanvraag SSL Certificaat

Public Key Infrastructure: Client sessie met SSL-Website

PKI: Client sessie met SSL-Website

https://www.abc.com

Client in bezit van kopie CA-Root

Certificate

Get https://www.acme.com

Send certificate

https://www.abc.com

CERTIFICATEIssued to: ABC.comIssued by: Acme Root CAKey Usage: SSL - Auth.Company: ABC Corp.Department: IT-ServicesState: MACity: BostonCommon Name: www.abc.comPublic Key: RSA (1024 bits)

2b 12 0f 28 ec 4c 2f 39 d7 ..

PKI: Client sessie met SSL-Website

https://www.abc.com

CERTIFICATEIssued to: ABC.comIssued by: Acme Root CAKey Usage: SSL - Auth.Company: ABC Corp.Department: IT-ServicesState: MACity: BostonCommon Name: www.abc.comPublic Key: RSA (1024 bits)

2b 12 0f 28 ec 4c 2f 39 d7 ..3b 9c 01 bf 77 d3 21 fc ..

3b 9c 01 bf 77 d3 21 fc ..

Public Key uit ‘Trusted’ Root Certificate van Acme Root CA

Er is een ‘match’ tussen de meegezonden, -encrypted- hash (de thumbprint) en de

hérberekende hash;De webserver kan het certificaat dus alleen

van Acme Root CA hebben verkregen!!!

PKI: Client sessie met SSL-Website

https://www.abc.com

CERTIFICATEIssued to: ABC.comIssued by: Acme Root CAKey Usage: SSL - Auth.Company: ABC Corp.Department: IT-ServicesState: MACity: BostonCommon Name: www.abc.comPublic Key: RSA (1024 bits)

2b 12 0f 28 ec 4c 2f 39 d7 ..3b 9c 01 bf 77 d3 21 fc ..

3b 9c 01 bf 77 d3 21 fc ..

Er is een ‘match’ tussen de meegezonden, -encrypted- hash (de thumbprint) en de

hérberekende hash;De webserver kan het certificaat dus alleen

van Acme Root CA hebben verkregen!!!

PKI: Client sessie met SSL-Website

PKI: Client sessie met SSL Website Key-Exchange

PKI: Key-Exchange

https://www.abc.com

CSP

Symmetrische (DES) Key, aangemaakt

door CSP van client PC

Public Key van www.abc.com

https://www.abc.com

PKI: Key-Exchange

https://www.abc.com

Beide partijen beschikken nu over dezelfde symmetrische DES Key

PKI: Key-Exchange

PKI: Confidential Data Exchange(Zeer snel!!)

PKI: Confidential Data Exchange

https://www.abc.comCredit card No: 1124 4523 2514 7896 Credit card No: 1124 4523 2514 7896

(SSL) Enter Credit Card No(SSL) Enter Credit Card No

Public Key Infrastructure

• CAPolicy.inf voor installatie Root CA om:- CDP en CPS in Root-Certificate te plaatsen

• Root CA meestal Stand-Alone• Subordinates meestal Enterprise (AD)

Root CA

Certificaten (2)

Bevatten o.m. de volgende onderdelen:

• De Naam van de aanvrager; “Issued To …”• De Naam van de verstrekker (CA) “Issued by …” • De Public Key van de aanvrager• Een geldigheidsperiode “Valid from … to …”• Doel van het Certificaat: EFS, E-mail, Verificatie• Een hash-value van het certificaat, versleuteld met

de Private Key van de CA. (Digitale handtekening van CA)

Certificaten(3)

Twee typen certificaten in omloop:• Version 1:

-Windows 2000/2003/XP-Vaste layout (template)

• Version 2:-Alleen Windows 2003/XP-Vaste- en “Custom” templates-Geschikt voor Auto-enrollment

Toepassing Certificaten

• E-mail: S/MIME (Sealing/Signing)POP3 + SSLIMAP4 + SSL(E)SMTP + TLS

• Authenticatie: Kerberos v.3/X.509• Beveiligde Webpagina’s: HTTPS (SSL/TLS)• Beveiligde TCP/IP: IPSec• Encrypted File System: EFS• VPN’s (IPSec)• Port-based Authenticatie 802.1x

Meer Weten ? …

• RSA-Security:www.rsasecurity.com/faq

• CODE-book: www.simonsingh.net

• KU-Brussel: www.kubrussel.ac.be/Wsetew

RFC’s

Vragen???

Recommended