skip to content

TLS

The wire protocol itself: handshake message order, record framing, named groups, suite strings and the per-version delta. Interviewers probe it when a connection fails and "we use TLS" stops helping.

part ofWeb protocols & securityoverview, primer and where to startread it →
on this pageshow

questions

page 1 of 2

In a TLS 1.3 handshake, which two messages does the server use to send its certificate chain and prove it holds the matching private key?

level: juniorimportance: must knowfreq 72%

answer

  1. two messages, not one
  2. one carries, one proves
  3. chain travels as certificate_list
  4. certificate(11) then certificate_verify(15)
  5. TLS 1.2 server signed elsewhere

basics

~20 s

Certificate carries the chain as a certificate_list of CertificateEntry structures. CertificateVerify carries a signature over the handshake transcript, made with the private key of the first certificate in that list. The chain alone proves nothing.

solid answer

~40 s

A TLS 1.3 server authenticates with two consecutive handshake messages. `Certificate`, handshake type `certificate(11)`, carries the chain: its body is a `certificate_list` of `CertificateEntry` structures, the first of which is the server's own end-entity certificate. `CertificateVerify`, type `certificate_verify(15)`, carries a signature computed over a value derived from the transcript of the handshake so far, using the private key belonging to that first certificate. The split matters because a certificate is a public document — anyone can copy and replay one — so only the transcript-bound signature shows the sender actually holds the key the certificate names. `Finished` closes the flight afterwards. In TLS 1.2 the server sent no `CertificateVerify` at all; its proof of possession lived elsewhere.

code

pseudocode · 13 lines
pseudocode
Certificate(11)
  certificate_list:
    entry[0]  end-entity certificate for the portal host
              extensions: (may carry a stapled status response)
    entry[1]  intermediate that signed entry[0]
    # certificate naming the trust anchor omitted on purpose

CertificateVerify(15)
  algorithm = ecdsa_secp256r1_sha256(0x0403)
  signature = sign(private key of entry[0],
                   value derived from handshake transcript so far)

Finished(20)

go deeper

for a junior

Recall the two names and their jobs: Certificate carries the chain, CertificateVerify carries the signature that proves the key is held. Being able to say why one message is not enough is the whole of the answer at this level.

for a middle

Explain the mechanics: the certificate_list of CertificateEntry structures, the first entry being the key that signs, and the signature covering the handshake transcript rather than the certificate bytes.

for a senior

Use the split diagnostically. Say which of the two messages a given symptom implicates, and state the TLS 1.2 versus 1.3 difference without being prompted, since half of deployed advice silently assumes one version.

for a principal

Frame it as where authentication evidence lives on the wire, and what that costs: every handshake pays for the chain in bytes and for the signature in a private-key operation, which is what makes handshake volume, not data volume, the scaling question.

## The two messages, and the order they arrive in A TLS 1.3 server that authenticates with a certificate does it with **two** consecutive handshake messages, not one: 1. **`Certificate`**, handshake type `certificate(11)`, carries the chain. Its body is a `certificate_list`: a sequence of `CertificateEntry` structures, each holding one certificate plus an extension block scoped to that entry. 2. **`CertificateVerify`**, handshake type `certificate_verify(15)`, carries a signature. The server signs a value derived from the transcript of every handshake message exchanged up to that point, using the private key belonging to the certificate in the **first** entry of the list. `Finished` then closes the server's flight, and only after that may application data flow. ## Why the chain on its own proves nothing A certificate is a public document. Every client that has ever connected holds a copy, a public log may hold one, and anyone who recorded an older handshake has one. Presenting it says only "a certificate authority signed this document"; it says nothing about whether the sender holds the private key the document names. That is exactly the gap `CertificateVerify` closes: - the signature is over the **handshake transcript**, which includes the client's own freshly generated `ClientHello`, so a signature lifted from a recorded handshake will not verify in this one; - it is made with the key of the **first** certificate in `certificate_list`, which is why the ordering rule exists — the first entry is the sender's own certificate, never an intermediate; - the message names the signature scheme that was used, and that scheme has to be one the client said it would accept. Without the second message, an attacker who simply replays a captured `Certificate` message would be indistinguishable from the real server. ## What each entry in the list holds - The **first** `CertificateEntry` is the server's end-entity certificate — the one whose key signs `CertificateVerify`. - Following entries are the intermediate certificates that link it upward, each normally certifying the entry immediately before it. - A certificate that names a trust anchor the peers are expected to hold already may be omitted from the list entirely. - Every entry carries its own extension block; that block is where TLS 1.3 places a stapled status response, per certificate rather than per handshake. ## TLS 1.2 kept the server's proof somewhere else | | TLS 1.2 | TLS 1.3 | |---|---|---| | Server sends `Certificate` | yes | yes | | Server sends `CertificateVerify` | no | yes | | Where the server proves key possession | in `server_key_exchange (12)` for ephemeral suites; implicitly, by decrypting the client's key material, for static RSA key transport | in `CertificateVerify` | | Who else sends `CertificateVerify` | the client only, answering a `CertificateRequest` | the client, answering a `CertificateRequest` | So "the server sends `CertificateVerify`" is a **TLS 1.3** statement. The guarantee existed in TLS 1.2 too, but it lived in a different message, and the name `CertificateVerify` referred to the client's message alone. Dropping the version is the most common inaccuracy on this material. ## Reading the pair when a handshake goes wrong Splitting the two jobs splits the failures, which is what makes the distinction practical rather than trivia: - a problem with **what was sent** — a missing intermediate, entries in the wrong order, a certificate naming no host the client asked for — is a `Certificate` problem, and is visible to anything that can print the chain the server actually put on the wire; - a problem with **the proof** — a signature that does not verify, or a scheme the client never offered — is a `CertificateVerify` problem, and re-issuing certificates will not touch it; - a server holding no certificate compatible with what the client offered fails before either message is built. ## What the pair is not - It is **not path validation**. The server puts a list on the wire; the client builds and checks a path from it up to an anchor it already trusts. Those are different operations with different failure modes. - It is **not a statement about revocation**. Neither message asserts the certificate is still valid today; a status response, when one is present at all, rides as an extension. - It is **not client authentication**. The client has its own `Certificate` and `CertificateVerify` pair, but sends it only in answer to a `CertificateRequest`. - It **does not carry the private key**. Nothing in either message reveals it. The signature is the only evidence of that key that ever crosses the wire.

  • If a TLS 1.2 server sent no CertificateVerify, where did it prove it held the private key?
    For ephemeral suites, in `server_key_exchange (12)`: the server signed the key-exchange parameters together with both peers' random values, and that signature was verified against the certificate it had just sent. Under static RSA key transport there was no signature at all — the server demonstrated possession by being able to decrypt the key material the client encrypted to its public key. TLS 1.3 removed that second path and moved the proof into one explicit message.
  • A TLS 1.3 server sends Certificate but its CertificateVerify never arrives. What has the client established?
    Nothing about the peer's identity. It holds a chain it may well be able to validate, but a chain is public data that any party can transmit. Without a transcript-bound signature made by the key in the first `CertificateEntry`, the client has no evidence that the party it is talking to holds that key, so the handshake cannot be completed.

saying these in an interview costs you the question

  • Says the certificate alone proves the server holds the private key
  • Thinks one message carries both the chain and the signature
  • Believes a TLS 1.2 server also sends CertificateVerify
  • Calls the chain a single certificate rather than a certificate_list
  • Thinks the private key is transmitted during the handshake
open as a page

In a TLS 1.2 cipher suite name such as TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, what does each element select?

level: juniorimportance: must knowfreq 65%

basics

~20 s

A TLS 1.2 suite name lists four choices in fixed order: the key exchange, the algorithm that authenticates the server, the bulk cipher with its key size and mode, and the hash used for the record MAC or the pseudorandom function.

open as a page

What breaks if unmodified TLS records are sent over UDP, and what does DTLS change to fix it?

level: juniorimportance: must knowfreq 50%

basics

~20 s

TLS assumes an ordered, reliable byte stream: drop or reorder one record and decryption fails, and a lost handshake message stalls forever. DTLS puts that back into the protocol itself with explicit per-record numbering, fragmented handshake messages and its own retransmission timer.

open as a page

In a TLS 1.3 handshake, what has both sides agreed by the time the client sends its first application byte?

level: juniorimportance: must knowfreq 74%

basics

~20 s

A completed TLS 1.3 handshake has fixed one protocol version and one cipher suite, derived shared traffic keys, established the server's identity by signature, selected an application protocol, and confirmed both peers saw an identical message transcript.

open as a page

What does the key_share extension carry in a TLS 1.3 ClientHello, and what comes back in the ServerHello?

level: juniorimportance: must knowfreq 58%

basics

~10 s

The key_share extension carries ephemeral Diffie-Hellman public values the client generated, one per named group it guessed the server would accept. The ServerHello returns exactly one such value, for the group the server chose.

open as a page

Why did POODLE force SSL 3.0 out of service entirely while Heartbleed was fixed without changing any protocol version?

level: juniorimportance: must knowfreq 62%

basics

~20 s

POODLE exploits how SSL 3.0 itself defines CBC padding, so every conforming implementation had it and only withdrawing the version repaired it. Heartbleed was a missing length check in one TLS library, repaired by a new build.

open as a page

In a TLS handshake, which peer proves its identity by default, and what does mutual authentication add?

level: juniorimportance: must knowfreq 62%

basics

~20 s

An ordinary TLS handshake authenticates only the server: it sends a certificate and a signature proving it holds the matching private key. Mutual authentication adds a client certificate and signature, so both peers prove identity before any application data flows.

open as a page

After a TLS 1.3 handshake completes, in what unit is application data protected, and what limits that unit's size?

level: juniorimportance: must knowfreq 62%

basics

~20 s

TLS protects one record at a time, not a byte stream. The sender cuts data into fragments of at most 2^14 bytes, and each fragment becomes an independently encrypted record whose protected length may not exceed 2^14 + 256 bytes.

open as a page

In TLS, what does a resumption handshake presenting a previously issued ticket skip that a full handshake performs?

level: juniorimportance: must knowfreq 66%

basics

~20 s

A resumption handshake reuses a secret both peers already hold, so the server sends no certificate chain and no signature over the transcript, and neither side repeats public-key authentication. Fresh randoms, new record keys and the Finished exchange still happen.

open as a page

What do the TLS alerts unknown_ca(48), certificate_expired(45) and bad_certificate(42) each tell you about the validating peer's verdict?

level: juniorimportance: must knowfreq 70%

basics

~20 s

unknown_ca(48) means what arrived never reached a trust anchor the validator holds. certificate_expired(45) means a certificate it needed is outside its validity window. bad_certificate(42) means a certificate was corrupt or its signature did not verify.

open as a page

In TLS, why does a server that omits an intermediate from its certificate_list fail for only some clients?

level: middleimportance: must knowfreq 62%

basics

~20 s

Because clients that already hold the missing intermediate, or can fetch it from a location named in the certificate, complete the path anyway. Clients with neither cannot reach a trust anchor and reject the chain, so the same server looks healthy and broken at once.

open as a page

Why does the TLS 1.3 specification define only five cipher suites, and what left the suite string?

level: middleimportance: must knowfreq 58%

basics

~20 s

A TLS 1.3 suite names only an AEAD algorithm and the hash used for key derivation. Key exchange moved to supported_groups(10) and key_share(51), and authentication to signature_algorithms(13), so the combinatorial explosion that produced dozens of TLS 1.2 suites disappeared.

open as a page

Why does a full TLS 1.3 handshake cost one round trip where a full TLS 1.2 handshake costs two?

level: middleimportance: must knowfreq 66%

basics

~20 s

TLS 1.3 has the client send its key-exchange contribution with the ClientHello, so the server can derive keys and send its entire flight, identity and Finished included, in one response. TLS 1.2 needs a second exchange before either side can protect anything.

open as a page

A TLS 1.3 server wants a named group the client sent no key_share for — what happens next on the wire?

level: middleimportance: must knowfreq 55%

basics

~20 s

The server must answer with HelloRetryRequest, naming the group it wants in key_share(51). The client generates a fresh share for that group and sends a second ClientHello, and the handshake costs one extra round trip.

open as a page

What property of SSL 3.0's CBC padding let POODLE recover one plaintext byte at a time?

level: middleimportance: must knowfreq 55%

basics

~20 s

SSL 3.0 defines only the last padding byte, the padding length, and leaves the other padding bytes free, so a receiver cannot verify them. POODLE builds records whose final block is entirely padding, and acceptance confirms a guess.

open as a page

Which TLS 1.3 message asks a client to authenticate, and what does the client's CertificateVerify sign?

level: middleimportance: must knowfreq 56%

basics

~20 s

The server sends CertificateRequest, after EncryptedExtensions and before its own Certificate. The client answers with Certificate, then CertificateVerify, whose signature covers a hash of the handshake transcript so far, made with the private key for the leaf it just sent.

open as a page

A TLS 1.3 subtitle feed stops arriving and the socket reports end of file - what must the receiver have seen for that to be an orderly close?

level: middleimportance: must knowfreq 66%

basics

~20 s

A close_notify(0) alert is the only thing that marks an orderly end of data in TLS. A transport end of file with no close_notify is a truncated stream, and the receiver cannot tell a finished sender from a cut connection.

open as a page

In TLS 1.2, how does resumption by SessionID session_id differ from an RFC 5077 SessionTicket in where state lives?

level: middleimportance: must knowfreq 58%

basics

~20 s

A SessionID session_id is only a handle: the server keeps the session state in its own cache. An RFC 5077 SessionTicket is the state itself, sealed under a key the server side holds and stored by the client.

open as a page

When a TLS server aborts with handshake_failure(40) rather than protocol_version(70), what does each narrow the mismatch to?

level: middleimportance: must knowfreq 62%

basics

~10 s

protocol_version(70) narrows the failure to version selection: the version offered was recognised and not supported. handshake_failure(40) narrows nothing - it is the catch-all for no acceptable set of security parameters, whichever dimension failed.

open as a page

In TLS 1.3, which field carries the version a peer actually negotiates, and why is ClientHello's legacy_version frozen at 0x0303?

level: middleimportance: must knowfreq 65%

basics

~20 s

In TLS 1.3 the supported_versions extension carries the real version list and the server's single choice; ClientHello's legacy_version stays frozen at 0x0303 because implementations in the path rejected unfamiliar values there, while an unknown extension is ignored instead.

open as a page

A kiosk's TLS handshake to the shore-side booking service ends at an onboard gateway — which peer has the kiosk authenticated?

level: seniorimportance: must knowfreq 62%

basics

~20 s

Only the peer that completed the handshake: the onboard gateway, which sent Certificate and signed CertificateVerify for that host name. The shore-side booking service sent nothing the kiosk verified, so nothing was proved about it.

open as a page

In a TLS 1.3 handshake, what does the point in the flight at which an alert arrived rule out about its cause?

level: seniorimportance: must knowfreq 55%

basics

~20 s

Position eliminates causes. An alert arriving before any Certificate has been sent cannot be a verdict on a certificate, and one that arrives as a protected record came from the peer that completed the key exchange rather than from anything on the path.

open as a page

Why can an interception point that decrypts kiosk traffic not simply present the booking service's own certificate?

level: juniorimportance: should knowfreq 50%

basics

~20 s

Because it does not hold that certificate's private key, and copied bytes fail at the signature step. So it generates its own key pair and mints a leaf for the requested host name, signed by an authority the client already trusts.

open as a page

In TLS 1.3, what does the server's CertificateVerify signature cover, and what does it prove that its Certificate message cannot?

level: middleimportance: should knowfreq 52%

basics

~20 s

It signs a value derived from the transcript of the handshake so far, not the certificate bytes. That binds possession of the first entry's private key to this specific handshake, which a copied Certificate message — public data anyone can replay — can never do.

open as a page

How does a TLS server serving several broker hostnames from one endpoint choose which certificate to send?

level: middleimportance: should knowfreq 48%

basics

~20 s

It reads the host_name the client put in the server_name(0) extension of its ClientHello and selects a configured certificate that names that host. With no extension, or an unknown name, it falls back to a default certificate and the client rejects the name mismatch.

open as a page

In a DTLS 1.2 record, what do the epoch and sequence_number fields do that a stream-mode TLS record never needed?

level: middleimportance: should knowfreq 45%

basics

~20 s

The epoch names which key set protects the record and the 6-byte sequence_number numbers it within that epoch, so a receiver can decrypt records that arrive late, out of order or twice. Stream-mode TLS infers both because the transport guarantees order.

open as a page

How does DTLS carry a handshake message larger than one datagram, and how does the receiver reassemble it?

level: middleimportance: should knowfreq 42%

basics

~20 s

DTLS adds message_seq, fragment_offset and fragment_length to the handshake header. A sender splits one message into fragments that each fit the path MTU, every fragment repeats the message's type, total length and message_seq, and the receiver reassembles by offset.

open as a page

In a TLS 1.3 handshake, from which message onward can a passive on-path observer no longer read the handshake?

level: middleimportance: should knowfreq 48%

basics

~10 s

From EncryptedExtensions. In TLS 1.3 only the two hello messages travel in the clear; every handshake message after ServerHello is protected under the handshake traffic keys, which is exactly why the EncryptedExtensions message exists.

open as a page

How are the server_name and ALPN extensions carried in a TLS ClientHello, and how does the server answer each?

level: middleimportance: should knowfreq 56%

basics

~20 s

The client offers both in its ClientHello: server_name carries one host name as a byte string, ALPN carries an ordered list of protocol identifiers. The server acknowledges server_name with an empty extension and answers ALPN with exactly one protocol it selected.

open as a page

showing 1–30 of 58