10/11 - Transport Layer Security Flashcards
SSL
Secure Sockets Layer
TLS
Transport Layer Security
WHich of SSL and TLS is recommended?
TLS
SSL is deprecated.
Services provided by TLS
- Confidentiality (symmetric crypto; keys negotiated with public-key)
- Server authentication (certificate, signature)
- Client authentication (optional)
- Data integrity (MAC included)
- Replay prevention
TLS is where in the protocol stack?
Between the application and transport layers
TLS sub-protocols
- Handshake
- Change Cipher
- Alert
- Record (below the other three in layers)
TLS Handshake Protocol
At the beginning:
- client/server agree on which crypto algo to use
- establish secret keys
- authenticate server
- authenticate client (optional)
TLS Handshake clientHello
- Protocol version
- Random number (nonce): to prevent replay
- Cipher suite, algos supported in order of pref:
- key exchange
- for authenticated symmetric encryption
- for signatures
- key (DH key shares or labels of pre-shared keys)
TLS Handshake ServerHello
- highest protocol version supported by both
- random number (diff from ClientHello)
- Ciphersuite: algos chosen by server
- Key (One DH key share w/ same params or pre-shared)
TLS Handshake Auth phase
- Server sends X.509 certificate(s) of server. Client checks.
- Server sends signature on all data so far
- finished: MAC on all handshake data so far
Example of ephemeral DH in TLS Handshake
ClientHello
- send id from list of acceptable primes/primitive elements from spec
- chooses a private exponent a (each session) then sends g^a mod p to the server
ServerHello
- Server chooses a private exponent b and sends g^b mod p to client
TLS Handshake secret keys required
- Client and server keys for MAC
- client write key, client write IV
- server write key, server write IV
( two symmetric pairs)
HKDF
Hash based Key Derivation Function
Input:
- Shared secret (from DH exch or PSK pre-shared key)
- Data from client hello and server hello
- pre-define strings specific to each key or IV
- For IV for app data packets, the sequence number of the packet
Apply the hash function several times
Replay Prevention (TLS)
Server creates new keys on new connection so replays wont work.
TLS Record Protocol provides
- confidentiality (symmetric encryption)
- message integrity by using auth encryption