0% found this document useful (0 votes)
3K views3 pages

SSL Architecture

SSL provides security for TCP connections through the use of two main protocols: the SSL record protocol and the SSL handshake protocol. The SSL record protocol fragments data, compresses it, applies a MAC for integrity, encrypts it, and adds a header. It provides data confidentiality and integrity. The SSL handshake protocol negotiates security parameters and authenticates clients and servers to establish an SSL session for future secure connections. An SSL session allows parameters to be reused across multiple SSL connections between a client and server.

Uploaded by

Rokonuzzaman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views3 pages

SSL Architecture

SSL provides security for TCP connections through the use of two main protocols: the SSL record protocol and the SSL handshake protocol. The SSL record protocol fragments data, compresses it, applies a MAC for integrity, encrypts it, and adds a header. It provides data confidentiality and integrity. The SSL handshake protocol negotiates security parameters and authenticates clients and servers to establish an SSL session for future secure connections. An SSL session allows parameters to be reused across multiple SSL connections between a client and server.

Uploaded by

Rokonuzzaman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SSL architecture, SSL protocol stack, SSL record protocol, SSL record format.

SSL: Secure Socket Layer (SSL) is designed to make use of TCP to provide a reliable end-to-end secure
service. SSL builds a secure connection between two sockets for:

Parameter negotiation between client and server


Mutual authentication of client and server
Secret communication
Data integrity protection

SSL is not a single protocol but rather two layers of protocols, as illustrated in the following figure:

Fig-1: SSL Protocol Stack

The SSL Record Protocol provides basic security services to various higher-layer protocols. In
particular, the Hypertext Transfer Protocol (HTTP), which provides the transfer service for Web
client/server interaction, can operate on top of SSL.
Three higher-layer protocols are defined as part of SSL: the Handshake Protocol, The Change
Cipher Spec Protocol, and the Alert Protocol.

Two important SSL concepts are the SSL session and the SSL connection, which are defined in the
specification as follows:

Connection: A connection is a transport (in the OSI layering model definition) that provides a suitable
type of service. For SSL, such connections are peer-to-peer relationships. The connections are transient.
Every connection is associated with one session. 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 conventional encryption key for data encrypted by the server and decrypted
by the client.
Client write key: The conventional encryption key for data encrypted by the client and decrypted
by the server.

Session: An SSL 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. Sessions are used to avoid the expensive negotiation of new security
parameters for each connection. A session state is defined by the following parameters (definitions taken
from the SSL specification):
Session identifier: An arbitrary byte sequence chosen by the server to identify an active or
resumable 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 (such as null, AES, etc.) and a hash
algorithm (such as MD5 or SHA-1) used for MAC calculation. It also defines cryptographic
attributes such as the hash_size.
Master secret: 48-byte secret shared between the client and server.
Is resumable: A flag indicating whether the session can be used to initiate new connections.
SSL Record Protocol: Two services for SSL connections:
Confidentiality: The Handshake Protocol defines a shared secret key that is used for conventional
encryption of SSL payloads.
Message Integrity: The Handshake Protocol also defines a shared secret key that is used to form a
message authentication code (MAC).

Fig-2: SSL Record Protocol Operation

Figure-27 indicates the overall operation of the SSL Record Protocol. The Record Protocol takes an
application message to be transmitted, fragments the data into manageable blocks, optionally compresses
the data, applies a MAC, encrypts, adds a header, and transmits the resulting unit in a TCP segment.
Received data are decrypted, verified, decompressed, and reassembled and then delivered to higher-level
users.
The first step is fragmentation. Each upper-layer message is fragmented into blocks of 214 bytes
(16384 bytes) or less.
Next, compression is optionally applied. Compression must be lossless and may not increase the
content length by more than 1024 bytes. In SSLv3 (as well as the current version of TLS), no
compression algorithm is specified, so the default compression algorithm is null.
The next step in processing is to compute a message authentication code over the compressed
data. For this purpose, a shared secret key is used.
Next, the compressed message plus the MAC are encrypted using symmetric encryption.
Encryption may not increase the content length by more than 1024 bytes, so that the total length
may not exceed 214 + 2048.
The final step of SSL Record Protocol processing is to append a SSL record header, consisting of
the following fields which is the standard SSL Record Format:
o Content Type (8 bits): The higher layer protocol used to process the enclosed fragment.
o Major Version (8 bits): Indicates major version of SSL in use. For SSLv3, the value is 3.
o Minor Version (8 bits): Indicates minor version in use. For SSLv3, the value is 0.
o Compressed Length (16 bits): The length in bytes of the plaintext fragment (or compressed
fragment if compression is used). The maximum value is 214 + 2048.

Common questions

Powered by AI

The SSL Record Protocol provides two main services for SSL connections: confidentiality and message integrity. Confidentiality is achieved through the Handshake Protocol, which establishes a shared secret key used for conventional encryption of SSL payloads . Message integrity is ensured by using the same shared secret key to form a message authentication code (MAC). These processes ensure that data is kept confidential and is not tampered with during transmission.

The SSL Cipher Spec affects security and performance through its specification of bulk data encryption and hash algorithms, along with cryptographic attributes such as the hash size . The choice of algorithms balances between security (stronger encryption and hashing techniques) and performance (lower computational overhead). Using robust algorithms like AES ensures strong security, while simpler algorithms could enhance performance but with potential security trade-offs. This spec allows flexibility to optimize according to specific security and performance needs.

The SSL Record Header consists of several fields: Content Type (8 bits), Major Version (8 bits), Minor Version (8 bits), and Compressed Length (16 bits). Content Type specifies the upper-layer protocol that handles the fragment. Major and Minor Versions indicate the SSL version in use, critical for ensuring protocol compatibility between communicating parties. Compressed Length specifies the length of the plaintext or compressed fragment, ensuring that data received matches the expected size.

Message Authentication Codes (MACs) in the SSL Record Protocol are crucial for maintaining message integrity by enabling the detection of unauthorized data modifications during transmission. A shared secret key, established by the Handshake Protocol, is used to generate the MAC over compressed data . This key ensures that only parties with the correct secret can verify the MAC, thus protecting the data from tampering and ensuring that the data received is the same as the data sent.

The SSL protocol ensures data confidentiality using symmetric encryption established during the Handshake Protocol. This process involves generating a shared secret key used specifically for encrypting the SSL payloads, ensuring that only the intended receiver, who also possesses the secret key, can decrypt the data . Encryption prevents unauthorized parties from accessing the contents of the communication.

The compression method in the SSL Record Protocol impacts the transmission efficiency and security. By reducing the data size before encryption, compression can enhance transmission efficiency . However, it must be lossless and not increase content length by more than 1024 bytes . In SSLv3 and TLS, no specific compression algorithm is defined, so the default is null, meaning no compression is applied unless specified, to balance efficiency with security concerns such as compression side-channel attacks.

SSL sessions and connections are distinct in their roles and parameters. An SSL session is a long-term association between client and server, used to store cryptographic parameters like the session identifier, peer certificate, and master secret, allowing multiple connections to share these parameters without renegotiating them . Connections are transient and rely on session parameters to perform peer-to-peer transport services, with new random values generated for each connection. This distinction is crucial for optimizing resource use and performance by eliminating the need to renegotiate cryptographic parameters for each new connection.

SSL constrains data expansion due to encryption by limiting the increase in content length to no more than 1024 bytes overall . This includes a maximum of 214 bytes for fragmentation plus an additional 2048 bytes after compression and encryption. Managing data size is important to maintain efficient use of bandwidth and prevent performance degradation, particularly critical for systems with limited processing power or bandwidth.

SSL session resumption allows a client and server to reuse established session parameters for new connections without reiterating the entire handshake process. Each session includes a flag indicating its resumability . Resumed sessions enhance efficiency by reducing the computational load associated with establishing full handshakes and decreasing latency in setting up new connections. This is particularly significant in environments with numerous short-lived connections, enhancing overall performance and responsiveness.

The SSL Handshake Protocol facilitates mutual authentication by allowing the server and (optionally) the client to authenticate each other using public and private key pairs. During the handshake process, the server provides its certificate to the client, which validates the server's identity. Optionally, the client can also provide its certificate to the server for mutual authentication . This exchange ensures that both parties are who they claim to be before data transmission begins.

You might also like