Network Protocol Related Interview Questions - TLS vs SSL Handshake

What is HTTPS?

HTTPS is not a separate protocol, but a regular HTTP protocol that works over an encrypted connection (SSL/TLS). Encrypted by adding TLS (Transport Layer Security) between TCP and HTTP.

 

SSL/TLS protocol:

The SSL protocol is a secure transmission protocol, and TLS is an upgraded version of SSL v3.0. 

Https overall architecture diagram:

 

Https transmission speed:

  • Slow communication: Compared with the http protocol, the communication is slower, and Bijing has an additional layer of processing.
  • SSL must be encrypted:

TLS/SSL handshake:

  • Principles of cryptography:
    ①. Symmetric encryption: The key used to encrypt data is the same as the key used to decrypt data.
    ②. Asymmetric encryption [this is the encryption method adopted by SSL] : a. Private key: one party keeps it; b. Public key: both parties share it.
  • Digital certificate:
    1. A digital certificate is a string of numbers that mark the identity information of all parties in the Internet communication, and it is also a file .
    ②, why do you need a digital certificate? From the requester's point of view: how does it know that the public key it gets must be sent from the target host it wants? And if it has been tampered with by a third party, then a digital key issued by an authoritative third-party organization is needed, and only it can solve the security problem of digital certificates.
    3. The issuance process of digital certificates: first, the user will generate a key, and then hand over the public key and personal private key to the certification center. After the certification center verifies the identity, it will send our confirmation information to our users. Then the certification center will give us a digital certificate, which contains our personal information and its public key information.
  • The whole process of SSL and TLS handshake:

Summarize:

https is actually adding SSL/TLS between the TCP layer and the http layer to escort the security of the upper layer. It mainly uses symmetric encryption, asymmetric encryption and other technologies to encrypt the data transmission between the client and the server, and finally guarantees the entire communication. security.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325094365&siteId=291194637