sequenceDiagram
autonumber
participant Client
participant Server
participant CA as Certificate Authority
Client ->> Server: Sends a 'hello' message with <br> TLS version, <br> cyrptographic algorithms, <br> data compression method <br>, and 'client random'
Server ->> Client: Sends a 'hello' message with <br> SSL certificate (which includes public key), <br> chosen cyrptographic algorithms <br>, and 'server random'
Client ->> CA: Verifies the SSL certificate with Certificate Authority that issued the certificate
Client ->> Server: Sends a 'premaster secret' (another random string) <br> encrypted with the public key
Server ->> Server: Decrypts the 'premaster secret' with the private key
Server ->> Server: Creates a session key (symmetric key) with e.g. AES from <br> the client random, the server random and the premaster secret
Client ->> Client: Ditto
Client ->> Server: Sends a 'finished' message encrypted with the session key
Server ->> Client: Ditto, the handshake is complete
Client ->> Server: Uses the session key to communicate
Server ->> Client: Ditto