• No results found

SSL Protect your users, start with yourself

N/A
N/A
Protected

Academic year: 2021

Share "SSL Protect your users, start with yourself"

Copied!
51
0
0

Loading.... (view fulltext now)

Full text

(1)

SSL

Protect your users,

start with yourself

(2)

Overview

Introduction

Cryptographic algorithms

Secure Socket Layer

(3)

Introduction

Danger zone

✔ Eavesdropping ✔ IP spoofing ✔ Connection hijacking ✔ Tampering 

Countermeasures

✔ Data encryption ✔ Authentication

✔ Data integrity checks

(4)

Overview

Introduction

Cryptographic algorithms

Secure Socket Layer

(5)

Cryptographic Algorithms

Symmetric key encryption

Public key encryption

Hash functions

Message Authentication Codes

Digital Signatures

(6)

Symmetric key encryption

Sender (Alice) abc Encryption algoritm Shared key #%! Receiver (Bob) abc Shared key #%!

(7)

Symmetric key encryption

Pro's

✔ Fast

Con's

✔ Key must remain

secret

✔ Key exchange ✔ Key length

(8)

Symmetric key encryption

Common algorithms

✔ 3DES (112 bits)

✔ AES (>128 bits): Rijndael algorithm

− Developed at K.U.Leuven − Encryption standard in USA

(9)

Symmetric key encryption

Commands

✔ Encryptie

✔ Decryptie

$ openssl enc -aes-128-cbc -e -salt -in text.txt -out encryptedText.bin

(10)

Public key encryption

Sender (Alice) abc Encryption algoritm #%! Receiver (Bob) abc Public key Bob

#%!

(11)

Public key encryption

Pro's

✔ Privacy ✔ Key distribution 

Con's

✔ Slow ✔ Key length Performance

(12)

Public key encryption

Common algorithms

✔ RSA (> 1024 bits, 2048 bits recommended) ✔ DSA

(13)

Public key encryption

Commands

✔ Generate private key ✔ Generate public key ✔ Encrypt

✔ Decrypt

$ openssl genrsa -out rsaprivatekey.pem -passout pass:kulsysmn -aes-128-cbc 2048

$ openssl rsautl -encrypt -pubin -inkey rsapublickey.pem -in text.txt -out encryptedText.txt

$ openssl rsa -in rsaprivatekey.pem -passin pass:kulsysmn -pubout -out rsapublickey.pem

$ openssl rsautl -decrypt -inkey rsaprivatekey.pem -in encryptedText.txt -out text.txt

(14)

Hash functions

Sender (Alice)

abc Hash function Message digest A

Receiver (Bob)

(15)

Hash functions

Pro's

✔ Irreversible ✔ Small size 

Con's

✔ No authentication

(16)

Hash functions

Common algorithms

✔ MD5 (128 bit) ✔ SHA1 (160 bit) ✔ RIPEMD-160 

Usage

✔ Password storage ✔ Integrity checks

(17)

Hash functions

Commands

✔ Md5 ✔ sha1 $ openssl dgst -md5 text.txt MD5(text.txt)= ff3a4d858e65920dc67e9ef2977d4b8a

$ openssl dgst -sha1 text.txt

(18)

Sender (Alice)

Message Authentication Codes

abc

Hash function MAC A Shared key

Receiver (Bob)

abc

(19)

Message Authentication Codes

Pro's

✔ Fast

✔ Authentication

Con's

✔ Key must remain

secret

✔ Key exchange ✔ Key length

(20)

Digital signatures

abc Hash function Signature A Private key Alice

Public key Alice Sender (Alice)

(21)

Digital signatures

Pro's

✔ Authentication

Con's

✔ Very slow

First hash, then sign (eg eID)

(22)

Digital signatures

abc Hash function Signature A

Private key Alice

Message digest Hash function

600Mb

(23)

Digital signatures

Common algorithms

✔ RSA ✔ DSA 

Usage

✔ Authentication ✔ Integrity checks ✔ Software distributions

(24)

Overview

Introduction

Cryptographic algorithms

Secure Socket Layer

(25)

Secure Socket Layer

Situation

Handshake protocol

Trust

(26)

Situation

(27)

SSL

SSL

✔ Protocol independent

(eg: HTTP, POP3, IMAP, LDAP,...)

✔ SSL v3 = TLS v1

(Transport Layer Security)

(28)

Handshake protocol

4 phases

1.Establish security capabilities

2.Server Authentication and key exchange 3.Client Authentication and key exchange 4.Finish

(29)

Establish security capabilities

Client Server Client Hello Server Hello  Client Hello ✔ Highest SSL Version ✔ Supported algorithms ✔ Session ID (resume?)  Server Hello ✔ Selected SSL Version ✔ Selected algorithms ✔ Assigned session ID

(30)

Server Authentication and key exchange

Client Server

Certificate

Server hello done

 Certificate

✔ Certificate (+ chain)

 Server hello done

✔ Optionally request for client certificate

(31)

Client Authentication and key exchange

Client Server Certificate Certificate verify  Certificate ✔ Certificate (+ chain)  Certificate verify

(32)

Finish

 Client Finish

✔ Digest of previous commands

 Server Finish

✔ Digest of previous commands

 Symmetric key Client Server Client Finish Server Finish Symmetric key Encrypted data

(33)

Trust

It's all about trust...

✔ Certificate Authority (CA) ✔ Certificate chain

(34)

Certificate Authority

Certificate Authority Server Client CSR CSR CSR sign Client hello Server hello

(35)

Certificate chain

Root Certificate Authority A

(selfsigned) Certificate Authority B Certificate Authority C

signs signs

Server

(36)

Certificate chain

(37)

Certificate revocation

Private key compromised

Two possibilities

✔ Certificate Revocation List (CRL)

(38)

Certificate Revocation List

Certificate Authority Server Client CRL CRL CRL

(39)

Certificate Revocation List

Pro's

✔ Safe ✔ Offline 

Con's

✔ Compromised CA ✔ Latency ✔ Scaling − ΔCRL − LDAP

(40)

Certificate Revocation List

Certificate Authority Server Client LDAP LDAP lookup

(41)
(42)

Online Certificate Status Protocol

Certificate Authority Server Client OCSP responder - good - revoked - unknown

(43)

Online Certificate Status Protocol

Pro's

✔ Multiple CA ✔ Revoke CA 

Con's

✔ DoS ✔ Man-in-the-middle ✔ Latency ✔ Offline

(44)

Overview

Introduction

Cryptographic algorithms

Secure Socket Layer

(45)

Certificate signing service

BelNet SCS project

✔ Free service for educational institutions

(Not commercial!)

✔ Signed with “Cybertrust Educational CA”

− Root certificate “GTE Cybertrust Global root”

trusted in most browsers

✔ Server certificates (no personal certificates) ✔ Max 3 years

(46)

Certificate signing service

K.U.Leuven Proxy https://certificates.kuleuven.be Cybertrust Educational CA CSR CSR approve Formal confirmation

(47)
(48)

https://certificates.kuleuven.be

HOWTO create CSR

✔ OpenSSL (un*x or windows) ✔ IIS

✔ Java keytool

Required attributes

✔ C, O, CN

(49)

https://certificates.kuleuven.be

Multiple CN

✔ Server with multiple hosts ✔ Works in most browsers

(50)

References

 http://certificates.kuleuven.be  http://certificates.belnet.be  http://www.securityfocus.com/infocus/1818  http://nl.wikipedia.org/wiki/Advanced_Encryption_Standard  http://eid.belgium.be  http://www.openvalidation.org  Network security with openSSL

(51)

References

Related documents

The Enable OCSP Checking box allows you to enable or disable the Online Certificate Status Protocol (OCSP) verification for the client certificate to verify that the certificate

The RQ-7B Shadow Tactical Unmanned Aerial System (TUAS) fielded organically in the Attack Reconnaissance Squadron The RQ-7B Shadow Tactical Unmanned Aerial System (TUAS)

Cisco IOS Software Release 12.3(2) T introduces support for Online Certificate Status Protocol (OCSP), which offers an online mechanism for determining certificate validity without

Configure the CA to issue an OCSP Response Signing Certificate 19 Configure the CA to support the Online Responder service 20 Request a certificate from OCSP Response Signing

For key database content, select Personal Certificate, and then click Receive to receive the signed certificate (Server Certificate) to protect the WebSEAL in SSL mode

If an external certificate authority (CA) signed the certificate and the firewall uses the Open Certificate Status Protocol (OCSP) to verify certificate revocation status,

Root CA certificate Subordinate CA certificates Identity certificate Encryption certificate Component certificate Code signing certificate OCSP responder

Better decisions in certificate revocation online ocsp checking revocation check did not follow the client needs to determine whether a different product such as revoked before