Secure Socket Layer (SSL)
SSL (Secure Socket Layer):
- A standard security protocol for establishing encrypted links between a web server and a browser.
- Ensures that all data transmitted between the web server and browser remains encrypted and secure.
- SSL has been succeeded by Transport Layer Security (TLS), which is more secure and efficient, but the term SSL is still commonly used to refer to both protocols.
Purpose of SSL/TLS:
- Confidentiality: Encrypts data to ensure that it can only be read by the intended recipient.
- Integrity: Protects data from being altered during transmission.
- Authentication: Verifies the identity of the communicating parties, typically ensuring that users are connected to the legitimate website.
SSL Session and Connection
SSL Session:
- A session is an association between a client and a server, created by the Handshake Protocol.
- Sessions are used to avoid the overhead of performing the SSL handshake multiple times for multiple connections.
- Characteristics:
- Session Identifier: An arbitrary byte sequence chosen by the server to identify an active or resumable session state.
- Peer Certificate: The X.509 certificate of the peer.
- Cipher Spec: Specifies the encryption algorithm and hash function.
- Master Secret: A 48-byte secret shared between the client and server.
SSL Connection:
- A connection is a transport (in the OSI layering model definition) that provides a suitable type of service.
- Every connection is associated with one session.
- Characteristics:
- Server and Client Random Values: Generated during the handshake and used in key generation.
- Session: A connection uses the session parameters to determine the encryption and integrity mechanisms.
SSL Record Protocol
SSL Record Protocol:
- Provides two main services: confidentiality and message integrity.
- Operates on top of a reliable transport protocol (e.g., TCP).
- Confidentiality: Provided using symmetric encryption after a handshake is complete.
- Message Integrity: Provided using Message Authentication Code (MAC).
Record Protocol Operations:
- Fragmentation: Divides the data into manageable blocks.
- Compression: Optionally compresses the data.
- MAC: Appends a MAC to the data for integrity.
- Encryption: Encrypts the data and the MAC.
- Appending: Adds a record header to the encrypted data.