10SSL
10SSL
10SSL
EJ Jung
10/18/10
ke
y
?
private key
Alice
Bob
public key
! Public-key certificate
Signed statement specifying the key and identity
sigAlice(Bob, PKB)
Hierarchical Approach
! Single CA certifying every public key is impractical
! Instead, use a trusted root authority
For example, Verisign
Everybody must know the public key for verifying root
authoritys signatures
I trust
Alice
Alice
Friend of Alice
Friend of friend
Bob
X.509 Version 1
Alice, sigAlice(TimeAlice, Bob,
encryptPublicKey(Bob)(message))
Alice
Bob
Alice
Bob
Charlie, sigCharlie(TimeCharlie, Bob,
encryptPublicKey(Bob)(password))
Denning-Sacco Protocol
Certificate server
Alice, Bob
certAlice, certBob
Im Alice, certAlice, certBob,
encryptPublicKey(Bob)(sigAlice(TimeAlice, KAB))
Alice
Bob
Attack on Denning-Sacco
Nothing in this
signature says that it
was sent to Bob!
Im Alice, certAlice, certBob,
encryptPublicKey(Bob)(sigAlice(TimeAlice, KAC))
Im Alice, certAlice,
certCharlie,
encryptPublicKey(Charlie)(
sigAlice(TimeAlice, KAC))
Alice
Charlie
Bob
PUBLIC
KEY
I am Alice
fresh random challenge C
Alice
sigAlice(C)
Bob
Mafia-in-the-Middle Attack
PRIVATE
KEY K
Picture 143!
Prove your age
by signing X
sigK(x)
customer
XXX
Adult
entertainment
Over 21 only!
Buy 10
gold coins
Sign X
sigK(x)
Bank
encryptPublicKey(Bob)(Alice, KAB)
fresh random number
encryptKAB(NB)
Alice
encryptKAB(Alice, sigAlice(NB))
Bob
encryptPK(Bob)(Alice,KCB)
encryptKCB(NB)
encryptKAC(NB)
Alice
encKAC(Alice, sigAlice(NB))
Charlie
encryptKCB(Alice, sigAlice(NB))
Bob
slide 18
Application-Level Protection
application
presentation
session
transport
network
data link
RPC
TCP
IP
802.11
physical
slide 19
! SSL 2.0
Published by Netscape, November 1994
Several weaknesses
! SSL 3.0
Designed by Netscape and Paul Kocher, November 1996
! TLS 1.0
Internet standard based on SSL 3.0, January 1999
Not interoperable with SSL 3.0
TLS uses HMAC instead of MAC; can run on any port
slide 20
slide 21
slide 22
TLS Basics
! TLS consists of two protocols
Familiar pattern for key exchange protocols
! Handshake protocol
Use public-key cryptography to establish a shared
secret key between the client and the server
! Record protocol
Use the secret key established in the handshake
protocol to protect communication between the client
and the server
[Certificate],
ClientKeyExchange,
[CertificateVerify]
switch to negotiated cipher
Finished
ClientHello
ClientHello
slide 26
ClientHello (RFC)
Highest version of the protocol
struct {
supported by the client
ProtocolVersion client_version;
Session id (if the client wants to
Random random;
resume an old session)
SessionID session_id;
Set of cryptographic algorithms
supported by the client (e.g.,
CipherSuite cipher_suites;
RSA or Diffie-Hellman)
CompressionMethod compression_methods;
} ClientHello
slide 27
ServerHello
C, Versionc, suitec, Nc
ServerHello
slide 28
ServerKeyExchange
C, Versionc, suitec, Nc
Versions, suites, Ns,
ServerKeyExchange
slide 29
ClientKeyExchange
C, Versionc, suitec, Nc
Versions, suites, Ns,
sigca(S,Ks),
ServerHelloDone
ClientKeyExchange
slide 30
ClientKeyExchange (RFC)
struct {
select (KeyExchangeAlgorithm) {
case rsa: EncryptedPreMasterSecret;
case diffie_hellman: ClientDiffieHellmanPublic;
} exchange_keys
} ClientKeyExchange
struct {
ProtocolVersion client_version;
Random bits from which
opaque random[46];
symmetric keys will be derived
(by hashing them with nonces)
} PreMasterSecret
slide 31
{Secretc}Ks
If the protocol is correct, C and S share
some secret key material (secretc) at this point
switch to key derived
from secretc, Nc, Ns
{Secretc}Ks
Chosen-Protocol Attacks
! Why do people release new versions of security
protocols? Because the old version got broken!
! New version must be backward-compatible
Not everybody upgrades right away
Embed version
number into secret
{Versionc,Secretc}Ks
slide 37