How to ensure the reliability of Tcp, https transmission process? Public can use public-key solution it?

TCP is connection-oriented. Reliable byte stream service.

Connection-oriented thought that there are two applications that use TCP (usually a client a server) before exchanging data with each other must first establish a TCP connection. In a TCP connection, only two rooms communicate with each other. Broadcast and multicast can not use TCP.

TCP provides reliability in the following ways:
1) the application data into the TCP consider most appropriate data transmission block.
2) timeout retransmission: TCP party issued a segment, he starts a timer, wait until the destination to acknowledge receipt of this segment. If not timely receive a confirmation, it will retransmit this segment.
3) When the TCP link received sent from the other end of the TCP data, he sends an acknowledgment (request received acknowledgment is given). This acknowledgment is not sent immediately, usually postpone fractions of a second (the reason for the postponement is to finish the verification package).
4) If the received TCP packet, the packet checksum is wrong, the packet discard section, does not give a response, the transmitting end will TCP retransmission timeout.
5) for reordering the data out of order, and then to the application layer (TCP segment is transmitted as IP datagrams, while IP datagrams will arrive out of sequence, thus reaching the TCP segment may also be out of order. If necessary, TCP data will be received are rearranged in the correct order to the application layer).
6) For repeated data discarded.
7) TCP flow control can prevent the host resulting in faster slower host buffer overflow.

Byte-stream service : two applications over a TCP connection, TCP byte not insert record identifier, we will call this service byte stream service.

TCP byte stream most of the North glory without any explanation, do not know the TCP byte stream data transmission of binary data or other types of data, both the application layer interpretation byte stream connected by TCP.

HTTPS is actually composed of two parts: http + ssl / tls, http is on another layer of processing encrypted information module, service and client information will be transmitted through tls encryption, data transmission is encrypted after data. Encryption process:
1) the client initiates https request (that is, the user enters a https URL in your browser, and then connect to the 443 Interface) server of
2) server configuration (using https protocol server must have a digital certificate, you can produce their own, may also want to apply for the organization, this certificate is a public and private key)
3) transfer certificate (the certificate is public knowledge that contains a lot of information)
4) client resolver certificate (completed by the client tls , first verify that valid master public key, if found Eng a car, then a pop-up alert box, problems prompted the certificate, without problem, generating a random value, and then encrypts the random value certificate)
5) transmitting encrypted information ( transmitted here is a random value encrypted, the purpose is to allow the server to obtain the random value, after the communication client and server may be encrypted by the random value)
6) server decryption information (server with its private key the decrypted random value transmitted from the client, and the content is encrypted by a symmetric value of the so-called asymmetric encryption That is, the information is private and mixed by an algorithm, so unless you know the private key, Uranus can not get content, but just the client and server are aware of this private key, as long as all encryption algorithms sturdy enough, complex enough private data security is enough)
7) communicating encrypted information
) the client decryption information with a random number to solve.

Client capture caught is not encrypted.

Guess you like

Origin blog.csdn.net/weixin_39940206/article/details/95193330
Recommended