SSL Architecture
SSL Architecture
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.