Transport Layer Security: TLS/SSL and Certificates (CS 642)
Earlence Fernandes
earlence@cs.wisc.edu
* Some slides are borrowed from Clarkson, Shmatikov, Jana
UW-Madison 1
TLS/SSL and Certificates (CS 642) Earlence Fernandes - - PowerPoint PPT Presentation
Transport Layer Security: TLS/SSL and Certificates (CS 642) Earlence Fernandes earlence@cs.wisc.edu * Some slides are borrowed from Clarkson, Shmatikov, Jana UW-Madison 1 Internet: The network of computers History - Started as (D)ARPANET
* Some slides are borrowed from Clarkson, Shmatikov, Jana
UW-Madison 1
UW-Madison 2
computers
connect different isolated networks
starting of the Web
Source: https://www.internetsociety.org/internet/history-internet/brief-history-internet/
UW-Madison 3
UW-Madison 4
routers, his own websites, can listen to any packet, modify packets in transit, inject his
Alice Bob Eve
UW-Madison 5
UW-Madison 6
OSI – Open Systems Internet, just a model
https://techdifferences.com/difference-between-tcp-ip-and-osi-model.html
Web Security Network Security TLS IPSec
algorithms)
UW-Madison 7
UW-Madison 8
TLS consists of tw two protocols
the client and the server
confidentiality, integrity, and authenticity of data exchange between the client and the server
UW-Madison 9 Source: https://hpbn.co/transport-layer-security-tls/
Client Server
UW-Madison 10
Client Server
ClientHello
Client announces (in plaintext):
UW-Madison 11
struct { ProtocolVersion client_version; Random random; SessionID session_id; CipherSuite cipher_suites<2..2^16-2>; CompressionMethod compression_methods<1..2^8-1>; select (extensions_present) { case false: struct {}; case true: Extension extensions<0..2^16-1>; }; } ClientHello; Session id (if the client wants to resume an old session)
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
UW-Madison 12
Protocol Key Exchange Algorithm Authentication Algorithm Encryption Algorithm MAC
UW-Madison 13
Client Server
ClientHello ServerHello
Server responds (in plaintext) with:
client and the server
those offered by the client
UW-Madison 14
Client Server
ClientHello ServerHello ServerKeyExchange
Server sends its public key certificate
UW-Madison 15
Client Server
ClientHello ServerHello ServerKeyExchange ClientKeyExchange
struct { select (KeyExchangeAlgorithm) { case rsa: EncryptedPreMasterSecret; case diffie_hellman: ClientDiffieHellmanPublic; } exchange_keys } ClientKeyExchange; struct { ProtocolVersion client_version;
} PreMasterSecret
UW-Madison 16
Random bits from which symmetric keys will be derived (by hashing them with nonces)
Where does randomness come from?
UW-Madison 17
#ifndef PURIFY MD_Update(&m,buf,j); /* purify complains */ #endif
Without this line, the seed for the pseudo-random generator is derived only from process ID
Result: all keys generated using Debian-based OpenSSL package in 2006-08 are predictable
18
Key agreement protocol, both A and B contribute to the key Setup: p prime and g generator of Zp*, p and g public.
K = (gb mod p)a = gab mod p ga mod p gb mod p K = (ga mod p)b = gab mod p Pick random, secret (a) Compute and send ga mod p Pick random, secret (b) Compute and send gb mod p
* From Clarkson
* From Clarkson 19
ga mod n gb mod n gc mod n gc mod n
Alice computes gac mod n and Bob computes gbc mod n !!!
CAlice, ga mod n, SignAlice(ga mod n) CBob, gb mod n, SignBob(gb mod n)
UW-Madison 20
Client Server
ClientHello ServerHello ServerKeyExchange ClientKeyExchange
UW-Madison 21
UW-Madison 22
UW-Madison 23
24
by others
the vendors: VeriSign, Thawte, and many many others
UW-Madison 25
$ openssl req -new
Asks a bunch of details, including organization, city, state, country, etc. Most interesting one is Co Common Name Can be:
www.google.com, secure.website.org, *.domain.net, etc.
26
UW-Madison 27
root Cas
UW-Madison 28
UW-Madison 29
UW-Madison 30
HTTPS Lock: What does it guarantee?
website is indeed from “en.wikipedia.org”
transit.
UW-Madison 31
Why?
UW-Madison 32
How
Protocol (OCSP)
UW-Madison 33