Senior
Describe the steps of the TLS handshake where a certificate and public key are used
sobes.tech AI
Answer from AI
TLS handshake — the process of establishing a secure connection between a client and a server. Main steps:
- The client sends a ClientHello message to the server with supported TLS versions, cipher suites, and a random number.
- The server responds with ServerHello, selects parameters, sends its certificate (containing the public key), and a random number.
- The client verifies the server's certificate through the trust chain (CA) to ensure authenticity.
- The client generates a secret (pre-master secret), encrypts it with the server's public key from the certificate, and sends it.
- The server decrypts the secret with its private key.
- Both compute the shared secret (master secret) based on the pre-master secret and the random numbers.
- Encryption and authentication keys for the secure channel are derived from the master secret.
Thus, the certificate and public key are used for server authentication and secure transmission of the secret key, which then serves as the basis for symmetric session encryption.