Great question! In TLS 1.3, the server certificate is transmitted in plaintext during the handshake, but this does not compromise security because of how TLS 1.3 is designed.
Let’s break it down:
🔐 TLS 1.3 Handshake Overview
In TLS 1.3, the handshake is much faster and more secure than previous versions. Here's a simplified version of what happens:
- ClientHello: The client sends supported cipher suites, a random number, and other parameters.
- ServerHello: The server responds with its chosen cipher suite, a random number, and session ID.
- Key Share / Server Key Exchange: The server sends its ephemeral key share (e.g., using ECDH).
- Certificate: The server sends its certificate (in plaintext) containing its public key.
- Certificate Verify: The server proves possession of the private key by signing some handshake data.
- Finished: Both parties send a "finished" message to confirm the handshake.
📦 Why Is the Certificate Sent in Plaintext?
- The server certificate itself is not sensitive — it contains the server's public key, which is meant to be shared openly.
- The certificate needs to be readable by the client so that:
- The client can verify the server’s identity (via CA signature and hostname match),
- The client can obtain the server’s public key to continue the key exchange (if needed),
- The client can validate the certificate chain.
So, there's no need to encrypt the certificate — it's part of the public information used to establish trust.
🔒 But How Is Security Maintained?
Even though the certificate is sent in plaintext:
- The rest of the handshake is encrypted starting from the encrypted extensions onward.
- All subsequent communication (application data) is protected once the handshake completes.
- Forward secrecy is ensured via ephemeral key exchanges (like ECDHE), so even if the certificate's private key is compromised later, past sessions remain secure.
✅ Summary
- In TLS 1.3, the server certificate is sent in plaintext.
- This is safe because the certificate contains only public information.
- The certificate is required early in the handshake for authentication and key derivation.
- Encryption begins shortly after, protecting all further communication.
- TLS 1.3 minimizes the amount of data exposed in the clear while ensuring fast and secure session setup.
Let me know if you'd like a visual diagram or dive into how client certificates are handled too!