Chapter 17 - TLS
Chapter 17 - TLS
Chapter 17 - TLS
TLS
It is one of the most widely used security
services.
SSL is a general-purpose service implemented
as a set of protocols that rely on TCP.
Here, there are two implementation choices. For
full generality, SSL (or TLS) could be provided
as part of the underlying protocol suite and
therefore be transparent to applications.
Alternatively, SSL can be embedded in specific
packages.
TLS Architecture
SSL is designed to make use of TCP to provide a reliable end-to-end secure service.
SSL is not a single protocol but rather two layers of protocols.
The SSL Record Protocol provides basic security services to various higher-layer protocols.
Three higher-layer protocols are defined as part of SSL:
a. the Handshake Protocol
b. The Change Cipher Spec Protocol
c. the Alert Protocol.
Two important TLS concepts are the TLS session and the TLS
connection
“
Connection
• A connection is a transport that provides a suitable type of
service.
• For TLS, such connections are peer-to-peer relationships.
Session:
• A TLS session is an association between a client and a
server.
• Sessions are created by the Handshake Protocol.
• Sessions define a set of cryptographic security parameters
which can be shared among multiple connections.
A session is defined by the following parameters:
• Session identifier: An arbitrary byte sequence chosen by the server
to identify an active or re-sumable session state.
• Peer certificate: An X509.v3 certificate of the peer. This element of
the state may be null.
• Compression method: The algorithm used to compress data prior to
encryption.
• Cipher spec: Specifies the bulk data encryption algorithm and a
hash algorithm used for MAC calculation.
• Master secret: 48-byte secret shared between the client and the
server.
• Is resumable: A flag indicating whether the session can be used to
initiate new connections.
A connection state is defined by the following parameters:
• Server and client random: Byte sequences that are chosen by the
server and client for each connection.
• Server write MAC secret: The secret key used in MAC operations on
data sent by the server.
• Client write MAC secret: The secret key used in MAC operations on
data sent by the client.
• Server write key: The secret encryption key for data encrypted by the
server and decrypted by the client.
• Client write key: The symmetric encryption key for data encrypted by
the client and decrypted by the server.
Version Number:
● The transport layer record format is same
as that of SSL (i.e secure socket layer).
● Major difference is just their version values .
Message authentication code:
● Transport layer security uses HMAC algorithm.
● The following illustration shows how the HMAC function works:
insufficient_security: Negotiation has failed specifically because the server requires ciphers
more secure than those supported by the client.
no_renegotiation: This alert indicates that the sender is not able to renegotiate. This message
is always a warning.
Cipher Suites:
There are several small differences
between the cipher suites available under
SSLv3 and under TLS:
As with the finished message in SSLv3, the finished message in TLS is a hash based
on the shared master_secret, the previous handshake messages, & a label that identifies
client or server. we have
PRF(master_secret,finished_label,MD5(handshake_messages)|| SHA-
1(handshake_messages))
where finished_label is the string “client finished” for the client and “server finished”
for the server.
Cryptographic Computations:
The pre_master_secret for TLS is calculated in the same way as in SSLv3. As in SSLv3,
the master_secret in TLS is calculated as a hash function of the pre_ master_secret and
the two hello random numbers.
The form of the TLS calculation is different from that of SSLv3
master_secret = PRF(premaster_secret,“ master secret",ClientHello.random ||
ServerHello.random)
The algorithm is performed until 48 bytes of pseudorandom output are produced.
Padding:
● In SSL, the padding added prior to encryption of
user data is the minimum amount required so
that the total size of the data to be encrypted is a
multiple of the cipher’s block length.
● In TLS, the padding can be any amount that
results in a total that is a multiple of the cipher’s
block length, up to a maximum of 255 bytes.
● A variable padding length may be used to
frustrate attacks based on an analysis of the
lengths of exchanged messages.