Interview questions, what is the difference between http and https, and what does it have to do with the TCP/IP four-tier model?

was asked in the interview what is the specific difference between http and https?

What does

have to do with tcp/ip? Does it have anything to do with three handshakes?

could you please explain it well

?

< H2 > difference < / H2 >

the data transmitted by the HTTP protocol is unencrypted, that is, plaintext, and can be captured directly with the packet grabbing tool, while HTTPS uses the SSL (Secure Sockets Layer) protocol designed by Netscape to encrypt the data transmitted by the HTTP protocol, and the packet grabbing tool grabs the ciphertext, which greatly increases the cost of man-in-the-middle attacks. To put it simply, HTTPS protocol is a network protocol built by SSL+HTTP protocol for encrypted transmission and identity authentication, which is more secure than http protocol.

The difference between < H2 > and TCP/IP < / H2 >

TPC/IP protocol is a transport layer and network layer protocol, which mainly solves how to transmit data in the network, while HTTP is an application layer protocol, which mainly solves how to package data. WEB uses HTTP as the application layer protocol to encapsulate HTTP text messages, and then uses TCP/IP as the transport layer protocol to send it to the network.

< H2 > differences in the three-way handshake < / H2 >

too long to read the version:

HTTP:TCPHTTP
HTTPS:HTTPSHTTPSSLSSL

detailed long version:
HTTP three-way handshake:

:syn(syn=j)SYN_SEND;

:synSYNack=j+1SYNsyn=kSYN+ACKSYN_RECV;

:SYNACKACK(ack=k+1)ESTABLISHED

HTTPS complex three-way handshake:

1. HTTPS

2. 

HTTPSCACA

3. 



4. 

TLS

5. 



6. 

()

7. 



8. 

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e62c38-459c6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e62c38-459c6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?