Why is TLS1.3 more secure than TLS1.2?

Overview

        In complex networks, when clouds and devices communicate, information security is mostly ensured through the TLS (Transport Layer Security) protocol. TLS is the Transport Layer Security Protocol, its predecessor is the Secure Sockets Layer (Secure Sockets Layer, abbreviation SSL) security protocol. The purpose of using TLS is to provide security and data integrity guarantee for Internet of Vehicles communications.

        The protocol consists of two parts: TLS Record and TLS Handshake.

        The lower layer is the TLS record protocol, which sits on top of a transport protocol (such as TCP) that is a reliable TLS record protocol. The currently commonly used solutions are TLS1.2. It is understood that due to technical and cost limitations, the TLS1.3 protocol has not yet been adopted. I wonder whether there will be any changes in the choice of information security technology in the future. Next, let us conduct a detailed analysis of TLS1.2 and TLS1.3 from a technical perspective.

TLS role

  • All information is transmitted encrypted and cannot be eavesdropped by third parties.
  • It has a verification mechanism. Once it is tampered with, the communicating parties will immediately discover it.
  • Equipped with an identity certificate to prevent identity impersonation.

Note: The TLS record protocol is responsible for message compression, encryption, and data authentication.

TLS location

                                                           Figure 1: The location of TLS in the communication link

        As can be seen from the figure, the addition of the SSL/TSL layer establishes a secure connection (encryption protection is provided for the transmitted data to prevent visible plaintext from being sniffed by middlemen; through verification of data integrity, transmission is prevented data is modified by a middleman) and a trusted connection (providing identity authentication for entities on both sides of the connection).

TLS1.2 handshake

The following introduces the key exchange process and its shortcomings of the TLS 1.2 protocol.

The steps for RSA key exchange are as follows:

  • 1. The client initiates a request (Client Hello).
  • 2. The server replies with certificate.
  • 3. The client uses the public key in the certificate to encrypt the pre-master key and sends it to the server (Client Key Exchange).
  • 4. The server extracts the pre-master key, calculates the master key, and then sends the finished symmetric key encryption.
  • 5. The client calculates the master key, verifies it is finished, and sends ApplicationData after successful verification.

Disadvantages: RSA key exchange is not a forward security algorithm (after the private key is leaked, previously captured packets can be decrypted).

                                                     Figure 2: TLS1.2 handshake diagram

Note: Figure 2 shows one-way authentication, and TLS1.2 supports two-way authentication.

TLS1.3 handshake

Compared with TLS1.2, TLS 1.3 optimizes the handshake in the following ways:

  • 1. The client sends a request (Client Hello), and the extension carries the supported elliptic curve type. And calculate the public key (POINT) for each elliptic curve type it supports. The public key is placed in the keyshare in the extension.
  • 2. The server replies to Server Hello and certificate, etc.; the elliptic curve parameters selected by the server are then multiplied by the base point of the elliptic curve to obtain the public key (POINT). Then extract the corresponding public key in the key_share expansion in Client Hello and calculate the master key. The public key (POINT) is no longer placed in the Server Key Exchange like the previous protocol, but is placed in the key_share extension of Server Hello. The client calculates the master key after receiving the server's public key (POINT).

                                                   Figure 2: TLS1.3 handshake diagram

TLS 1.3  Advantages

  • Supports 0-RTT data transmission, saving round-trip time when establishing a connection.
  • Encryption components such as 3DES, RC4, and AES-CBC are abandoned, and hash algorithms such as SHA1 and MD5 are abandoned.
  • All handshake messages after ServerHello are encrypted, and it can be seen that the plain text is greatly reduced.
  • Compression of encrypted messages is no longer allowed, and both parties are no longer allowed to initiate renegotiation.
  • DSA certificates are no longer allowed in 3, resulting in incompatibility with TLS 1.2.
  • TLS 1.2 requires two round trips (2-RTT) to complete the handshake.
  • The TLS 1.3 protocol only requires one round trip (1-RTT) to complete the handshake, and TLS 1.3 has faster access speeds . (Note: Using TLS 1.3 protocol may reduce the time by nearly 100ms)

The above is an introduction to the cloud-device communication protocols TLS1.2 and TLS1.3 among the many nodes in the Internet of Vehicles.

Guess you like

Origin blog.csdn.net/yangyangye/article/details/132808244