Skip to content
doubtly

Enlist various functions of protocols of SSL.

Doubtly Asked Updated Student doubt css ai-ds Save WhatsApp Report
Sign in to comment

1 answer

Answer: SSL works through four protocols: the Record Protocol (confidentiality and integrity of data), the Handshake Protocol (authentication and negotiation of keys and algorithms), the Change Cipher Spec Protocol (switch to the newly agreed cipher) and the Alert Protocol (report warnings and errors).

SSL (Secure Sockets Layer) sits between the application layer (e.g. HTTP) and TCP and gives a secure channel between client and server. (Its modern successor is TLS.) The Handshake, Change Cipher Spec and Alert protocols, along with the application data, all run on top of the Record Protocol.

1. SSL Record Protocol – functions:

  • Provides confidentiality (symmetric encryption) and message integrity (MAC) for all data.
  • Steps: application data → fragment into blocks of at most \(2^{14}\) bytes → optional compression → add MAC (computed with a shared secret key) → encrypt fragment + MAC → add SSL record header (content type, major/minor version, compressed length) → pass to TCP.
  • At the receiver it decrypts, verifies the MAC, decompresses and reassembles the data.

2. Handshake Protocol – functions:

  • Lets client and server authenticate each other (using certificates), negotiate protocol version, cipher suite and compression method, and establish the shared keys before any data is sent.
  • Phase 1 – Establish security capabilities: client_hello and server_hello exchange version, random numbers, session ID and cipher suite.
  • Phase 2 – Server authentication and key exchange: server sends certificate, server_key_exchange, optional certificate_request, then server_hello_done.
  • Phase 3 – Client authentication and key exchange: client sends its certificate (if asked), client_key_exchange (pre-master secret) and certificate_verify.
  • Phase 4 – Finish: both send change_cipher_spec and finished messages; the secure session is now set up.

3. Change Cipher Spec Protocol – functions:

  • Consists of a single 1-byte message with value 1.
  • Tells the other side to copy the pending (newly negotiated) state into the current state, i.e. to start using the agreed cipher suite and keys for all following records.

4. Alert Protocol – functions:

  • Sends SSL-related warnings and error messages to the peer; each alert is 2 bytes: level (1 = warning, 2 = fatal) and alert code.
  • Fatal alerts (e.g. unexpected_message, bad_record_mac, handshake_failure, decompression_failure) immediately end the connection.
  • Warnings (e.g. close_notify, no_certificate, certificate_expired, unsupported_certificate) inform the peer; close_notify is used for a clean shutdown.

Overall services provided by SSL: confidentiality, integrity, server (and optional client) authentication, and protection against replay through sequence numbers in the MAC.

Doubtly · 16 May 2024 Report
Was this answer helpful?

Your answer

Log in or create a free account to answer this question.