In-depth understanding of HTTPS Communication Principles, and in-depth understanding of https Communication

Source: Internet
Author: User

In-depth understanding of HTTPS Communication Principles, and in-depth understanding of https Communication

1. Introduction to HTTPS

HTTPS (Hyper Text Transfer Protocol over Secure Socket Layer), simply put, it adds Secure HTTP, namely HTTP + SSL. We know that when HTTP Communication is performed, if client C Requests server S, therefore, information can be obtained through network packet capture, or even through the simulation of the server's s side to defraud the communication information with the C side, which is very unfavorable for the promotion of Internet applications in the security field; HTTPS solves this problem.

Ii. Differences between HTTPS and HTTP

1) an HTTPS server must apply for a certificate from the CA to prove its purpose;

2) HTTP information is transmitted in plaintext, and HTTPS information is transmitted in ciphertext;

3) The HTTP and HTTPS ports are different. One is port 80 and the other is port 443;

It can be said that HTTP and HTTPS are completely different connection methods. HTTPS integrates encrypted transmission, identity authentication, and is more secure.

3. HTTPS communication steps

 

1) The client requests the server and sends a handshake message

2) The server returns the client's own encryption algorithm, digital certificate, and public key;

3) The client verifies whether the digital certificate sent by the server is consistent with the information related to the local trusted certificate. If not, the client browser prompts that the certificate is not secure, as shown in

If the verification succeeds, the browser uses its own random number algorithm to generate a random number and encrypts it with the public key sent by the server. It is sent to the server. If someone obtains this message through an attack, it is useless because it does not need the private key to decrypt the message; the verified website will have a security lock on the right of the browser address bar;

3) The server decrypts the random number and uses the random number as the key to use symmetric encryption algorithms to encrypt a handshake message and send it to the browser;

4) after the browser receives the message, the decryption succeeds, the handshake ends, and subsequent information is encrypted through this random key.

The above is the server authentication. If the server also needs to authenticate the accessed client, the client also needs to send its own certificate to the server. If the server authentication fails, the communication ends; same principle;

In addition, in order to prevent message tampering during transmission, the message digest is also encrypted to ensure the correctness of message transmission.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.