- Progressive Web Application Development by Example
- Chris Love
- 435字
- 2021-08-05 10:33:23
How does TLS work?
TLS is an encryption protocol that works on top of TCP and sometimes UDP as well. Because it sits on top of the transport layer, it allows protocols higher in the chain to remain unchanged, such as HTTP, for example.
The protocol hides the actual data being sent across the wire. Attackers can only see what port, domain, and IP address are connected with it. They could also track how much data is being transferred.
Once the TCP connection is established, the TLS handshake is started by the client (through the browser or another user agent client application). The client starts the TLS conversation by asking a series of questions:
- Which version of SSL/TLS is it running?
- What cipher suites does it want to use?
- What compression methods does it want to use?
The client chooses the highest level of the TLS protocol supported by both the client and server. The compression method is also selected.
Once the initial TLS connection is established, the client requests the server's certificate. The certificate must be trusted by the client or an authority party that the client trusts. Examples of certificate authorities are Network Solutions, GeoTrust, Let's Encrypt, and Amazon.
After the certificate is verified, an encryption key is exchanged. The key depends on the cipher that is chosen. Once the key is exchanged, the client and server are able to perform symmetric encryption.
The client tells the server that all future communications are to be encrypted:

The client and server perform a final verification in which the client's MAC address is verified by the server. The server receives an initial authentication message from the client that is decrypted and sent back to the client for verification.
Encryption keys are generated uniquely for each connection, and are based on the authentication message. Assuming the handshake completes successfully, the client and the server can now communicate securely.
Secure TLS connections between the client and server have at least one of the following properties:
- As symmetric cryptography is used to encrypt the transmitted data, it is the reason why the connection is secure. The negotiation of a shared secret is both secure and reliable ( the negotiated secret is unavailable to eavesdroppers and no attacker can modify the communications during the negotiation without being detected).
- Public-key cryptography is used to authenticate the identity of the communicating parties. The authentication procedure could be made optional, but typically it is required for the server.
- To prevent the undetected loss or alteration of the data during transmission, each transmitted message includes message integrity check using a message authentication code
- 智慧城市:大數據、互聯網時代的城市治理(第4版)
- 連接未來:從古登堡到谷歌的網絡革命
- Spring Boot 2.0 Projects
- 數字烏托邦
- Hands-On Chatbots and Conversational UI Development
- 農產品物聯網研究與應用
- Web Application Development with R Using Shiny
- Go Web Scraping Quick Start Guide
- 計算機網絡工程實用教程(第2版)
- 大話社交網絡
- 面向5G-Advanced的關鍵技術
- 計算機網絡技術及應用
- 5G技術核心與增強:從R15到R17
- 萬物互聯:物聯網核心技術與安全
- LiveCode Mobile Development Beginner's Guide