TLS v1.2 was released in August 2008. Ten years later, TLS v1.3 was released in August 2018, which made great changes in performance optimization and security. At the same time, in order to avoid upgrade conflicts caused by the new protocol, TLS v1.3 also made compatibility processing by adding extended protocols to support older versions of clients and servers. SecurityTLS v1.2 supports many encryption suites and is very compatible with older versions. Some of the algorithms with weak encryption strength and security vulnerabilities are likely to be exploited by attackers, bringing potential security risks to the business. TLS v1.3 removes these insecure encryption algorithms, simplifies the encryption suites, and reduces some options for the server handshake process.
Performance OptimizationA significant change in performance optimization is the simplification of the TLS handshake phase, which is shortened from 2-RTT in TLS v1.2 to 1-RTT. At the same time, TLS v1.3 also introduces the 0-RTT concept after the first link is established. Source https://www.a10networks.com/wp-content/uploads/differences-between-tls-1.2-and-tls-1.3-full-handshake.png In TLS v1.2, key negotiation requires the client/server to exchange random numbers and the server to send a certificate, and then both parties send a "Clent/Server Key Exchange" message to exchange the parameter information required for key negotiation. In terms of security, TLS v1.3 has removed many insecure algorithms and simplified the cipher suite. The "Clent/Server Key Exchange" message has now been removed. When the client sends a "Client Hello" message, the extended protocol carries the supported elliptic curve name, temporary public key, and signature information. After receiving the message, the server tells the client the selected key negotiation parameters in the "Server Hello" message, thereby reducing one message round trip (1-RTT).
When accessing a previously visited site, the client can achieve "zero round trip time (0-RTT)" by sending data on the first message to the server using a pre-shared key (PSK) from a previous session.
TLS v1.3 packet capture analysisTake a complete TLS handshake between client and server as an example, and analyze the handshake process of TLS v1.3 by capturing packets. The following figure shows the captured data message of www.zhihu.com website, and the message has been decrypted, otherwise the data after the "Change Cipher Spec" message has been encrypted and cannot be analyzed. For packet capture, please refer to "Things about Network Protocols - How to capture packets and crack HTTPS encrypted data?". image.png The TLS v1.3 handshake process is shown in the following figure: tls-1-3-full-handshake.jpg Client HelloAt the beginning of the handshake, the client tells the server its own Random, Session ID, encryption suite, etc. In addition, TLS v1.3 needs to pay attention to the "extended protocol". TLS v1.3 achieves "forward compatibility" through the extended protocol. When the client requests, it tells the server the protocols it supports and some other extended protocol parameters. If the old version does not recognize it, it will be ignored. Let's look at several major extension protocols:
Server HelloAfter receiving the client request, the server returns the selected cipher suite, Server Random, the selected elliptic curve name and the corresponding public key (Server Params), and the supported TLS version. This cipher suite looks much shorter: TLS_AES_256_GCM_SHA384. The parameters for negotiating the key are placed in the key_share extension protocol.
The server now has the four parameters Client Random, Client Params, Server Random, and Server Params, and can prioritize calculating the pre-master key. In TLS v1.2, after the first round-trip message, the client initiates the request first. After calculating the session key for symmetric encryption, the server sends a Change Cipher Spec message and switches to encryption mode. All subsequent message (certificate, certificate verification) transmissions will be encrypted, which also reduces the plaintext transmission during the handshake. Certificate、Certificate Verify、FinishedIn addition to Certificate, TLS v1.3 also has a "Certificate Verify" message, which uses the server's private key to sign the handshake information, strengthening security measures.
The client switches to encryption modeAfter the client obtains the four parameters of Client Random, Client Params, Server Random, and Server Params to calculate the final session key, it will also initiate "Certificate Verify" and "Finished" messages. When both the client and the server have sent the "Finished" message, the handshake is completed, and data can then be transmitted securely. image.png |
>>: A simple guide to Wi-Fi, a must-read when buying a router
RackNerd has released a special package for the 6...
The Year of the Rooster has arrived! Good luck to...
Yunnan Telecom recently issued an announcement st...
With the advent of the "post-epidemic era&qu...
On October 22, the RTE2021 Real-time Internet Con...
In recent years, with the rapid development of wi...
On May 7, 5G networks, as a new generation of mob...
1. Access Point (AP) In this mode, the wireless n...
1. FTTH troubleshooting steps Step 1: Check the s...
As my country's 5G network construction scale...
[[343348]] This article is reprinted from the WeC...
At the 2019 Mobile World Congress, Huawei brought...
V5.NET has launched this year's 618 promotion...
V5.NET has launched a new promotion, currently of...
Fiber optic networks use a variety of devices tha...