Need to understand 2 SSL/TLS and CA when understanding HTTPS correlation
SSL Chinese is called "Secure Sockets Layer" The original HTTP protocol used on the Internet is plaintext, and there are many drawbacks-such as transmitting content to be peeping (sniffing) and tampering. The SSL protocol is designed to solve these problems.
SSL normalization name changed to TLS Chinese is called "Transport Layer Security Protocol"
A CA certificate is also a certificate (with a public key) and a private key to generate a private key transfer with the public key for both sides plus decryption (see the "Plus decrypt" article for details)
The information contained in the HTTP encapsulation is clear, and the information content can be analyzed by the packet capture tool, and HTTPS is required if the information contains sensitive data such as passwords
HTTs Port is the port of 443 HTTP is 80
HTTP is a common hypertext protocol, stateless and HTTPS is a secure Hypertext Transfer protocol that requires certificates and provides a secure connection.
HTTP messages are plaintext, HTTPS is an HTTP connection that is nested with SSL encryption, and its contents are encrypted first and then transmitted
Inserting a ssl/protocol between HTTP (application layer) and TCP (Transport layer) is HTTPS, and the workflow is basically divided into three phases:
1, authentication server. The browser contains a list of trusted CA institutions and holds certificates for those CA institutions. The first stage server will provide the certificate issued by the CA agency certification, if the CA authority that authenticates the server certificate exists in the browser's list of trusted CA institutions, and the information in the server certificate is consistent with the Web site (domain name, etc.) that is currently being visited, the browser considers the service side to be trustworthy. and obtain the server public key from the server certificate for subsequent processes. Otherwise, the browser prompts the user to decide whether to continue, depending on the user's choice. Of course, we can manage this list of trusted CA institutions, add the CA agencies we want to trust, or remove the CA agencies we don't trust.
2, negotiate the session key. After authenticating the server, the client obtains the public key of the server, uses the public key to encrypt the communication with the server, negotiates two session keys, respectively, the client session key used to encrypt the client sending data to the service side, which is used to encrypt the service side session key that the service side sends the data to the client. In the existing server public key, can encrypt the traffic premise, but also to negotiate two symmetric key reason, because the relative complexity of asymmetric encryption is higher, in the process of data transmission, using symmetric encryption, you can save computing resources. In addition, the session key is randomly generated, each negotiation will have a different result, so security is also relatively high.
3, encrypted communication. At this point both sides of the client server have the session key for this communication, and all HTTP data transmitted thereafter is encrypted through the session key. In this way, other users on the network will be very difficult to steal and tamper with the data transmitted between the client and the server, thus guaranteeing the privacy and integrity of the data.
Summary :
HTTPS is simply a security version of HTTP. That is, the SSL layer is added under HTTP, the security base of HTTPS is SSL, so the detailed content of encryption needs Ssl,ssl rely on CA certificate to verify the identity of the server and encrypt the communication between the browser and the server.
In fact, HTTPS is HTTP running on SSL or TLS, so this article discusses the principle and process is actually SSL and TLS process, for other uses SSL or TLS application layer protocol, the content of this article is as valid.
Client Authentication Service side, the server can also give the client to issue certificates and verify the client, do two-way authentication, but the application is not so broad, the principle is similar.
With encrypted communication, HTTPS is undoubtedly more server-intensive than HTTP, which is why many companies clearly support HTTPS but provide HTTP by default.
The difference between HTTP and HTTPS