HTTPS is a security-based HTTP channel, and its security base is guaranteed by the SSL layer. Originally developed by Netscape Company, it mainly provides the identity authentication and encrypted communication methods of both sides of communication. It is now widely used in security-sensitive communications on the Internet.
What is HTTPS?
Main differences between HTTPS and HTTP
The protocol base differs: HTTPS joins the SSL layer under HTTP,
Communication method is different: HTTPS before data communication requires the client, the server handshake (identity authentication), after establishing the connection, the transmission data is encrypted, communication port 443.
HTTP transmit data is not encrypted, plaintext, communication port 80.
SSL Protocol Basics
The SSL protocol is located between the TCP/IP protocol and various application layer protocols, and is divided into two tiers:
SSL recording Protocol (SSL record Protocol): Based on the Reliable Transport Layer Protocol (TCP), provides the basic functions of data encapsulation, compression and encryption for the upper layer protocol.
SSL Handshake Protocol (SSL handshake Procotol): On the SSL record protocol, before the actual data transmission, the communication parties authenticate, negotiate the encryption algorithm, Exchange encryption key and so on.
SSL protocol Communication Process
(1) The browser sends a connection request to the server; the server returns its own certificate (including the server public key S_pukey), the symmetric encryption algorithm type and other related information to the client;
(2) The client browser checks whether the server is routed to the CA certificate issued by its trusted CA center. If so, perform 4 steps; otherwise, give the customer a warning message: Ask whether to continue the visit.
(3) The client browser compares the information in the certificate, such as the certificate validity period, the server domain name and the public key S_PK, whether the information returned by the server is consistent, and if so, the browser completes the authentication to the server.
(4) The server requires clients to send client certificates (including client public key C_pukey), supported symmetric encryption schemes, and other related information. After receiving, the server carries the same authentication, and if it does not pass the authentication, the connection is refused;
(5) The server according to the client browser sent to the type of password, choose a maximum encryption scheme, with the client public key C_pukey encrypted after the notification to the browser;
(6) The client through the private key C_prkey decryption, learned the encryption scheme selected by the server, and select a Call key key, and then use the server public key S_pukey encrypted and sent to the server;
(7) The server received the browser sent to the message, with the private key S_prkey decryption, get the call key key.
(8) The next data transfer is encrypted using the symmetric key key.
Described above is the two-way authentication SSL protocol specific communication process, both the server and the user must have a certificate. Thus, the SSL protocol guarantees the authentication of both sides through asymmetric key mechanism, and completes the connection, and guarantees the data security through the symmetric key mechanism in the actual data communication.
HTTPS Communication principle