The transport layer security protocol (TLS) Flashcards
What is TLS?
Cryptographic services protocol based on Public Key Infrastructure (PKI)
Runs primarly over TCP
Consist of 3 higher-level protocols
What is TLS often used for?
To allow browsers to establish secure sessions with web servers
What 3 higher level protocols does TCP consist of?
TLS handshake protocol to set up session
TLS alert protocol to signal events such as failures
TLS change cipher spec protocol to change the cryptographic algorithms
What are the layers of the TLS: Protocol stack?
Handshake - Change cipher spec - alert - http or other
TLS record protocol
TCP
IP
What does the TLS alert protocol do?
Handles connections by sending an “alert” message of various degrees of severity
What are the three types of alerts in the alert protocol?
Warning alerts
close_notify alert
fatal alerts
What can happen if we have improper handling of alert messages?
Truncation attacks
What does the change cipher spec protocol do?
Normally used after handshake to indicate commencement of secure traffic
What does TLS ciphersuites do?
Specify the public key algorithms used in handshake, and symmetric algo used in record protocol
Describe the TLS_RSA_WITH_3DES_EDE_CBC_SHA cipher suite
Key exchange uses RSA to encrypt a secret chosen by the client
Triple DES (enc-dec-enc) in CBC mode used for encryption
SHA-1 used for the HMAC for data integrity
What 2 services does the record protocol provide in TLS?
Message confidentiality: Ensure message content cannot be read in transit
Message integrity:Ensure receiver can detect if a message is modified in transit
How does the record protocol provide the 2 services?
A symmetric encryption algorithm and a MAC
Describe the record protocol format
Header: Content type, major version, minor version, length
Plaintext (optionally compressed): encrypted
MAC (not a separate field if AEAD is used): encrypted
What is the Content Type field in the record protocol header?
Defines content types. The defined ones are:
- change-cipher-spec
- alert
- handshake
- application data
What is the length field in the record protocol header?
Length in octets of the data
What are the operations of the record protocol (6)?
Fragmentation
Compression: optionally applied
Authenticated data
Plaintext: Compressed data and the MAC, if present
Session keys for MAC and encryption algorithms are established during handshake protocols
Encryption and MAC algorithms are specified in the negotiated ciphersuite
What is fragmentation in the record protocol?
Each application layer message is fragmented into blocks of 2^14 bytes or less
What is authenticated data in the record protocol?
Consist of the (compressed) data, header, and an implicit record sequence number
What crypto algorithms are used in the record protocol?
MAC: HMAC, SHA-2 allowed in TLS 1.2
Enc: Either a block in CBC, or stream cipher
AEAD: Allowed instead of enc and MAC in TLS 1.2
What is the purpose of the handshake protocol?
Negotiates the TLS version and crypto algos to be used
Establishes shared session key for use in record protocol
Auths server
Auths client (optional)
Completes session establishment
Name 4 versions of the TLS handshake
RSA variant (supported, but not recommended)
Diffie-Hellman (recommended)
Pre-shared key variant
Mutual authentication or server only authentication
What are the 4 phases of the TLS handshake protocol?
1: Initiates the logical connection and establishes its security capabilites
2 and 3: Performs key exchange with messages and message content depending on the handshake variant negotiated in phase 1
4: Completes the setting up of a secure connection
What happens during phase 1 of the TLS handshake?
Client and server negotiates version, cipher suite and compression. Exchanges nonces
What happens during phase 2 of the TLS handshake?
Server sends certificate and key exchange message (if it is needed)
What happens during phase 3 of the TLS handshake?
Client sends certificate and key exchange message
What happens during phase 4 of the TLS handshake?
Client and server starts secure communications
How does the RSA-based TLS handshake work?
The simplest variation has server-only authentication and the server has a public key suitable for RSA encryption
On completion of phase 1, assume that RSA-based key exchange has been selected