Current location - Quotes Website - Personality signature - Https interaction process
Https interaction process
The interaction process of https is as follows:

1. The client sends the list of supported algorithms and the random number used to generate the key to the server.

2. The server selects an encryption algorithm from the algorithm list and sends it to the client together with the certificate containing the server's public key; The certificate also contains the server identification for authentication purposes, and the server also provides a random number for generating the key.

3. The client verifies the certificate of the server and extracts the public key of the server; Then generate a random password string named pre_master_secret, encrypt it with the server's public key (refer to asymmetric encryption/decryption), and send the encrypted information to the server;

4. The client and the server independently calculate encryption and MAC keys according to the pre_master_secret and random values of the client and the server;

5. The client sends the MAC values of all handshake messages to the server;

6. The server sends the MAC values of all handshake messages to the client.