Hubbry Logo
Transport Layer SecurityTransport Layer SecurityMain
Open search
Transport Layer Security
Community hub
Transport Layer Security
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Transport Layer Security
Transport Layer Security
from Wikipedia

Transport Layer Security (TLS) is a cryptographic protocol designed to provide communications security over a computer network, such as the Internet. The protocol is widely used in applications such as email, instant messaging, and voice over IP, but its use in securing HTTPS remains the most publicly visible.

The TLS protocol aims primarily to provide security, including privacy (confidentiality), integrity, and authenticity through the use of cryptography, such as the use of certificates, between two or more communicating computer applications. It runs in the presentation layer and is itself composed of two layers: the TLS record and the TLS handshake protocols.

The closely related Datagram Transport Layer Security (DTLS) is a communications protocol that provides security to datagram-based applications. In technical writing, references to "(D)TLS" are often seen when it applies to both versions.[1]

TLS is a proposed Internet Engineering Task Force (IETF) standard, first defined in 1999, and the current version is TLS 1.3, defined in August 2018. TLS builds on the now-deprecated SSL (Secure Sockets Layer) specifications (1994, 1995, 1996) developed by Netscape Communications for adding the HTTPS protocol to their Netscape Navigator web browser.

Description

[edit]

Client–server applications use the TLS protocol to communicate across a network in a way designed to prevent eavesdropping and tampering.

Since applications can communicate either with or without TLS (or SSL), it is necessary for the client to request that the server set up a TLS connection.[2] One of the main ways of achieving this is to use a different port number for TLS connections. Port 80 is typically used for unencrypted HTTP traffic while port 443 is the common port used for encrypted HTTPS traffic. Another mechanism is to make a protocol-specific STARTTLS request to the server to switch the connection to TLS – for example, when using some mail and news protocols.

Once the client and server have agreed to use TLS, they negotiate a stateful connection by using a handshaking procedure (see § TLS handshake).[3] The protocols use a handshake with an asymmetric cipher to establish not only cipher settings but also a session-specific shared key with which further communication is encrypted using a symmetric cipher. During this handshake, the client and server agree on various parameters used to establish the connection's security:

  • The handshake begins when a client connects to a TLS-enabled server requesting a secure connection and the client presents a list of supported cipher suites (ciphers and hash functions).
  • From this list, the server picks a cipher and hash function that it also supports and notifies the client of the decision.
  • The server usually then provides identification in the form of a digital certificate. The certificate contains the server name, the trusted certificate authority (CA) that vouches for the authenticity of the certificate, and the server's public encryption key.
  • The client confirms the validity of the certificate before proceeding.
  • To generate the session keys used for the secure connection, the client either:
    • encrypts a random number (PreMasterSecret) with the server's public key and sends the result to the server (which only the server should be able to decrypt with its private key); both parties then use the random number to generate a unique session key for subsequent encryption and decryption of data during the session, or
    • uses Diffie–Hellman key exchange (or its variant elliptic-curve DH) to securely generate a random and unique session key for encryption and decryption that has the additional property of forward secrecy: if the server's private key is disclosed in the future, it cannot be used to decrypt the current session, even if the session is intercepted and recorded by a third party.

This concludes the handshake and begins the secured connection, which is encrypted and decrypted with the session key until the connection closes. If any one of the above steps fails, then the TLS handshake fails and the connection is not created.

Note that TLS 1.3 only allows key exchange algorithms providing forward secrecy. Consequently, establishing a PreMasterSecret using the server's public and private key is only available in TLS 1.2 and below.

TLS and SSL do not fit neatly into any single layer of the OSI model or the TCP/IP model.[4][5] TLS runs "on top of some reliable transport protocol (e.g., TCP),"[6]: §1  which would imply that it is above the transport layer. It serves encryption to higher layers, which is normally the function of the presentation layer. However, applications generally use TLS as if it were a transport layer,[4][5] even though applications using TLS must actively control initiating TLS handshakes and handling of exchanged authentication certificates.[6]: §1 

When secured by TLS, connections between a client (e.g., a web browser) and a server (e.g., wikipedia.org) will have all of the following properties:[6]: §1 

  • The connection is private (or has confidentiality) because a symmetric-key algorithm is used to encrypt the data transmitted. The keys for this symmetric encryption are generated uniquely for each connection and are based on a shared secret that was negotiated at the start of the session. The server and client negotiate the details of which encryption algorithm and cryptographic keys to use before the first byte of data is transmitted (see below). The negotiation of a shared secret is both secure (the negotiated secret is unavailable to eavesdroppers and cannot be obtained, even by an attacker who places themselves in the middle of the connection) and reliable (no attacker can modify the communications during the negotiation without being detected).
  • The identity of the communicating parties can be authenticated using public-key cryptography. This authentication is required for the server and optional for the client.
  • The connection is reliable (or has integrity) because each message transmitted includes a message integrity check using a message authentication code to prevent undetected loss or alteration of the data during transmission.

TLS supports many different methods for exchanging keys, encrypting data, and authenticating message integrity. As a result, secure configuration of TLS involves many configurable parameters, and not all choices provide all of the privacy-related properties described in the list above (see the tables below § Key exchange, § Cipher security, and § Data integrity).

Attempts have been made to subvert aspects of the communications security that TLS seeks to provide, and the protocol has been revised several times to address these security threats. Developers of web browsers have repeatedly revised their products to defend against potential security weaknesses after these were discovered (see TLS/SSL support history of web browsers).

Datagram Transport Layer Security

[edit]

Datagram Transport Layer Security, abbreviated DTLS, is a related communications protocol providing security to datagram-based applications by allowing them to communicate in a way designed[7][8] to prevent eavesdropping, tampering, or message forgery. The DTLS protocol is based on the stream-oriented Transport Layer Security (TLS) protocol and is intended to provide similar security guarantees. However, unlike TLS, it can be used with most datagram oriented protocols including User Datagram Protocol (UDP), Datagram Congestion Control Protocol (DCCP), Control And Provisioning of Wireless Access Points (CAPWAP), Stream Control Transmission Protocol (SCTP) encapsulation, and Secure Real-time Transport Protocol (SRTP).

As the DTLS protocol datagram preserves the semantics of the underlying transport, the application does not suffer from the delays associated with stream protocols. However, the application has to deal with packet reordering, loss of datagram and data larger than the size of a datagram network packet. Because DTLS uses UDP or SCTP rather than TCP, it avoids the TCP meltdown problem,[9][10] when being used to create a VPN tunnel.

The original 2006 release of DTLS version 1.0 was not a standalone document. It was given as a series of deltas to TLS 1.1.[7]: §4  Similarly the follow-up 2012 release of DTLS is a delta to TLS 1.2. It was given the version number of DTLS 1.2 to match its TLS version. Lastly, the 2022 DTLS 1.3 is a delta to TLS 1.3. Like the two previous versions, DTLS 1.3 is intended to provide "equivalent security guarantees [to TLS 1.3] with the exception of order protection/non-replayability".[11]

Many VPN clients including Cisco AnyConnect[12] & InterCloud Fabric,[13] OpenConnect,[14] ZScaler tunnel,[15] F5 Networks Edge VPN Client,[16] and Citrix Systems NetScaler[17] use DTLS to secure UDP traffic. In addition all modern web browsers support DTLS-SRTP[18] for WebRTC.

History and development

[edit]
SSL and TLS protocols
Protocol Published Status
Unsupported: SSL 1.0 Unpublished Unpublished
Unsupported: SSL 2.0 1995 Deprecated in 2011[19]
Unsupported: SSL 3.0 1996 Deprecated in 2015[20]
Unsupported: TLS 1.0 1999 Deprecated in 2021[21][22][23][24]
Unsupported: TLS 1.1 2006 Deprecated in 2021[21][22][23][24]
Supported: TLS 1.2 2008 In use since 2008[25][26]
Latest version: TLS 1.3 2018 In use since 2018[26][27]
Legend:
Unsupported
Supported
Latest version

Early research projects

[edit]

Secure Data Network System

[edit]

In August 1986, the National Security Agency, the National Bureau of Standards, the Defense Communications Agency launched a project, called the Secure Data Network System (SDNS), with the intent of designing the next generation of secure computer communications network and product specifications to be implemented for applications on public and private internets. It was intended to complement the rapidly emerging new OSI internet standards moving forward both in the U.S. government's GOSIP Profiles and in the huge ITU-ISO JTC1 internet effort internationally.[28]

As part of the project, researchers designed a protocol called SP4 (security protocol in layer 4 of the OSI system). This was later renamed the Transport Layer Security Protocol (TLSP) and subsequently published in 1995 as international standard ITU-T X.274|ISO/IEC 10736:1995.[29] Despite the name similarity, this is distinct from today's TLS.

Secure Network Programming (SNP)

[edit]

Other efforts towards transport layer security included the Secure Network Programming (SNP) application programming interface (API), which in 1993 explored the approach of having a secure transport layer API closely resembling Berkeley sockets, to facilitate retrofitting pre-existing network applications with security measures. SNP was published and presented in the 1994 USENIX Summer Technical Conference.[30][31] The SNP project was funded by a grant from NSA to Professor Simon Lam at UT-Austin in 1991.[32] Secure Network Programming won the 2004 ACM Software System Award.[33][34] Simon Lam was inducted into the Internet Hall of Fame for "inventing secure sockets in 1991 and implementing the first secure sockets layer, named SNP, in 1993."[35][36]

SSL 1.0, 2.0, and 3.0

[edit]

Netscape developed the original SSL protocols, and Taher Elgamal, chief scientist at Netscape Communications from 1995 to 1998, has been described as the "father of SSL".[37][38][39][40] SSL version 1.0 was never publicly released because of serious security flaws in the protocol. Version 2.0, after being released in February 1995 was quickly found to contain a number of security and usability flaws. It used the same cryptographic keys for message authentication and encryption. It had a weak MAC construction that used the MD5 hash function with a secret prefix, making it vulnerable to length extension attacks. It also provided no protection for either the opening handshake or an explicit message close, both of which meant man-in-the-middle attacks could go undetected. Moreover, SSL 2.0 assumed a single service and a fixed domain certificate, conflicting with the widely used feature of virtual hosting in Web servers, so most websites were effectively impaired from using SSL.

These flaws necessitated the complete redesign of the protocol to SSL version 3.0.[41][39] Released in 1996, it was produced by Paul Kocher working with Netscape engineers Phil Karlton and Alan Freier, with a reference implementation by Christopher Allen and Tim Dierks of Certicom. Newer versions of SSL/TLS are based on SSL 3.0. The 1996 draft of SSL 3.0 was published by IETF as a historical document in RFC 6101.

SSL 2.0 was deprecated in 2011 by RFC 6176. In 2014, SSL 3.0 was found to be vulnerable to the POODLE attack that affects all block ciphers in SSL; RC4, the only non-block cipher supported by SSL 3.0, is also feasibly broken as used in SSL 3.0.[42] SSL 3.0 was deprecated in June 2015 by RFC 7568.

TLS 1.0

[edit]

TLS 1.0 was first defined in RFC 2246 in January 1999 as an upgrade of SSL Version 3.0, and written by Christopher Allen and Tim Dierks of Certicom. As stated in the RFC, "the differences between this protocol and SSL 3.0 are not dramatic, but they are significant enough to preclude interoperability between TLS 1.0 and SSL 3.0". Tim Dierks later wrote that these changes, and the renaming from "SSL" to "TLS", were a face-saving gesture to Microsoft, "so it wouldn't look [like] the IETF was just rubberstamping Netscape's protocol".[43]

The PCI Council suggested that organizations migrate from TLS 1.0 to TLS 1.1 or higher before June 30, 2018.[44][45] In October 2018, Apple, Google, Microsoft, and Mozilla jointly announced they would deprecate TLS 1.0 and 1.1 in March 2020.[22] TLS 1.0 and 1.1 were formally deprecated in RFC 8996 in March 2021.

TLS 1.1

[edit]

TLS 1.1 was defined in RFC 4346 in April 2006.[46] It is an update from TLS version 1.0. Significant differences in this version include:

Support for TLS versions 1.0 and 1.1 was widely deprecated by web sites around 2020,[48] disabling access to Firefox versions before 24 and Chromium-based browsers before 29,[49] though third-party fixes can be applied to Netscape Navigator and older versions of Firefox to add TLS 1.2 support.[50]

TLS 1.2

[edit]

TLS 1.2 was defined in RFC 5246 in August 2008.[25] It is based on the earlier TLS 1.1 specification. Major differences include:

  • The MD5 and SHA-1 combination in the pseudorandom function (PRF) was replaced with SHA-256, with an option to use cipher suite specified PRFs.
  • The MD5 and SHA-1 combination in the finished message hash was replaced with SHA-256, with an option to use cipher suite specific hash algorithms. However, the size of the hash in the finished message must still be at least 96 bits.[25]: §7.4.9 
  • The MD5 and SHA-1 combination in the digitally signed element was replaced with a single hash negotiated during handshake, which defaults to SHA-1.
  • Enhancement in the client's and server's ability to specify which hashes and signature algorithms they accept.
  • Expansion of support for authenticated encryption ciphers, used mainly for Galois/Counter Mode (GCM) and CCM mode of Advanced Encryption Standard (AES) encryption.
  • TLS Extensions definition and AES cipher suites were added.[47]

All TLS versions were further refined in RFC 6176 in March 2011, removing their backward compatibility with SSL such that TLS sessions never negotiate the use of Secure Sockets Layer (SSL) version 2.0. As of April 2025 there is no formal date for TLS 1.2 to be deprecated. The specifications for TLS 1.2 became redefined as well by the Standards Track Document RFC 8446 to keep it as secure as possible; it is to be seen as a failover protocol now, meant only to be negotiated with clients which are unable to talk over TLS 1.3 (The original RFC 5246 definition for TLS 1.2 is since then obsolete).

TLS 1.3

[edit]

TLS 1.3 was defined in RFC 8446 in August 2018.[6] It is based on the earlier TLS 1.2 specification. Major differences from TLS 1.2 include:[51]

  • Separating key agreement and authentication algorithms from the cipher suites[47][6]: §11 
  • Removing support for weak and less-used named elliptic curves
  • Removing support for MD5 and SHA-224 cryptographic hash functions
  • Requiring digital signatures even when a previous configuration is used
  • Integrating HKDF and the semi-ephemeral DH proposal
  • Replacing resumption with PSK and tickets
  • Supporting 1-RTT handshakes and initial support for 0-RTT
  • Mandating perfect forward secrecy, by means of using ephemeral keys during the (EC)DH key agreement
  • Dropping support for many insecure or obsolete features including compression, renegotiation, non-AEAD ciphers, null ciphers,[52] non-PFS key exchange (among which are static RSA and static DH key exchanges), custom DHE groups, EC point format negotiation, Change Cipher Spec protocol, Hello message UNIX time, and the length field AD input to AEAD ciphers
  • Prohibiting SSL or RC4 negotiation for backwards compatibility
  • Integrating use of session hash
  • Deprecating use of the record layer version number and freezing the number for improved backwards compatibility
  • Moving some security-related algorithm details from an appendix to the specification and relegating ClientKeyShare to an appendix
  • Adding the ChaCha20 stream cipher with the Poly1305 message authentication code
  • Adding the Ed25519 and Ed448 digital signature algorithms
  • Adding the x25519 and x448 key exchange protocols
  • Adding support for sending multiple OCSP responses
  • Encrypting all handshake messages after the ServerHello, including server certificate

Network Security Services (NSS), the cryptography library developed by Mozilla and used by its web browser Firefox, enabled TLS 1.3 by default in February 2017.[53] TLS 1.3 support was subsequently added — but due to compatibility issues for a small number of users, not automatically enabled[54] — to Firefox 52.0, which was released in March 2017. TLS 1.3 was enabled by default in May 2018 with the release of Firefox 60.0.[55]

Google Chrome set TLS 1.3 as the default version for a short time in 2017. It then removed it as the default, due to incompatible middleboxes such as Blue Coat web proxies.[56]

The intolerance of the new version of TLS was protocol ossification; middleboxes had ossified the protocol's version parameter. As a result, version 1.3 mimics the wire image of version 1.2. This change occurred very late in the design process, only having been discovered during browser deployment.[57] The discovery of this intolerance also led to the prior version negotiation strategy, where the highest matching version was picked, being abandoned due to unworkable levels of ossification.[58] 'Greasing' an extension point, where one protocol participant claims support for non-existent extensions to ensure that unrecognised-but-actually-existent extensions are tolerated and so to resist ossification, was originally designed for TLS, but it has since been adopted elsewhere.[58]

During the IETF 100 Hackathon, which took place in Singapore in 2017, the TLS Group worked on adapting open-source applications to use TLS 1.3.[59][60] The TLS group was made up of individuals from Japan, United Kingdom, and Mauritius via the cyberstorm.mu team.[60] This work was continued in the IETF 101 Hackathon in London,[61] and the IETF 102 Hackathon in Montreal.[62]

wolfSSL enabled the use of TLS 1.3 as of version 3.11.1, released in May 2017.[63] As the first commercial TLS 1.3 implementation, wolfSSL 3.11.1 supported Draft 18 and now supports Draft 28,[64] the final version, as well as many older versions. A series of blogs were published on the performance difference between TLS 1.2 and 1.3.[65]

In , the popular OpenSSL project released version 1.1.1 of its library, in which support for TLS 1.3 was "the headline new feature".[66]

Support for TLS 1.3 was added to Secure Channel (schannel) for the GA releases of Windows 11 and Windows Server 2022.[67]

Enterprise Transport Security

[edit]

The Electronic Frontier Foundation praised TLS 1.3 and expressed concern about the variant protocol Enterprise Transport Security (ETS) that intentionally disables important security measures in TLS 1.3.[68] Originally called Enterprise TLS (eTLS), ETS is a published standard known as the 'ETSI TS103523-3', "Middlebox Security Protocol, Part3: Enterprise Transport Security". It is intended for use entirely within proprietary networks such as banking systems. ETS does not support forward secrecy so as to allow third-party organizations connected to the proprietary networks to be able to use their private key to monitor network traffic for the detection of malware and to make it easier to conduct audits.[69][70] Despite the claimed benefits, the EFF warned that the loss of forward secrecy could make it easier for data to be exposed along with saying that there are better ways to analyze traffic.[68]

Digital certificates

[edit]
Example of a website with digital certificate

A digital certificate certifies the ownership of a public key by the named subject of the certificate, and indicates certain expected usages of that key. This allows others (relying parties) to rely upon signatures or on assertions made by the private key that corresponds to the certified public key. Keystores and trust stores can be in various formats, such as .pem, .crt, .pfx, and .jks.

Certificate authorities

[edit]

TLS typically relies on a set of trusted third-party certificate authorities to establish the authenticity of certificates. Trust is usually anchored in a list of certificates distributed with user agent software,[71] and can be modified by the relying party.

According to Netcraft, who monitors active TLS certificates, the market-leading certificate authority (CA) has been Symantec since the beginning of their survey (or VeriSign before the authentication services business unit was purchased by Symantec). As of 2015, Symantec accounted for just under a third of all certificates and 44% of the valid certificates used by the 1 million busiest websites, as counted by Netcraft.[72] In 2017, Symantec sold its TLS/SSL business to DigiCert.[73] In an updated report, it was shown that IdenTrust, DigiCert, and Sectigo are the top 3 certificate authorities in terms of market share since May 2019.[74]

As a consequence of choosing X.509 certificates, certificate authorities and a public key infrastructure are necessary to verify the relation between a certificate and its owner, as well as to generate, sign, and administer the validity of certificates. While this can be more convenient than verifying the identities via a web of trust, the 2013 mass surveillance disclosures made it more widely known that certificate authorities are a weak point from a security standpoint, allowing man-in-the-middle attacks (MITM) if the certificate authority cooperates (or is compromised).[75][76]

On April 11, 2025, the CA/Browser Forum approved a ballot that will require all public TLS certificate lifespans to gradually reduce to 47 days by 2029 [77]. The ballot was proposed by Apple.[78]

Algorithms

[edit]

Key exchange or key agreement

[edit]

Before a client and server can begin to exchange information protected by TLS, they must securely exchange or agree upon an encryption key and a cipher to use when encrypting data (see § Cipher). Among the methods used for key exchange/agreement are: public and private keys generated with RSA (denoted TLS_RSA in the TLS handshake protocol), Diffie–Hellman (TLS_DH), ephemeral Diffie–Hellman (TLS_DHE), elliptic-curve Diffie–Hellman (TLS_ECDH), ephemeral elliptic-curve Diffie–Hellman (TLS_ECDHE), anonymous Diffie–Hellman (TLS_DH_anon),[25] pre-shared key (TLS_PSK)[79] and Secure Remote Password (TLS_SRP).[80]

The TLS_DH_anon and TLS_ECDH_anon key agreement methods do not authenticate the server or the user and hence are rarely used because those are vulnerable to man-in-the-middle attacks. Only TLS_DHE and TLS_ECDHE provide forward secrecy.

Public key certificates used during exchange/agreement also vary in the size of the public/private encryption keys used during the exchange and hence the robustness of the security provided. In July 2013, Google announced that it would no longer use 1024-bit public keys and would switch instead to 2048-bit keys to increase the security of the TLS encryption it provides to its users because the encryption strength is directly related to the key size.[81][82]

Cipher

[edit]

Cipher security against publicly known feasible attacks
Cipher Protocol version Status
Type Algorithm Nominal strength (bits) SSL 2.0 SSL 3.0
[n 1][n 2][n 3][n 4]
TLS 1.0
[n 1][n 3]
TLS 1.1
[n 1]
TLS 1.2
[n 1]
TLS 1.3
Block cipher with mode of operation
AES GCM[88][89][n 5] 256, 128 Secure Secure Defined for TLS 1.2 in RFCs
AES CCM[90][91][n 5] Secure Secure
AES CBC[n 6] Insecure Depends on mitigations Depends on mitigations Depends on mitigations
Camellia GCM[92][n 5] 256, 128 Secure
Camellia CBC[93][92][n 6] Insecure Depends on mitigations Depends on mitigations Depends on mitigations
ARIA GCM[94][n 5] 256, 128 Secure
ARIA CBC[94][n 6] Depends on mitigations Depends on mitigations Depends on mitigations
SEED CBC[95][n 6] 128 Insecure Depends on mitigations Depends on mitigations Depends on mitigations
3DES EDE CBC[n 6][n 7] 112[n 8] Insecure Insecure Insecure Insecure Insecure
GOST R 34.12-2015 Magma CTR[85][n 7] 256 Insecure Insecure Insecure Defined in RFC 4357, 9189
GOST R 34.12-2015 Kuznyechik CTR[85] 256 Secure Defined in RFC 9189
GOST R 34.12-2015 Magma MGM[85][n 5][n 7] 256 Insecure Defined in RFC 9367
GOST R 34.12-2015 Kuznyechik MGM[85][n 5] 256 Secure Defined in RFC 9367
IDEA CBC[n 6][n 7][n 9] 128 Insecure Insecure Insecure Insecure Removed from TLS 1.2
DES CBC[n 6][n 7][n 9] 56 Insecure Insecure Insecure Insecure
40[n 10] Insecure Insecure Insecure Forbidden in TLS 1.1 and later
RC2 CBC[n 6][n 7] 40[n 10] Insecure Insecure Insecure
ChaCha20-Poly1305[100][n 5] 256 Secure Secure Defined for TLS 1.2 in RFCs
RC4[n 11] 128 Insecure Insecure Insecure Insecure Insecure Prohibited in all versions of TLS[101]
40[n 10] Insecure Insecure Insecure
None Null[n 12] Insecure Insecure Insecure Insecure Insecure Defined for TLS 1.2 in RFCs

Notes

  1. ^ a b c d RFC 5746 must be implemented to fix a renegotiation flaw that would otherwise break this protocol.
  2. ^ If libraries implement fixes listed in RFC 5746, this violates the SSL 3.0 specification, which the IETF cannot change unlike TLS. Most current libraries implement the fix and disregard the violation that this causes.
  3. ^ a b The BEAST attack breaks all block ciphers (CBC ciphers) used in SSL 3.0 and TLS 1.0 unless mitigated by the client or the server. See § Web browsers.
  4. ^ The POODLE attack breaks all block ciphers (CBC ciphers) used in SSL 3.0 unless mitigated by the client or the server. See § Web browsers.
  5. ^ a b c d e f g AEAD ciphers (such as GCM and CCM) can only be used in TLS 1.2 or later.
  6. ^ a b c d e f g h CBC ciphers can be attacked with the Lucky Thirteen attack if the library is not written carefully to eliminate timing side channels.
  7. ^ a b c d e f The Sweet32 attack breaks block ciphers with a block size of 64 bits.[96]
  8. ^ Although the key length of 3DES is 168 bits, effective security strength of 3DES is only 112 bits,[97] which is below the recommended minimum of 128 bits.[98]
  9. ^ a b IDEA and DES have been removed from TLS 1.2.[99]
  10. ^ a b c 40-bit strength cipher suites were intentionally designed with reduced key lengths to comply with since-rescinded US regulations forbidding the export of cryptographic software containing certain strong encryption algorithms (see Export of cryptography from the United States). These weak suites are forbidden in TLS 1.1 and later.
  11. ^ Use of RC4 in all versions of TLS is prohibited because RC4 attacks weaken or break RC4 used in SSL/TLS.
  12. ^ Authentication only, no encryption.

Data integrity

[edit]

A message authentication code (MAC) is used for data integrity. HMAC is used for CBC mode of block ciphers. Authenticated encryption (AEAD) such as GCM and CCM mode uses AEAD-integrated MAC and does not use HMAC.[6]: §8.4  HMAC-based PRF, or HKDF is used for TLS handshake.

Data integrity
Algorithm SSL 2.0 SSL 3.0 TLS 1.0 TLS 1.1 TLS 1.2 TLS 1.3 Status
HMAC-MD5 Yes Yes Yes Yes Yes No Defined for TLS 1.2 in RFCs
HMAC-SHA1 No Yes Yes Yes Yes No
HMAC-SHA256/384 No No No No Yes No
AEAD No No No No Yes Yes
GOST 28147-89 IMIT[85] No No No No Yes No Defined for TLS 1.2 in RFC 9189.
GOST R 34.12-2015 AEAD[85] No No No No No Yes Defined for TLS 1.3 in RFC 9367.

Applications and adoption

[edit]

In applications design, TLS is usually implemented on top of Transport Layer protocols, encrypting all of the protocol-related data of protocols such as HTTP, FTP, SMTP, NNTP and XMPP.

Historically, TLS has been used primarily with reliable transport protocols such as the Transmission Control Protocol (TCP). However, it has also been implemented with datagram-oriented transport protocols, such as the User Datagram Protocol (UDP) and the Datagram Congestion Control Protocol (DCCP), usage of which has been standardized independently using the term Datagram Transport Layer Security (DTLS).

Websites

[edit]

A primary use of TLS is to secure World Wide Web traffic between a website and a web browser encoded with the HTTP protocol. This use of TLS to secure HTTP traffic constitutes the HTTPS protocol.[102]

Website protocol support (September 2025)
Protocol
version
Website
support[103]
Security[103][104]
Unsupported: SSL 2.0 0.1% Insecure
Unsupported: SSL 3.0 1.0% Insecure[105]
Unsupported: TLS 1.0 23.5% Deprecated[22][23][24]
Unsupported: TLS 1.1 25.2% Deprecated[22][23][24]
Supported: TLS 1.2 100% Depends on cipher[n 1] and client mitigations[n 2]
Latest version: TLS 1.3 75.3% Secure

Notes

  1. ^ see § Cipher table above
  2. ^ see § Web browsers and § Attacks against TLS/SSL sections

Web browsers

[edit]

As of March 2025, the latest versions of all major web browsers support TLS 1.2 and 1.3 and have them enabled by default, with the exception of IE 11. TLS 1.0 and 1.1 are disabled by default on the latest versions of all major browsers.

Mitigations against known attacks are not enough yet:

  • Mitigations against POODLE attack: some browsers already prevent fallback to SSL 3.0; however, this mitigation needs to be supported by not only clients but also servers. Disabling SSL 3.0 itself, implementation of "anti-POODLE record splitting", or denying CBC ciphers in SSL 3.0 is required.
    • Google Chrome: complete (TLS_FALLBACK_SCSV is implemented since version 33, fallback to SSL 3.0 is disabled since version 39, SSL 3.0 itself is disabled by default since version 40. Support of SSL 3.0 itself was dropped since version 44.)
    • Mozilla Firefox: complete (support of SSL 3.0 itself is dropped since version 39. SSL 3.0 itself is disabled by default and fallback to SSL 3.0 are disabled since version 34, TLS_FALLBACK_SCSV is implemented since version 35. In ESR, SSL 3.0 itself is disabled by default and TLS_FALLBACK_SCSV is implemented since ESR 31.3.0.)
    • Internet Explorer: partial (only in version 11, SSL 3.0 is disabled by default since April 2015. Version 10 and older are still vulnerable against POODLE.)
    • Opera: complete (TLS_FALLBACK_SCSV is implemented since version 20, "anti-POODLE record splitting", which is effective only with client-side implementation, is implemented since version 25, SSL 3.0 itself is disabled by default since version 27. Support of SSL 3.0 itself will be dropped since version 31.)
    • Safari: complete (only on OS X 10.8 and later and iOS 8, CBC ciphers during fallback to SSL 3.0 is denied, but this means it will use RC4, which is not recommended as well. Support of SSL 3.0 itself is dropped on OS X 10.11 and later and iOS 9.)
  • Mitigation against RC4 attacks:
    • Google Chrome disabled RC4 except as a fallback since version 43. RC4 is disabled since Chrome 48.
    • Firefox disabled RC4 except as a fallback since version 36. Firefox 44 disabled RC4 by default.
    • Opera disabled RC4 except as a fallback since version 30. RC4 is disabled since Opera 35.
    • Internet Explorer for Windows 7/Server 2008 R2 and for Windows 8/Server 2012 have set the priority of RC4 to lowest and can also disable RC4 except as a fallback through registry settings. Internet Explorer 11 Mobile 11 for Windows Phone 8.1 disable RC4 except as a fallback if no other enabled algorithm works. Edge [Legacy] and IE 11 disable RC4 completely in August 2016.
  • Mitigation against FREAK attack:
    • The Android Browser included with Android 4.0 and older is still vulnerable to the FREAK attack.
    • Internet Explorer 11 Mobile is still vulnerable to the FREAK attack.
    • Google Chrome, Internet Explorer (desktop), Safari (desktop & mobile), and Opera (mobile) have FREAK mitigations in place.
    • Mozilla Firefox on all platforms and Google Chrome on Windows were not affected by FREAK.

Libraries

[edit]

Most SSL and TLS programming libraries are free and open-source software.

  • BoringSSL, a fork of OpenSSL for Chrome/Chromium and Android as well as other Google applications.
  • Botan, a BSD-licensed cryptographic library written in C++.
  • BSAFE Micro Edition Suite: a multi-platform implementation of TLS written in C using a FIPS-validated cryptographic module
  • BSAFE SSL-J: a TLS library providing both a proprietary API and JSSE API, using FIPS-validated cryptographic module
  • cryptlib: a portable open source cryptography library (includes TLS/SSL implementation)
  • Delphi programmers may use a library called Indy which utilizes OpenSSL or alternatively ICS which supports TLS 1.3 now.
  • GnuTLS: a free implementation (LGPL licensed)
  • Java Secure Socket Extension (JSSE): the Java API and provider implementation (named SunJSSE)[106]
  • LibreSSL: a fork of OpenSSL by OpenBSD project.
  • MatrixSSL: a dual licensed implementation
  • Mbed TLS (previously PolarSSL): A tiny SSL library implementation for embedded devices that is designed for ease of use
  • Network Security Services: FIPS 140 validated open source library
  • OpenSSL: a free implementation (BSD license with some extensions)
  • Schannel: an implementation of SSL and TLS Microsoft Windows as part of its package.
  • Secure Transport: an implementation of SSL and TLS used in OS X and iOS as part of their packages.
  • wolfSSL (previously CyaSSL): Embedded SSL/TLS Library with a strong focus on speed and size.

A paper presented at the 2012 ACM conference on computer and communications security[107] showed that many applications used some of these SSL libraries incorrectly, leading to vulnerabilities. According to the authors:

"The root cause of most of these vulnerabilities is the terrible design of the APIs to the underlying SSL libraries. Instead of expressing high-level security properties of network tunnels such as confidentiality and authentication, these APIs expose low-level details of the SSL protocol to application developers. As a consequence, developers often use SSL APIs incorrectly, misinterpreting and misunderstanding their manifold parameters, options, side effects, and return values."

Other uses

[edit]

The Simple Mail Transfer Protocol (SMTP) can also be protected by TLS. These applications use public key certificates to verify the identity of endpoints.

TLS can also be used for tunneling an entire network stack to create a VPN, which is the case with OpenVPN and OpenConnect. Many vendors have by now married TLS's encryption and authentication capabilities with authorization. There has also been substantial development since the late 1990s in creating client technology outside of Web-browsers, in order to enable support for client/server applications. Compared to traditional IPsec VPN technologies, TLS has some inherent advantages in firewall and NAT traversal that make it easier to administer for large remote-access populations.

TLS is also a standard method for protecting Session Initiation Protocol (SIP) application signaling. TLS can be used for providing authentication and encryption of the SIP signaling associated with VoIP and other SIP-based applications.[108]

Security

[edit]

Attacks against TLS/SSL

[edit]

Significant attacks against TLS/SSL are listed below.

In February 2015, IETF issued an informational RFC[109] summarizing the various known attacks against TLS/SSL.

Renegotiation attack

[edit]

A vulnerability of the renegotiation procedure was discovered in August 2009 that can lead to plaintext injection attacks against SSL 3.0 and all current versions of TLS.[110] For example, it allows an attacker who can hijack an https connection to splice their own requests into the beginning of the conversation the client has with the web server. The attacker cannot actually decrypt the client–server communication, so it is different from a typical man-in-the-middle attack. A short-term fix is for web servers to stop allowing renegotiation, which typically will not require other changes unless client certificate authentication is used. To fix the vulnerability, a renegotiation indication extension was proposed for TLS.[111] It will require the client and server to include and verify information about previous handshakes in any renegotiation handshakes.[112] This extension has been implemented by several libraries.[113][114][115]

Downgrade attacks: FREAK attack and Logjam attack

[edit]

A protocol downgrade attack (also called a version rollback attack) tricks a web server into negotiating connections with previous versions of TLS (such as SSLv2) that have long since been abandoned as insecure.

Previous modifications to the original protocols, like False Start[116] (adopted and enabled by Google Chrome[117]) or Snap Start, reportedly introduced limited TLS protocol downgrade attacks[118] or allowed modifications to the cipher suite list sent by the client to the server. In doing so, an attacker might succeed in influencing the cipher suite selection in an attempt to downgrade the cipher suite negotiated to use either a weaker symmetric encryption algorithm or a weaker key exchange.[119] A paper presented at an ACM conference on computer and communications security in 2012 demonstrated that the False Start extension was at risk: in certain circumstances it could allow an attacker to recover the encryption keys offline and to access the encrypted data.[120]

Encryption downgrade attacks can force servers and clients to negotiate a connection using cryptographically weak keys. In 2014, a man-in-the-middle attack called FREAK was discovered affecting the OpenSSL stack, the default Android web browser, and some Safari browsers.[121] The attack involved tricking servers into negotiating a TLS connection using cryptographically weak 512 bit encryption keys.

Logjam is a security exploit discovered in May 2015 that exploits the option of using legacy "export-grade" 512-bit Diffie–Hellman groups dating back to the 1990s.[122] It forces susceptible servers to downgrade to cryptographically weak 512-bit Diffie–Hellman groups. An attacker can then deduce the keys the client and server determine using the Diffie–Hellman key exchange.

Cross-protocol attacks: DROWN

[edit]

The DROWN attack is an exploit that attacks servers supporting contemporary SSL/TLS protocol suites by exploiting their support for the obsolete, insecure, SSLv2 protocol to leverage an attack on connections using up-to-date protocols that would otherwise be secure.[123][124] DROWN exploits a vulnerability in the protocols used and the configuration of the server, rather than any specific implementation error. Full details of DROWN were announced in March 2016, together with a patch for the exploit. At that time, more than 81,000 of the top 1 million most popular websites were among the TLS protected websites that were vulnerable to the DROWN attack.[124]

BEAST attack

[edit]

On September 23, 2011, researchers Thai Duong and Juliano Rizzo demonstrated a proof of concept called BEAST (Browser Exploit Against SSL/TLS)[125] using a Java applet to violate same origin policy constraints, for a long-known cipher block chaining (CBC) vulnerability in TLS 1.0:[126][127] an attacker observing 2 consecutive ciphertext blocks C0, C1 can test if the plaintext block P1 is equal to x by choosing the next plaintext block P2 = x ⊕ C0 ⊕ C1; as per CBC operation, C2 = E(C1 ⊕ P2) = E(C1 ⊕ x ⊕ C0 ⊕ C1) = E(C0 ⊕ x), which will be equal to C1 if x = P1. Practical exploits had not been previously demonstrated for this vulnerability, which was originally discovered by Phillip Rogaway[128] in 2002. The vulnerability of the attack had been fixed with TLS 1.1 in 2006, but TLS 1.1 had not seen wide adoption prior to this attack demonstration.

RC4 as a stream cipher is immune to BEAST attack. Therefore, RC4 was widely used as a way to mitigate BEAST attack on the server side. However, in 2013, researchers found more weaknesses in RC4. Thereafter enabling RC4 on server side was no longer recommended.[129]

Chrome and Firefox themselves are not vulnerable to BEAST attack,[130][131] however, Mozilla updated their NSS libraries to mitigate BEAST-like attacks. NSS is used by Mozilla Firefox and Google Chrome to implement SSL. Some web servers that have a broken implementation of the SSL specification may stop working as a result.[132]

Microsoft released Security Bulletin MS12-006 on January 10, 2012, which fixed the BEAST vulnerability by changing the way that the Windows Secure Channel (Schannel) component transmits encrypted network packets from the server end.[133] Users of Internet Explorer (prior to version 11) that run on older versions of Windows (Windows 7, Windows 8 and Windows Server 2008 R2) can restrict use of TLS to 1.1 or higher.

Apple fixed BEAST vulnerability by implementing 1/n-1 split and turning it on by default in OS X Mavericks, released on October 22, 2013.[134]

CRIME and BREACH attacks

[edit]

The authors of the BEAST attack are also the creators of the later CRIME attack, which can allow an attacker to recover the content of web cookies when data compression is used along with TLS.[135][136] When used to recover the content of secret authentication cookies, it allows an attacker to perform session hijacking on an authenticated web session.

While the CRIME attack was presented as a general attack that could work effectively against a large number of protocols, including but not limited to TLS, and application-layer protocols such as SPDY or HTTP, only exploits against TLS and SPDY were demonstrated and largely mitigated in browsers and servers. The CRIME exploit against HTTP compression has not been mitigated at all, even though the authors of CRIME have warned that this vulnerability might be even more widespread than SPDY and TLS compression combined. In 2013 a new instance of the CRIME attack against HTTP compression, dubbed BREACH, was announced. Based on the CRIME attack a BREACH attack can extract login tokens, email addresses or other sensitive information from TLS encrypted web traffic in as little as 30 seconds (depending on the number of bytes to be extracted), provided the attacker tricks the victim into visiting a malicious web link or is able to inject content into valid pages the user is visiting (ex: a wireless network under the control of the attacker).[137] All versions of TLS and SSL are at risk from BREACH regardless of the encryption algorithm or cipher used.[138] Unlike previous instances of CRIME, which can be successfully defended against by turning off TLS compression or SPDY header compression, BREACH exploits HTTP compression which cannot realistically be turned off, as virtually all web servers rely upon it to improve data transmission speeds for users.[137] This is a known limitation of TLS as it is susceptible to chosen-plaintext attack against the application-layer data it was meant to protect.

Timing attacks on padding

[edit]

Earlier TLS versions were vulnerable against the padding oracle attack discovered in 2002. A novel variant, called the Lucky Thirteen attack, was published in 2013.

Some experts[98] also recommended avoiding triple DES CBC. Since the last supported ciphers developed to support any program using Windows XP's SSL/TLS library like Internet Explorer on Windows XP are RC4 and Triple-DES, and since RC4 is now deprecated (see discussion of RC4 attacks), this makes it difficult to support any version of SSL for any program using this library on XP.

A fix was released in 2014 as the Encrypt-then-MAC extension to the TLS specification.[139] The Lucky Thirteen attack can be mitigated in TLS 1.2 by using only AES_GCM ciphers; AES_CBC remains vulnerable. SSL may safeguard email, VoIP, and other types of communications over insecure networks in addition to its primary use case of secure data transmission between a client and the server.[2]

POODLE attack

[edit]

On October 14, 2014, Google researchers published a vulnerability in the design of SSL 3.0, which makes CBC mode of operation with SSL 3.0 vulnerable to a padding attack (CVE-2014-3566). They named this attack POODLE (Padding Oracle On Downgraded Legacy Encryption). On average, attackers only need to make 256 SSL 3.0 requests to reveal one byte of encrypted messages.[105]

Although this vulnerability only exists in SSL 3.0 and most clients and servers support TLS 1.0 and above, all major browsers voluntarily downgrade to SSL 3.0 if the handshakes with newer versions of TLS fail unless they provide the option for a user or administrator to disable SSL 3.0 and the user or administrator does so[citation needed]. Therefore, the man-in-the-middle can first conduct a version rollback attack and then exploit this vulnerability.[105]

On December 8, 2014, a variant of POODLE was announced that impacts TLS implementations that do not properly enforce padding byte requirements.[140]

RC4 attacks

[edit]

Despite the existence of attacks on RC4 that broke its security, cipher suites in SSL and TLS that were based on RC4 were still considered secure prior to 2013 based on the way in which they were used in SSL and TLS. In 2011, the RC4 suite was actually recommended as a workaround for the BEAST attack.[141] New forms of attack disclosed in March 2013 conclusively demonstrated the feasibility of breaking RC4 in TLS, suggesting it was not a good workaround for BEAST.[104] An attack scenario was proposed by AlFardan, Bernstein, Paterson, Poettering and Schuldt that used newly discovered statistical biases in the RC4 key table[142] to recover parts of the plaintext with a large number of TLS encryptions.[143][144] An attack on RC4 in TLS and SSL that requires 13 × 220 encryptions to break RC4 was unveiled on 8 July 2013 and later described as "feasible" in the accompanying presentation at a USENIX Security Symposium in August 2013.[145][146] In July 2015, subsequent improvements in the attack make it increasingly practical to defeat the security of RC4-encrypted TLS.[147]

As many modern browsers have been designed to defeat BEAST attacks (except Safari for Mac OS X 10.7 or earlier, for iOS 6 or earlier, and for Windows; see § Web browsers), RC4 is no longer a good choice for TLS 1.0. The CBC ciphers which were affected by the BEAST attack in the past have become a more popular choice for protection.[98] Mozilla and Microsoft recommend disabling RC4 where possible.[148][149] In februari 2015, the use of RC4 cipher suites was officially prohibited in all versions of TLS.[101]

On September 1, 2015, Microsoft, Google, and Mozilla announced that RC4 cipher suites would be disabled by default in their browsers (Microsoft Edge [Legacy], Internet Explorer 11 on Windows 7/8.1/10, Firefox, and Chrome) in early 2016.[150][151][152]

Truncation attack

[edit]

A TLS (logout) truncation attack blocks a victim's account logout requests so that the user unknowingly remains logged into a web service. When the request to sign out is sent, the attacker injects an unencrypted TCP FIN message (no more data from sender) to close the connection. The server therefore does not receive the logout request and is unaware of the abnormal termination.[153]

Published in July 2013,[154][155] the attack causes web services such as Gmail and Hotmail to display a page that informs the user that they have successfully signed-out, while ensuring that the user's browser maintains authorization with the service, allowing an attacker with subsequent access to the browser to access and take over control of the user's logged-in account. The attack does not rely on installing malware on the victim's computer; attackers need only place themselves between the victim and the web server (e.g., by setting up a rogue wireless hotspot).[153] This vulnerability also requires access to the victim's computer. Another possibility is when using FTP the data connection can have a false FIN in the data stream, and if the protocol rules for exchanging close_notify alerts is not adhered to a file can be truncated.

Plaintext attack against DTLS

[edit]

In February 2013 two researchers from Royal Holloway, University of London discovered a timing attack[156] which allowed them to recover (parts of the) plaintext from a DTLS connection using the OpenSSL or GnuTLS implementation of DTLS when Cipher Block Chaining mode encryption was used.

Unholy PAC attack

[edit]

This attack, discovered in mid-2016, exploits weaknesses in the Web Proxy Autodiscovery Protocol (WPAD) to expose the URL that a web user is attempting to reach via a TLS-enabled web link.[157] Disclosure of a URL can violate a user's privacy, not only because of the website accessed, but also because URLs are sometimes used to authenticate users. Document sharing services, such as those offered by Google and Dropbox, also work by sending a user a security token that is included in the URL. An attacker who obtains such URLs may be able to gain full access to a victim's account or data.

The exploit works against almost all browsers and operating systems.

Sweet32 attack

[edit]

The Sweet32 attack breaks all 64-bit block ciphers used in CBC mode as used in TLS by exploiting a birthday attack and either a man-in-the-middle attack or injection of a malicious JavaScript into a web page. The purpose of the man-in-the-middle attack or the JavaScript injection is to allow the attacker to capture enough traffic to mount a birthday attack.[158]

Implementation errors: Heartbleed bug, BERserk attack, Cloudflare bug

[edit]

The Heartbleed bug is a serious vulnerability specific to the implementation of SSL/TLS in the popular OpenSSL cryptographic software library, affecting versions 1.0.1 to 1.0.1f. This weakness, reported in April 2014, allows attackers to steal private keys from servers that should normally be protected.[159] The Heartbleed bug allows anyone on the Internet to read the memory of the systems protected by the vulnerable versions of the OpenSSL software. This compromises the secret private keys associated with the public certificates used to identify the service providers and to encrypt the traffic, the names and passwords of the users and the actual content. This allows attackers to eavesdrop on communications, steal data directly from the services and users and to impersonate services and users.[160] The vulnerability is caused by a buffer over-read bug in the OpenSSL software, rather than a defect in the SSL or TLS protocol specification.

In September 2014, a variant of Daniel Bleichenbacher's PKCS#1 v1.5 RSA Signature Forgery vulnerability[161] was announced by Intel Security Advanced Threat Research. This attack, dubbed BERserk, is a result of incomplete ASN.1 length decoding of public key signatures in some SSL implementations, and allows a man-in-the-middle attack by forging a public key signature.[162]

In February 2015, after media reported the hidden pre-installation of superfish adware on some Lenovo notebooks,[163] a researcher found a trusted root certificate on affected Lenovo machines to be insecure, as the keys could easily be accessed using the company name, Komodia, as a passphrase.[164] The Komodia library was designed to intercept client-side TLS/SSL traffic for parental control and surveillance, but it was also used in numerous adware programs, including Superfish, that were often surreptitiously installed unbeknownst to the computer user. In turn, these potentially unwanted programs installed the corrupt root certificate, allowing attackers to completely control web traffic and confirm false websites as authentic.

In May 2016, it was reported that dozens of Danish HTTPS-protected websites belonging to Visa Inc. were vulnerable to attacks allowing hackers to inject malicious code and forged content into the browsers of visitors.[165] The attacks worked because the TLS implementation used on the affected servers incorrectly reused random numbers (nonces) that are intended to be used only once, ensuring that each TLS handshake is unique.[165]

In February 2017, an implementation error caused by a single mistyped character in code used to parse HTML created a buffer overflow error on Cloudflare servers. Similar in its effects to the Heartbleed bug discovered in 2014, this overflow error, widely known as Cloudbleed, allowed unauthorized third parties to read data in the memory of programs running on the servers—data that should otherwise have been protected by TLS.[166]

Survey of websites vulnerable to attacks

[edit]

As of July 2021, the Trustworthy Internet Movement estimated the ratio of websites that are vulnerable to TLS attacks.[103]

Survey of the TLS vulnerabilities of the most popular websites
Attacks Security
Insecure Depends Secure Other
Renegotiation attack < 0.1%
support insecure renegotiation
< 0.1%
support both
99.7%
support secure renegotiation
0.3%
no support
RC4 attacks 0.2%
support RC4 suites used with modern browsers
3.0%
support some RC4 suites
96.9%
no support
TLS Compression (CRIME attack) 0%
vulnerable
Heartbleed 0%
vulnerable
ChangeCipherSpec injection attack < 0.1%
vulnerable and exploitable
< 0.1%
vulnerable, not exploitable
99.5%
not vulnerable
0.4%
unknown
POODLE attack against TLS
(Original POODLE against SSL 3.0 is not included)
< 0.1%
vulnerable and exploitable
99.9%
not vulnerable
0.1%
unknown
Protocol downgrade 4.1%
Downgrade defence not supported
80.2%
Downgrade defence supported
15.7%
unknown

Forward secrecy

[edit]

Forward secrecy is a property of cryptographic systems which ensures that a session key derived from a set of public and private keys will not be compromised if one of the private keys is compromised in the future.[167] Without forward secrecy, if the server's private key is compromised, not only will all future TLS-encrypted sessions using that server certificate be compromised, but also any past sessions that used it as well (provided that these past sessions were intercepted and stored at the time of transmission).[168] An implementation of TLS can provide forward secrecy by requiring the use of ephemeral Diffie–Hellman key exchange to establish session keys, and some notable TLS implementations do so exclusively: e.g., Gmail and other Google HTTPS services that use OpenSSL.[169] However, many clients and servers supporting TLS (including browsers and web servers) are not configured to implement such restrictions.[170][171] In practice, unless a web service uses Diffie–Hellman key exchange to implement forward secrecy, all of the encrypted web traffic to and from that service can be decrypted by a third party if it obtains the server's master (private) key; e.g., by means of a court order.[172]

Even where Diffie–Hellman key exchange is implemented, server-side session management mechanisms can impact forward secrecy. The use of TLS session tickets (a TLS extension) causes the session to be protected by AES128-CBC-SHA256 regardless of any other negotiated TLS parameters, including forward secrecy ciphersuites, and the long-lived TLS session ticket keys defeat the attempt to implement forward secrecy.[173][174][175] Stanford University research in 2014 also found that of 473,802 TLS servers surveyed, 82.9% of the servers deploying ephemeral Diffie–Hellman (DHE) key exchange to support forward secrecy were using weak Diffie–Hellman parameters. These weak parameter choices could potentially compromise the effectiveness of the forward secrecy that the servers sought to provide.[176]

Since late 2011, Google has provided forward secrecy with TLS by default to users of its Gmail service, along with Google Docs and encrypted search, among other services.[177] Since November 2013, Twitter has provided forward secrecy with TLS to users of its service.[178] As of August 2019, about 80% of TLS-enabled websites are configured to use cipher suites that provide forward secrecy to most web browsers.[103]

TLS interception

[edit]

TLS interception (or HTTPS interception if applied particularly to that protocol) is the practice of intercepting an encrypted data stream in order to decrypt it, read and possibly manipulate it, and then re-encrypt it and send the data on its way again. This is done by way of a "transparent proxy": the interception software terminates the incoming TLS connection, inspects the HTTP plaintext, and then creates a new TLS connection to the destination.[179]

TLS/HTTPS interception is used as an information security measure by network operators in order to be able to scan for and protect against the intrusion of malicious content into the network, such as computer viruses and other malware.[179] Such content could otherwise not be detected as long as it is protected by encryption, which is increasingly the case as a result of the routine use of HTTPS and other secure protocols.

A significant drawback of TLS/HTTPS interception is that it introduces new security risks of its own. One notable limitation is that it provides a point where network traffic is available unencrypted thus giving attackers an incentive to attack this point in particular in order to gain access to otherwise secure content. The interception also allows the network operator, or persons who gain access to its interception system, to perform man-in-the-middle attacks against network users. A 2017 study found that "HTTPS interception has become startlingly widespread, and that interception products as a class have a dramatically negative impact on connection security".[179]

Protocol details

[edit]

The TLS protocol exchanges records, which encapsulate the data to be exchanged in a specific format (see below). Each record can be compressed, padded, appended with a message authentication code (MAC), or encrypted, all depending on the state of the connection. Each record has a content type field that designates the type of data encapsulated, a length field and a TLS version field. The data encapsulated may be control or procedural messages of the TLS itself, or simply the application data needed to be transferred by TLS. The specifications (cipher suite, keys etc.) required to exchange application data by TLS, are agreed upon in the "TLS handshake" between the client requesting the data and the server responding to requests. The protocol therefore defines both the structure of payloads transferred in TLS and the procedure to establish and monitor the transfer.

TLS handshake

[edit]
Simplified illustration of the full TLS 1.2 handshake with timing information

When the connection starts, the record encapsulates a "control" protocol – the handshake messaging protocol (content type 22). This protocol is used to exchange all the information required by both sides for the exchange of the actual application data by TLS. It defines the format of messages and the order of their exchange. These may vary according to the demands of the client and server – i.e., there are several possible procedures to set up the connection. This initial exchange results in a successful TLS connection (both parties ready to transfer application data with TLS) or an alert message (as specified below).

Basic TLS handshake

[edit]

A typical connection example follows, illustrating a handshake where the server (but not the client) is authenticated by its certificate:

  1. Negotiation phase:
    • A client sends a ClientHello message specifying the highest TLS protocol version it supports, a random number, a list of suggested cipher suites and suggested compression methods. If the client is attempting to perform a resumed handshake, it may send a session ID. If the client can use Application-Layer Protocol Negotiation, it may include a list of supported application protocols, such as HTTP/2.
    • The server responds with a ServerHello message, containing the chosen protocol version, a random number, cipher suite and compression method from the choices offered by the client. To confirm or allow resumed handshakes the server may send a session ID. The chosen protocol version should be the highest that both the client and server support. For example, if the client supports TLS version 1.1 and the server supports version 1.2, version 1.1 should be selected; version 1.2 should not be selected.
    • The server sends its Certificate message (depending on the selected cipher suite, this may be omitted by the server).[180]
    • The server sends its ServerKeyExchange message (depending on the selected cipher suite, this may be omitted by the server). This message is sent for all DHE, ECDHE and DH_anon cipher suites.[25]
    • The server sends a ServerHelloDone message, indicating it is done with handshake negotiation.
    • The client responds with a ClientKeyExchange message, which may contain a PreMasterSecret, public key, or nothing. (Again, this depends on the selected cipher.) This PreMasterSecret is encrypted using the public key of the server certificate.
    • The client and server then use the random numbers and PreMasterSecret to compute a common secret, called the "master secret". All other key data (session keys such as IV, symmetric encryption key, MAC key[181]) for this connection is derived from this master secret (and the client- and server-generated random values), which is passed through a carefully designed pseudorandom function.
  2. The client now sends a ChangeCipherSpec record, essentially telling the server, "Everything I tell you from now on will be authenticated (and encrypted if encryption parameters were present in the server certificate)." The ChangeCipherSpec is itself a record-level protocol with content type of 20.
    • The client sends an authenticated and encrypted Finished message, containing a hash and MAC over the previous handshake messages.
    • The server will attempt to decrypt the client's Finished message and verify the hash and MAC. If the decryption or verification fails, the handshake is considered to have failed and the connection should be terminated.
  3. Finally, the server sends a ChangeCipherSpec, telling the client, "Everything I tell you from now on will be authenticated (and encrypted, if encryption was negotiated)."
    • The server sends its authenticated and encrypted Finished message.
    • The client performs the same decryption and verification procedure as the server did in the previous step.
  4. Application phase: at this point, the "handshake" is complete and the application protocol is enabled, with content type of 23. Application messages exchanged between client and server will also be authenticated and optionally encrypted exactly like in their Finished message. Otherwise, the content type will return 25 and the client will not authenticate.

Client-authenticated TLS handshake

[edit]

The following full example shows a client being authenticated (in addition to the server as in the example above; see mutual authentication) via TLS using certificates exchanged between both peers.

  1. Negotiation Phase:
    • A client sends a ClientHello message specifying the highest TLS protocol version it supports, a random number, a list of suggested cipher suites and compression methods.
    • The server responds with a ServerHello message, containing the chosen protocol version, a random number, cipher suite and compression method from the choices offered by the client. The server may also send a session id as part of the message to perform a resumed handshake.
    • The server sends its Certificate message (depending on the selected cipher suite, this may be omitted by the server).[180]
    • The server sends its ServerKeyExchange message (depending on the selected cipher suite, this may be omitted by the server). This message is sent for all DHE, ECDHE and DH_anon ciphersuites.[1]
    • The server sends a CertificateRequest message, to request a certificate from the client.
    • The server sends a ServerHelloDone message, indicating it is done with handshake negotiation.
    • The client responds with a Certificate message, which contains the client's certificate, but not its private key.
    • The client sends a ClientKeyExchange message, which may contain a PreMasterSecret, public key, or nothing. (Again, this depends on the selected cipher.) This PreMasterSecret is encrypted using the public key of the server certificate.
    • The client sends a CertificateVerify message, which is a signature over the previous handshake messages using the client's certificate's private key. This signature can be verified by using the client's certificate's public key. This lets the server know that the client has access to the private key of the certificate and thus owns the certificate.
    • The client and server then use the random numbers and PreMasterSecret to compute a common secret, called the "master secret". All other key data ("session keys") for this connection is derived from this master secret (and the client- and server-generated random values), which is passed through a carefully designed pseudorandom function.
  2. The client now sends a ChangeCipherSpec record, essentially telling the server, "Everything I tell you from now on will be authenticated (and encrypted if encryption was negotiated). "The ChangeCipherSpec is itself a record-level protocol and has type 20 and not 22.
    • Finally, the client sends an encrypted Finished message, containing a hash and MAC over the previous handshake messages.
    • The server will attempt to decrypt the client's Finished message and verify the hash and MAC. If the decryption or verification fails, the handshake is considered to have failed and the connection should be torn down.
  3. Finally, the server sends a ChangeCipherSpec, telling the client, "Everything I tell you from now on will be authenticated (and encrypted if encryption was negotiated)."
    • The server sends its own encrypted Finished message.
    • The client performs the same decryption and verification procedure as the server did in the previous step.
  4. Application phase: at this point, the "handshake" is complete and the application protocol is enabled, with content type of 23. Application messages exchanged between client and server will also be encrypted exactly like in their Finished message.

Resumed TLS handshake

[edit]

Public key operations (e.g., RSA) are relatively expensive in terms of computational power. TLS provides a secure shortcut in the handshake mechanism to avoid these operations: resumed sessions. Resumed sessions are implemented using session IDs or session tickets.

Apart from the performance benefit, resumed sessions can also be used for single sign-on, as it guarantees that both the original session and any resumed session originate from the same client. This is of particular importance for the FTP over TLS/SSL protocol, which would otherwise suffer from a man-in-the-middle attack in which an attacker could intercept the contents of the secondary data connections.[182]

TLS 1.3 handshake

[edit]

The TLS 1.3 handshake was condensed to only one round trip compared to the two round trips required in previous versions of TLS/SSL.

To start the handshake, the client guesses which key exchange algorithm will be selected by the server and sends a ClientHello message to the server containing a list of supported ciphers (in order of the client's preference) and public keys for some or all of its key exchange guesses. If the client successfully guesses the key exchange algorithm, 1 round trip is eliminated from the handshake. After receiving the ClientHello, the server selects a cipher and sends back a ServerHello with its own public key, followed by server Certificate and Finished messages.[183]

After the client receives the server's finished message, it now is coordinated with the server on which cipher suite to use.[184]

Session IDs
[edit]

In an ordinary full handshake, the server sends a session id as part of the ServerHello message. The client associates this session id with the server's IP address and TCP port, so that when the client connects again to that server, it can use the session id to shortcut the handshake. In the server, the session id maps to the cryptographic parameters previously negotiated, specifically the "master secret". Both sides must have the same "master secret" or the resumed handshake will fail (this prevents an eavesdropper from using a session id). The random data in the ClientHello and ServerHello messages virtually guarantee that the generated connection keys will be different from in the previous connection. In the RFCs, this type of handshake is called an abbreviated handshake. It is also described in the literature as a restart handshake.

  1. Negotiation phase:
    • A client sends a ClientHello message specifying the highest TLS protocol version it supports, a random number, a list of suggested cipher suites and compression methods. Included in the message is the session id from the previous TLS connection.
    • The server responds with a ServerHello message, containing the chosen protocol version, a random number, cipher suite and compression method from the choices offered by the client. If the server recognizes the session id sent by the client, it responds with the same session id. The client uses this to recognize that a resumed handshake is being performed. If the server does not recognize the session id sent by the client, it sends a different value for its session id. This tells the client that a resumed handshake will not be performed. At this point, both the client and server have the "master secret" and random data to generate the key data to be used for this connection.
  2. The server now sends a ChangeCipherSpec record, essentially telling the client, "Everything I tell you from now on will be encrypted." The ChangeCipherSpec is itself a record-level protocol and has type 20 and not 22.
    • Finally, the server sends an encrypted Finished message, containing a hash and MAC over the previous handshake messages.
    • The client will attempt to decrypt the server's Finished message and verify the hash and MAC. If the decryption or verification fails, the handshake is considered to have failed and the connection should be torn down.
  3. Finally, the client sends a ChangeCipherSpec, telling the server, "Everything I tell you from now on will be encrypted."
    • The client sends its own encrypted Finished message.
    • The server performs the same decryption and verification procedure as the client did in the previous step.
  4. Application phase: at this point, the "handshake" is complete and the application protocol is enabled, with content type of 23. Application messages exchanged between client and server will also be encrypted exactly like in their Finished message.
Session tickets
[edit]

Instead of session IDs, TLS can also be extended via use of session tickets.[185] It defines a way to resume a TLS session without requiring that session-specific state is stored at the TLS server.

When using session tickets, the TLS server stores its session-specific state in a session ticket and sends the session ticket to the TLS client for storing. The client resumes a TLS session by sending the session ticket to the server, and the server resumes the TLS session according to the session-specific state in the ticket. The session ticket is encrypted and authenticated by the server, and the server verifies its validity before using its contents.

One particular weakness of this method with OpenSSL is that it always limits encryption and authentication security of the transmitted TLS session ticket to AES128-CBC-SHA256, no matter what other TLS parameters were negotiated for the actual TLS session.[174] This means that the state information (the TLS session ticket) is not as well protected as the TLS session itself. Of particular concern is OpenSSL's storage of the keys in an application-wide context (SSL_CTX), i.e. for the life of the application, and not allowing for re-keying of the AES128-CBC-SHA256 TLS session tickets without resetting the application-wide OpenSSL context (which is uncommon, error-prone and often requires manual administrative intervention).[175][173]

TLS record

[edit]

This is the general format of all TLS records.

General TLS record format
Offset Octet 0 1 2 3
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 Content Type Legacy version (major/minor) Length
4 32 Length (cont.)  
8 64 Protocol message(s)
12 96
Message Authentication Code (optional)
Padding (block ciphers only)
Content Type: 8 bits
This field identifies the Record Layer Protocol Type contained in this record.
Content Types
Hex Dec Type
0x14 20 ChangeCipherSpec
0x15 21 Alert
0x16 22 Handshake
0x17 23 Application
0x18 24 Heartbeat
Legacy version: 16 bits
This field identifies the major and minor version of TLS prior to TLS 1.3 for the contained message. For a ClientHello message, this need not be the highest version supported by the client. For TLS 1.3 and later, this must be set to 0x0303 and application must send supported versions in an extra message extension block.
Versions
Major
version
Minor
version
Version type
3 0 SSL 3.0
3 1 TLS 1.0
3 2 TLS 1.1
3 3 TLS 1.2
3 4 TLS 1.3
Length: 16 bits; Length < 214
The length of Protocol message(s), MAC and Padding fields combined. The length should not exceed 214 bytes (16 KiB).
Protocol message(s): variable
One or more messages identified by the Protocol field. Note that this field may be encrypted depending on the state of the connection. The length (in bytes) of all messages is indicated by the letter m.
Message Authentication Code (MAC): 16, 20, or 32 bytes (optional)
A message authentication code computed over the Protocol message(s) field, with additional key material included. 32 bytes for the SHA-256-based HMAC, 20 bytes for the SHA-1-based HMAC, 16 bytes for the MD5-based HMAC. Note that this field may be encrypted, or not included entirely, depending on the state of the connection. The length (in bytes) of the MAC is indicated by the letter q.
Padding: variable (optional)
Padding is only added when needed.

No MAC or Padding fields can be present at end of TLS records before all cipher algorithms and parameters have been negotiated and handshaked and then confirmed by sending a CipherStateChange record (see below) for signalling that these parameters will take effect in all further records sent by the same peer.

Handshake protocol

[edit]

Most messages exchanged during the setup of the TLS session are based on this record, unless an error or warning occurs and needs to be signaled by an Alert protocol record (see below), or the encryption mode of the session is modified by another record (see ChangeCipherSpec protocol below).

Handshake TLS record format
Offset Octet 0 1 2 3
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 Content Type (22) Legacy version (major/minor) Length
4 32 Length (cont.) Message Type Handshake Message Data Length
8 64 Handshake Length (cont.)  
12 96 Handshake Message
16 128
Handshake Message Data Length  
Handshake Message
Content Type: 8 bits; == 22
This field indicates the Handshake Protocol Type.
Message Type: 8 bits
This field identifies the handshake message type.
Message Types
Code Description
0 HelloRequest
1 ClientHello
2 ServerHello
4 NewSessionTicket
8 EncryptedExtensions (TLS 1.3 only)
11 Certificate
12 ServerKeyExchange
13 CertificateRequest
14 ServerHelloDone
15 CertificateVerify
16 ClientKeyExchange
20 Finished
Handshake Message Data Length: 24 bits
This is a 3-byte field indicating the length of the handshake data, not including the header.
Handshake Message: variable
Data of the handshake message itself.

Note that multiple handshake messages may be combined within one record.

Alert protocol

[edit]

This record should normally not be sent during normal handshaking or application exchanges. However, this message can be sent at any time during the handshake and up to the closure of the session. If this is used to signal a fatal error, the session will be closed immediately after sending this record, so this record is used to give a reason for this closure. If the alert level is flagged as a warning, the remote can decide to close the session if it decides that the session is not reliable enough for its needs (before doing so, the remote may also send its own signal).

Alert TLS record format
Offset Octet 0 1 2 3
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 Content Type (21) Legacy version (major/minor) Length (2)
4 32 Length (cont.) Level Description  
8 64 MAC (optional)
12 96
Padding (block ciphers only)
Content Type: 8 bits; == 21
This field indicates the Alert Protocol Type.
Length: 16 bits; == 2
The length of the rest of fields, which is 2.
Level: 8 bits
This field identifies the level of alert. If the level is fatal, the sender should close the session immediately. Otherwise, the recipient may decide to terminate the session itself, by sending its own fatal alert and closing the session itself immediately after sending it. The use of Alert records is optional, however if it is missing before the session closure, the session may be resumed automatically (with its handshakes).
Normal closure of a session after termination of the transported application should preferably be alerted with at least the Close notify Alert type (with a simple warning level) to prevent such automatic resume of a new session. Signalling explicitly the normal closure of a secure session before effectively closing its transport layer is useful to prevent or detect attacks (like attempts to truncate the securely transported data, if it intrinsically does not have a predetermined length or duration that the recipient of the secured data may expect).
Alert level types
Code Level type Connection state
1 warning connection or security may be unstable.
2 fatal connection or security may be compromised, or an unrecoverable error has occurred.
Description: 8 bits
This field identifies which type of alert is being sent.
Alert description types
Code Description Level types Note
0 Close notify warning/fatal
10 Unexpected message fatal
20 Bad record MAC fatal Possibly a bad SSL implementation, or payload has been tampered with e.g. FTP firewall rule on FTPS server.
21 Decryption failed fatal TLS only, reserved
22 Record overflow fatal TLS only
30 Decompression failure fatal
40 Handshake failure fatal
41 No certificate warning/fatal SSL 3.0 only, reserved
42 Bad certificate warning/fatal
43 Unsupported certificate warning/fatal e.g. certificate has only server authentication usage enabled and is presented as a client certificate
44 Certificate revoked warning/fatal
45 Certificate expired warning/fatal Check server certificate expire also check no certificate in the chain presented has expired
46 Certificate unknown warning/fatal
47 Illegal parameter fatal
48 Unknown CA (Certificate authority) fatal TLS only
49 Access denied fatal TLS only – e.g. no client certificate has been presented (TLS: Blank certificate message or SSLv3: No Certificate alert), but server is configured to require one.
50 Decode error fatal TLS only
51 Decrypt error warning/fatal TLS only
60 Export restriction fatal TLS only, reserved
70 Protocol version fatal TLS only
71 Insufficient security fatal TLS only
80 Internal error fatal TLS only
86 Inappropriate fallback fatal TLS only
90 User canceled fatal TLS only
100 No renegotiation warning TLS only
110 Unsupported extension warning TLS only
111 Certificate unobtainable warning TLS only
112 Unrecognized name warning/fatal TLS only; client's Server Name Indicator specified a hostname not supported by the server
113 Bad certificate status response fatal TLS only
114 Bad certificate hash value fatal TLS only
115 Unknown PSK identity fatal TLS only. Used in TLS-PSK and TLS-SRP.
116 Certificate required fatal TLS version 1.3 only
120 or 255 No application protocol fatal TLS version 1.3 only

ChangeCipherSpec protocol

[edit]
ChangeCipherSpec TLS record format
Offset Octet 0 1 2 3
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 Content Type (20) Legacy version (major/minor) Length (1)
4 32 Length (cont.) CCS Protocol Type
Content Type: 8 bits; == 20
This field indicates the Alert Protocol Type.
Length: 16 bits; == 1
The length of the rest of fields, which is 1.
CCS Protocol Type: 8 bits
This field identifies the CCS Protocol type. There is currently only one.

Application protocol

[edit]
Application TLS record format
Offset Octet 0 1 2 3
Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 Content Type (23) Legacy version (major/minor) Length
4 32 Length (cont.)  
8 64 Application Data
12 96
Message Authentication Code (optional)
Padding (block ciphers only)
Content Type: 8 bits; == 23
This field identifies the Application Protocol Type.
Length: 16 bits; Length < 214
The length of Application Data, MAC and Padding fields combined. The length should not exceed 214 bytes (16 KiB).
Application Data: variable
Data of the application. The length (in bytes) of the data is indicated by the letter m.
Message Authentication Code (MAC): 16, 20, or 32 bytes (optional)
A message authentication code computed over the Application Data field. 32 bytes for the SHA-256-based HMAC, 20 bytes for the SHA-1-based HMAC, 16 bytes for the MD5-based HMAC. The length (in bytes) of the MAC is indicated by the letter q.
Padding: variable (optional)
The last byte contains the padding length.

Support for name-based virtual servers

[edit]

From the application protocol point of view, TLS belongs to a lower layer, although the TCP/IP model is too coarse to show it. This means that the TLS handshake is usually (except in the STARTTLS case) performed before the application protocol can start. In the name-based virtual server feature being provided by the application layer, all co-hosted virtual servers share the same certificate because the server has to select and send a certificate immediately after the ClientHello message. This is a big problem in hosting environments because it means either sharing the same certificate among all customers or using a different IP address for each of them.

There are two known workarounds provided by X.509:

  • If all virtual servers belong to the same domain, a wildcard certificate can be used.[186] Besides the loose host name selection that might be a problem or not, there is no common agreement about how to match wildcard certificates. Different rules are applied depending on the application protocol or software used.[187]
  • Add every virtual host name in the subjectAltName extension. The major problem being that the certificate needs to be reissued whenever a new virtual server is added.

To provide the server name, Transport Layer Security (TLS) Extensions allow clients to include a Server Name Indication extension (SNI) in the extended ClientHello message.[188]: §3  This extension hints to the server immediately which name the client wishes to connect to, so the server can select the appropriate certificate to send to the clients.

There is also a method to implement name-based virtual hosting by upgrading HTTP to TLS via an HTTP/1.1 Upgrade header.[2] Normally this is to securely implement HTTP over TLS within the main "http" URI scheme instead of the commonly used "https" scheme. This would avoid forking the URI space and reduces the number of used ports, however, few implementations currently support this.[citation needed]

See also

[edit]

Further reading

[edit]
[edit]

Primary standards

[edit]

The current approved version of (D)TLS is version 1.3, which is specified in:

  • RFC 8446 – "The Transport Layer Security (TLS) Protocol Version 1.3,"[6] Proposed Standard.
  • RFC 9147 – "The Datagram Transport Layer Security (DTLS) Protocol Version 1.3,"[11] Proposed Standard.

The current standards replaces these former versions:

  • RFC 5246 – "The Transport Layer Security (TLS) Protocol Version 1.2,"[25] Obsolete.
  • RFC 6347 – "Datagram Transport Layer Security Version 1.2,"[8] Obsolete.
  • RFC 4346 – "The Transport Layer Security (TLS) Protocol Version 1.1,"[46] Historic.
  • RFC 2246 – "The TLS Protocol Version 1.0,"[189] Historic.
  • RFC 6101 – "The Secure Sockets Layer (SSL) Protocol Version 3.0,"[190] Historic.
  • Internet Draft (1995): "The SSL Protocol"

Extensions

[edit]

Other RFCs subsequently extended (D)TLS.

Extensions to (D)TLS 1.3 include:

  • RFC 9367 – "GOST Cipher Suites for Transport Layer Security (TLS) Protocol Version 1.3,"[87] Informational.

Extensions to (D)TLS 1.2 include:

  • RFC 5288 – "AES Galois Counter Mode (GCM) Cipher Suites for TLS,"[88] Proposed Standard.
  • RFC 5289 – "TLS Elliptic Curve Cipher Suites with SHA-256/384 and AES Galois Counter Mode (GCM),"[89] Proposed Standard.
  • RFC 5746 – "Transport Layer Security (TLS) Renegotiation Indication Extension,"[111] Proposed Standard.
  • RFC 5878 – "Transport Layer Security (TLS) Authorization Extensions,"[191] Experimental.
  • RFC 5932 – "Camellia Cipher Suites for TLS,"[93] Proposed Standard.
  • RFC 6066 – "Transport Layer Security (TLS) Extensions: Extension Definitions,"[188] Proposed Standard.
  • RFC 6091 – "Using OpenPGP Keys for Transport Layer Security (TLS) Authentication,"[192] Informational.
  • RFC 6176 – "Prohibiting Secure Sockets Layer (SSL) Version 2.0,"[19] Proposed Standard.
  • RFC 6209 – "Addition of the ARIA Cipher Suites to Transport Layer Security (TLS),"[94] Informational.
  • RFC 6347 – "Datagram Transport Layer Security Version 1.2,"[8] Obsolete.
    The definition is now part of the DTLS 1.3 specification.
  • RFC 6367 – "Addition of the Camellia Cipher Suites to Transport Layer Security (TLS),"[92] Informational.
  • RFC 6460 – "Suite B Profile for Transport Layer Security (TLS),"[193] Historic.
    Support for Suite B Cryptography has been discontinued by the National Security Agency.
  • RFC 6655 – "AES-CCM Cipher Suites for Transport Layer Security (TLS),"[90] Proposed Standard.
  • RFC 7027 – "Elliptic Curve Cryptography (ECC) Brainpool Curves for Transport Layer Security (TLS),"[194] Informational.
  • RFC 7251 – "AES-CCM Elliptic Curve Cryptography (ECC) Cipher Suites for TLS,"[91] Informational.
  • RFC 7301 – "Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension,"[195] Proposed Standard.
  • RFC 7366 – "Encrypt-then-MAC for Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS),"[139] Proposed Standard.
  • RFC 7465 – "Prohibiting RC4 Cipher Suites,"[101] Proposed Standard.
  • RFC 7507 – "TLS Fallback Signaling Cipher Suite Value (SCSV) for Preventing Protocol Downgrade Attacks,"[196] Obsolete.
  • RFC 7568 – "Deprecating Secure Sockets Layer Version 3.0,"[20] Proposed Standard.
  • RFC 7627 – "Transport Layer Security (TLS) Session Hash and Extended Master Secret Extension,"[197] Proposed Standard.
  • RFC 7685 – "A Transport Layer Security (TLS) ClientHello Padding Extension,"[198] Proposed Standard.
  • RFC 8422 – "Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer Security (TLS) Versions 1.2 and Earlier,"[84] Proposed Standard.
  • RFC 9189 – "GOST Cipher Suites for Transport Layer Security (TLS) Protocol Version 1.2,"[86] Informational.

Extensions to (D)TLS 1.1 include:

  • RFC 4366 – "Transport Layer Security (TLS) Extensions,"[199] Obsolete.
    Describes both a set of specific extensions and a generic extension mechanism.
  • RFC 4492 – "Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer Security (TLS),"[200] Obsolete.
  • RFC 4680 – "TLS Handshake Message for Supplemental Data,"[201] Proposed Standard.
  • RFC 4681 – "TLS User Mapping Extension,"[202] Proposed Standard.
  • RFC 4785 – "Pre-Shared Key (PSK) Ciphersuites with NULL Encryption for Transport Layer Security (TLS),"[203] Proposed Standard.
  • RFC 5054 – "Using the Secure Remote Password (SRP) Protocol for TLS Authentication,"[204] Informational.
    Defines the TLS-SRP ciphersuites.
  • RFC 5077 – "Transport Layer Security (TLS) Session Resumption without Server-Side State,"[185] Obsolete.
  • RFC 5081 – "Using OpenPGP Keys for Transport Layer Security (TLS) Authentication,"[205] Experimental.
  • RFC 5216 – "The EAP-TLS Authentication Protocol,"[206] Proposed Standard.

Extensions to TLS 1.0 include:

  • RFC 2595 – "Using TLS with IMAP, POP3 and ACAP,"[207] Proposed Standard.
    Specifies an extension to the IMAP, POP3 and ACAP services that allow the server and client to use transport-layer security to provide private, authenticated communication over the Internet.
  • RFC 2712 – "Addition of Kerberos Cipher Suites to Transport Layer Security (TLS),"[208] Proposed Standard.
    The 40-bit cipher suites defined in this memo appear only for the purpose of documenting the fact that those cipher suite codes have already been assigned.
  • RFC 2817 – "Upgrading to TLS Within HTTP/1.1,"[2] Proposed Standard.
    Explains how to use the Upgrade mechanism in HTTP/1.1 to initiate Transport Layer Security (TLS) over an existing TCP connection. This allows unsecured and secured HTTP traffic to share the same well known port (in this case, http: at 80 rather than https: at 443).
  • RFC 2818 – "HTTP Over TLS,"[209] Obsolete.
    Distinguishes secured traffic from insecure traffic by the use of a different 'server port'.
  • RFC 3207 – "SMTP Service Extension for Secure SMTP over Transport Layer Security,"[210] Proposed Standard.
    Specifies an extension to the SMTP service that allows an SMTP server and client to use transport-layer security to provide private, authenticated communication over the Internet.
  • RFC 3268 – "Advanced Encryption Standard (AES) Ciphersuites for Transport Layer Security (TLS),"[211] Obsolete.
    Adds Advanced Encryption Standard (AES) cipher suites to the previously existing symmetric ciphers.
  • RFC 3546 – "Transport Layer Security (TLS) Extensions,"[212] Obsolete.
    Adds a mechanism for negotiating protocol extensions during session initialisation and defines some extensions.
  • RFC 3749 – "Transport Layer Security Protocol Compression Methods,"[213] Proposed Standard.
    Specifies the framework for compression methods and the DEFLATE compression method.
  • RFC 3943 – "Transport Layer Security (TLS) Protocol Compression Using Lempel-Ziv-Stac (LZS),"[214] Informational.
  • RFC 4132 – "Addition of Camellia Cipher Suites to Transport Layer Security (TLS),"[215] Obsolete.
  • RFC 4162 – "Addition of SEED Cipher Suites to Transport Layer Security (TLS),"[95] Proposed Standard.
  • RFC 4217 – "Securing FTP with TLS,"[216] Proposed Standard.
  • RFC 4279 – "Pre-Shared Key Ciphersuites for Transport Layer Security (TLS),"[217] Proposed Standard.
    Adds three sets of new cipher suites for the TLS protocol to support authentication based on pre-shared keys.

Informational RFCs

[edit]
  • RFC 7457 – "Summarizing Known Attacks on Transport Layer Security (TLS) and Datagram TLS (DTLS),"[218] Informational.
  • RFC 9325 – "Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS),"[219] Best Current Practice 195.

References

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
Transport Layer Security (TLS) is a cryptographic protocol that enables client/server applications to communicate over the Internet in a manner designed to prevent eavesdropping, tampering, or message forgery. The protocol provides confidentiality through encryption, data integrity via message authentication, and optional peer authentication typically using public-key certificates. Originating as the successor to Netscape's Secure Sockets Layer (SSL), TLS was standardized by the Internet Engineering Task Force (IETF), with versions evolving from TLS 1.0 in 1999 to the current TLS 1.3 released in 2018, which simplifies the handshake process and improves security against known attacks. TLS 1.0 and 1.1 were formally deprecated in 2021 due to vulnerabilities exploitable in practice, such as downgrade attacks and weak cipher support, underscoring the protocol's iterative refinement based on empirical security failures. Widely deployed for securing Hypertext Transfer Protocol (HTTPS) traffic, TLS underpins the majority of encrypted web connections, with adoption metrics showing over 90% of top websites using TLS 1.2 or higher by the mid-2020s, though legacy implementations persist as a risk vector. Despite its foundational role in network security, TLS has encountered controversies from implementation bugs like the Heartbleed vulnerability in OpenSSL and protocol flaws enabling attacks such as POODLE, which exploited fallback mechanisms in earlier versions, highlighting the causal gap between protocol design and real-world deployment resilience.

Overview

Core Functionality and Protocol Layers

Transport Layer Security (TLS) provides secure communication channels over unreliable networks by ensuring three primary security services: confidentiality through symmetric encryption of application data, integrity via message authentication codes (MACs) or authenticated encryption with associated data (AEAD) modes to detect tampering, and optional authentication typically of the server using public key certificates. These services protect against eavesdropping, alteration, and replay attacks during transmission, operating transparently between the transport layer (such as TCP) and application protocols like HTTP or SMTP. TLS achieves this without requiring modifications to the underlying transport or applications, making it widely applicable for securing client-server interactions. The TLS protocol structure consists of a lower-layer TLS Record Protocol and higher-level protocols including the Handshake Protocol, Alert Protocol, Change Cipher Spec Protocol, and application data. The Record Protocol forms the foundational layer, encapsulating messages from higher protocols, fragmenting them if necessary, applying compression (optionally), computing MACs for , and encrypting the result before transmission over the ; it also handles decryption, MAC verification, decompression, and reassembly on receipt. This layer ensures basic connection security, including basic and , across all TLS versions. The Handshake Protocol operates atop the Record Protocol to establish secure sessions, involving negotiation of cryptographic parameters (such as cipher suites and protocol versions), exchange of random values for key derivation, optional mutual authentication via asymmetric cryptography, and generation of symmetric session keys; this process typically completes before application data flows. The Alert Protocol conveys warnings or fatal errors (e.g., decryption failures or unsupported versions) to abort or continue connections securely, while the Change Cipher Spec Protocol signals transitions to new cipher states post-handshake. In TLS 1.3, these components are streamlined: the handshake integrates more efficiently with record protection from the outset, eliminating the Change Cipher Spec Protocol and reducing round trips, but the core division between record handling and session establishment persists. Application data is then protected by records using the negotiated keys, with alerts embedded as needed.

Relationship to SSL and OSI Model

Transport Layer Security (TLS) emerged as the standardized successor to Secure Sockets Layer (SSL), a protocol originally developed by Communications in the mid-1990s to secure internet communications. SSL version 2.0 was publicly released in 1995, followed by SSL 3.0 in 1996, which addressed vulnerabilities in earlier iterations such as susceptibility to man-in-the-middle attacks. In 1999, the (IETF) published TLS 1.0 as RFC 2246, effectively rebranding and slightly refining SSL 3.0 to remove proprietary elements and incorporate minor cryptographic improvements, such as changes to message authentication codes and alert handling, while maintaining in core mechanics. Subsequent TLS versions—1.1 (2006), 1.2 (2008), and 1.3 (2018)—introduced stronger cryptographic algorithms, better resistance to attacks like BEAST and that exploited SSL weaknesses, and streamlined handshakes for efficiency, rendering all SSL variants obsolete and deprecated by bodies like the IETF and PCI DSS standards. Despite the terminological distinction, "SSL" persists colloquially to describe TLS implementations, though TLS provides demonstrably superior security through enhanced key derivation functions and mandatory in later versions. In the , TLS operates primarily between the (layer 4) and the (layer 7), encapsulating application data into secure records passed over transport protocols like TCP, thus providing , integrity, and services. Its name reflects this transport-oriented scope, but functionalities align with 5) management via negotiation and 6) through data formatting and compression, leading to classifications varying by source—some associating it strictly with layer 4 for securing transport connections, others with layer 6 for syntactic data handling. This layered ambiguity underscores the OSI model's theoretical nature, as TLS in practice integrates seamlessly in the TCP/IP stack without rigid adherence to OSI boundaries.

Key Design Principles

The Transport Layer Security (TLS) protocol is engineered to deliver communications privacy, , and over potentially unreliable networks, utilizing a hybrid cryptographic approach that combines public-key methods for initial key establishment with for efficient bulk data protection. It functions transparently between the and the underlying transport service, such as TCP, without requiring modifications to application protocols, thereby enabling widespread deployment for securing client-server interactions. The design prioritizes resistance to , tampering, and replay attacks through sequenced records and cryptographic protections, while supporting optional to verify endpoint identities via asymmetric cryptography like RSA or ECDSA. Central to TLS is the principle of , where symmetric —typically using algorithms such as AES in Galois/Counter Mode (GCM)—ensures that application remains private to the communicating endpoints, with unique session keys derived per connection to prevent key reuse vulnerabilities. is safeguarded via codes (MACs) in earlier versions or with associated (AEAD) in TLS 1.3, which detect alterations or forgeries by computing protections over contents, lengths, and sequence numbers, rendering tamper-resistant even under active attack. relies on public-key , mandating server identity verification through digital signatures on certificates during the , with client available optionally to enable mutual verification. Replay protection forms a foundational mechanism, employing monotonically increasing sequence numbers embedded in each record's MAC or AEAD computation to reject duplicated, reordered, or deleted messages, though early modes in TLS 1.3 carry inherent replay risks mitigated by freshness checks and single-use tokens. The protocol's extensibility—via negotiable cipher suites, extensions, and version-specific upgrades—allows adaptation to advancing cryptographic standards, such as mandating ephemeral key exchanges for in TLS 1.3, which protects prior sessions from long-term key compromises without compromising efficiency. Overall, these principles emphasize cryptographic agility, interoperability across diverse implementations, and security against both passive and active adversaries, with evolutions like TLS 1.3 streamlining the to reduce attack surfaces by eliminating legacy features such as static RSA.

Historical Development

Precursors and Early Research

In the early , research into protocols focused on inserting a sublayer between the and of the TCP/IP stack to enable secure network programming without modifying existing applications. In 1991, Simon S. Lam at the University of Texas conceived the concept of secure sockets, aiming to provide , , and for applications through a high-level abstraction. This work built on prior protocols like MIT's Kerberos for and DEC's SPX, but addressed their limitations in usability by prototyping Secure Network Programming (SNP), the first secure sockets layer implementation, in 1993 with graduate students Thomas Y. C. Woo, Raghuram Bindignavle, and Shaowen Su. SNP's design, published at the Summer Technical Conference on June 8, 1994, demonstrated secure channels over TCP using symmetric and , influencing subsequent protocols by establishing a for application-transparent . Parallel to academic efforts, the rapid growth of the in 1991-1993 created demand for secure online transactions, prompting commercial development of similar mechanisms. Communications, founded in 1994, initiated internal research on a protocol to protect data over HTTP, led by chief scientist , who drew on established like RSA and Diffie-Hellman . The resulting Secure Sockets Layer (SSL) version 1.0, prototyped in 1994, incorporated negotiation for keys and ciphers but was never publicly released due to vulnerabilities such as weak export-grade cryptography and insufficient protection against replay attacks. SSL 2.0, refined and released in February 1995 with 1.1, introduced public release of the protocol for securing TCP connections, though it retained flaws like the lack of proper message authentication in handshakes. These precursors laid foundational principles for TLS, including session establishment via asymmetric followed by symmetric , certificate-based , and record-level integrity checks, addressing the causal need for end-to-end security in client-server interactions amid rising Internet commerce. SSL 3.0, developed by in 1996, further evolved these ideas by mandating message codes (MACs) and supporting extensions, directly informing the IETF's of TLS 1.0 in RFC 2246 (1999) as an open upgrade to mitigate proprietary limitations and known SSL weaknesses. Early implementations highlighted trade-offs in performance versus security, with SNP emphasizing programmability and SSL prioritizing browser-server compatibility.

SSL Protocol Iterations

The Secure Sockets Layer (SSL) protocol originated from Communications' efforts in the early 1990s to secure web transactions amid growing concerns over on communications. Development began internally, yielding SSL version 1.0 by late 1994, which incorporated basic and primitives but was discarded prior to public release due to fundamental cryptographic weaknesses, including inadequate protection against replay attacks and insufficient security. Netscape publicly introduced SSL 2.0 in February 1995 as the protocol's inaugural deployed iteration, integrated into 1.1 to enable encrypted HTTP sessions. This version established core elements such as asymmetric key exchange via RSA for initial s, symmetric bulk encryption with algorithms like or DES, and rudimentary message integrity via hashing, aiming to authenticate servers and protect data confidentiality. Despite these advances, SSL 2.0 exhibited critical defects, including the absence of handshake integrity checks that permitted man-in-the-middle interceptions, vulnerability to truncation attacks where altered messages went undetected, and insecure downgrades exploitable by attackers. These issues stemmed from design choices prioritizing compatibility over rigorous security verification, rendering the protocol unsuitable for long-term use even at inception. SSL 3.0, released by Netscape in November 1996, represented a substantial redesign to rectify SSL 2.0's shortcomings, with contributions from cryptographer Paul Kocher enhancing protocol robustness. Key enhancements included mandatory message authentication codes (MACs) using HMAC for integrity across handshake and record layers, defenses against rollback attacks in cipher negotiation, and expanded support for diverse hash functions and export-grade ciphers to comply with U.S. regulations. The version also introduced change cipher spec messages for dynamic key updates and better handling of certificate chains, providing interoperability improvements while maintaining backward compatibility where feasible. Although SSL 3.0 addressed many immediate flaws through empirical testing and formal analysis absent in prior iterations, subsequent discoveries revealed residual weaknesses, such as padding oracle vulnerabilities later exploited in attacks like POODLE. This iteration served as the terminal SSL version, influencing the subsequent standardization of TLS 1.0 by the IETF in 1999 as an evolution rather than continuation.

Transition to TLS and Version Evolution

The (IETF) initiated the transition from the Secure Sockets Layer (SSL) protocol, originally developed by Communications, to Transport Layer Security (TLS) to establish an open standards-based successor that addressed proprietary aspects and enhanced interoperability. SSL 3.0, released in 1996, served as the primary basis for this evolution, but the IETF's TLS working group made targeted modifications, including changes to message authentication codes and versioning to prevent downgrade attacks, while renaming the protocol TLS to avoid trademark conflicts with Netscape's SSL branding. TLS 1.0 was formally specified in RFC 2246, published on January 26, 1999, effectively obsoleting SSL 3.0 for new implementations by introducing structural improvements like a more robust pseudorandom function for key derivation, though it retained substantial with SSL 3.0 to facilitate adoption. Subsequent TLS versions built incrementally on this foundation to mitigate emerging cryptographic vulnerabilities and incorporate modern algorithms. TLS 1.1, detailed in RFC 4346 and published on April 25, 2006, primarily enhanced resistance to chosen-ciphertext attacks in cipher block chaining (CBC) mode by mandating explicit initialization vectors, alongside refinements to handle certificate status requests and improve handshake efficiency. TLS 1.2, outlined in RFC 5246 and released on August 10, 2008, expanded support for authenticated encryption modes, additional hash functions like SHA-256, and elliptic curve cryptography, while allowing more flexible extensions to the protocol suite for future-proofing against known weaknesses in older primitives such as MD5 and SHA-1. TLS 1.3 marked a significant redesign, specified in RFC 8446 and published on August 10, 2018, after years of deliberation to eliminate obsolete features like renegotiation and static RSA key exchange, streamline the into a single round-trip for most cases, and enforce by default through exchanges. This version prioritized security by removing support for weak ciphers and compression, introducing 0-RTT resumption for performance, and mandating the use of modern primitives resistant to side-channel and padding oracle attacks. Recognizing vulnerabilities in earlier iterations—such as those exploitable via in SSL 3.0/TLS 1.0 and BEAST in TLS 1.0—the IETF deprecated TLS 1.0 and 1.1 via RFC 8996, published on May 18, 2021, urging migration to TLS 1.2 or later to align with current threat models, though legacy support persists in some environments due to compatibility demands.

Technical Specifications

TLS Handshake Process

The TLS handshake establishes a secure session by negotiating protocol parameters, authenticating endpoints (typically the server via key certificates), and deriving symmetric session keys for and . In TLS 1.3, the standard since its publication as RFC 8446 on August 10, 2018, the process mandates ephemeral Diffie-Hellman (DHE) or Diffie-Hellman (ECDHE) for , encrypts all messages after the ServerHello, and completes in one round-trip time (1-RTT) under normal conditions, excluding optional zero-round-trip (0-RTT) early data. This contrasts with TLS 1.2 (RFC 5246, published August 21, 2008), which permits non-forward-secret key exchanges like static RSA and transmits many handshake messages in , increasing vulnerability to . In TLS 1.3, the client initiates with a ClientHello message containing supported TLS versions (highest first), cipher suites (prioritizing AEAD modes like AES-GCM), a 32-byte client random nonce, extensions (e.g., via SNI, supported groups for ECDHE), and key shares for immediate DHE computation; pre-shared keys (PSKs) may be offered for resumption with binder authentication. The server replies with a ServerHello, selecting the version, , its random nonce, and a compatible key share to compute the ; if parameters mismatch (e.g., unsupported group), a HelloRetryRequest prompts the client to retry. Handshake keys derive via from the , early secret (from PSK or zeros), and transcript hash, yielding traffic secrets for encrypting subsequent messages. The server then sends EncryptedExtensions (e.g., application-layer protocol negotiation via ALPN), followed by a Certificate chain (X.509 format, optionally with OCSP stapling for revocation status) and CertificateVerify (signature over the transcript using the private key corresponding to the certificate, proving possession). A Finished message from the server, an HMAC over the transcript using the server handshake traffic secret, confirms integrity and switches to application traffic keys. The client responds with its Finished message (similarly computed) after verifying the server; client authentication occurs via certificate if requested post-handshake, supporting deferred mutual authentication without renegotiation. The server may issue a NewSessionTicket for PSK-based resumption, enabling 0-RTT data on reconnects (derived from an early traffic secret, though replay-vulnerable and without forward secrecy). For TLS 1.2, the handshake sequence includes:
  • ClientHello: Specifies version 3.3, random, (for resumption), cipher suites, and compression (typically null).
  • ServerHello: Selects version, random, , cipher suite, and compression.
  • ServerCertificate: Transmits the server's certificate chain.
  • ServerKeyExchange (if DHE/ECDHE): Parameters for exchange.
  • CertificateRequest (optional): Requests client authentication.
  • ServerHelloDone: Ends server flight.
  • ClientCertificate (if requested): Client's chain.
  • ClientKeyExchange: Pre-master secret (e.g., RSA-encrypted or DHE-derived).
  • CertificateVerify (if applicable): Signature proving client private key control.
  • ChangeCipherSpec and Finished (client): Switches ciphers and verifies via PRF-derived MAC.
  • Server mirrors with ChangeCipherSpec and Finished.
In TLS 1.2, the master secret derives as PRF(premaster_secret, "master secret", client_random + server_random), expanded into keys via PRF(master_secret, "key expansion", server_random + client_random); this lacks the chaining and transcript integration of TLS 1.3, permitting weaker primitives now deprecated. Post-handshake, TLS 1.3 supports KeyUpdate for unilateral key refresh without full renegotiation, enhancing long-lived sessions against potential compromises.

TLS Record Protocol

The TLS Record Protocol operates as the primary data transport mechanism within the Transport Layer Security (TLS) protocol, encapsulating messages from higher-level protocols such as the , alerts, change spec, and application data to provide , , and replay protection over a reliable like TCP. It processes these messages by fragmenting them into records no larger than 2^14 bytes (16384 bytes), optionally applying compression (though null compression is standard in practice), computing a (MAC) for , encrypting the content, and prefixing a fixed 5-byte header identifying the record's type, version, and length before transmission. On receipt, it reverses these steps: decrypts the payload, verifies the MAC using a per-connection sequence number to detect replays or modifications, decompresses if applied, reassembles fragments while preserving order, and delivers the to the appropriate higher-layer client. The record header consists of a 1-byte content type field (enumerated values: 20 for change cipher spec, 21 for alert, 22 for , 23 for application data), a 2-byte protocol version (e.g., {3,3} for TLS 1.2), and a 2-byte length field specifying the fragment size in bytes. Fragmentation allows messages to span multiple records or coalesce smaller ones, but does not preserve original message boundaries on the client side; zero-length fragments are permitted for application data but not for other types, and alerts must remain unfragmented. In TLS 1.2, the protocol supports stream , block in CBC mode, or with associated data (AEAD), with MAC computation (typically ) incorporating the implicit sequence number, type, version, length, and fragment to prevent padding oracle and other attacks. Compression, if negotiated, precedes MAC and but is lossless and limited to an additional 1024 bytes maximum expansion. TLS 1.3 simplifies the Record Protocol by mandating AEAD ciphers for integrated and , eliminating separate MAC-then-encrypt constructions and compression entirely to reduce and vulnerabilities like . The header retains the 5-byte structure with legacy version fixed at {3,3} for compatibility, but protected records use an outer content type of 23 (application_data), with the true inner content type (e.g., for messages) embedded in the decrypted TLSInnerPlaintext following the and optional bytes, which are scanned post-decryption to locate the non-zero type value. Encryption employs per-record nonces derived from a 64-bit sequence number XORed with a connection-specific IV, including the record header as associated data; decryption failures trigger a bad_record_mac alert, and records exceeding 2^14 bytes in plaintext length (plus overhead) result in a record_overflow alert. Fragmentation rules are stricter: messages cannot interleave with other types across records or key epochs, supporting coalescing for efficiency during the . In both versions, the protocol maintains a 64-bit explicit or implicit sequence number per direction to enforce monotonic ordering and reject out-of-order or replayed records, with keys derived from the handshake and updated via traffic secrets. This design ensures atomic protection per record, preventing partial decryption or tampering, though implementations must handle padding and explicit IVs carefully to avoid known flaws like Lucky Thirteen in CBC modes of prior versions. The Record Protocol thus forms the secure channel foundation, distinct from the handshake's key negotiation, enabling protected transmission of arbitrary application data post-connection establishment.

Cryptographic Primitives and Algorithms

TLS relies on a of asymmetric and symmetric to establish secure channels, including mechanisms, digital signatures for , symmetric ciphers for , hash functions for integrity and derivation, and modes to bind these properties. These primitives have evolved from the initial SSL protocols, which incorporated vulnerable algorithms like stream cipher, hash, and DES symmetric , to modern TLS versions that mandate resistance to known cryptanalytic attacks. In TLS 1.3, all cipher suites require with associated data (AEAD) to prevent oracle and other flaws prevalent in earlier CBC-mode ciphers. Key exchange in contemporary TLS primarily uses ephemeral Diffie-Hellman variants for , including finite-field Diffie-Hellman (DHE) with standardized groups like ffdhe2048 through ffdhe8192 and Diffie-Hellman (ECDHE) over curves such as secp256r1, secp384r1, secp521r1, X25519, and X448. Pre-shared keys (PSK) are supported in modes like PSK-only or hybrid with DHE for session resumption, but static RSA key exchange—used in early TLS for non-ephemeral sessions—has been deprecated due to lack of against long-term key compromise. Digital signatures for certificate authentication employ RSA with Probabilistic Signature Scheme (RSASSA-PSS) or PKCS#1 v1.5 padding (with SHA-256), ECDSA over NIST curves, and Edwards-curve variants like Ed25519 and Ed448, with and explicitly discouraged in signatures owing to collision vulnerabilities demonstrated in 2004 and refined through 2017. Symmetric encryption in TLS 1.3 is restricted to AEAD algorithms to ensure both confidentiality and integrity without separate MACs, eliminating risks from unauthenticated CBC modes exploited in attacks like BEAST (2011) and Lucky Thirteen (2013). Supported options include AES in Galois/Counter Mode (GCM) at 128- and 256-bit keys, ChaCha20-Poly1305 for hardware-agnostic performance, and AES in Counter with (CCM) or CCM-8 variants at 128 bits. Hash functions are tied to cipher suites, predominantly SHA-256 and SHA-384 from the SHA-2 family, replacing weaker (broken for collisions by 2017) and (broken since 2004). Key derivation utilizes , an HMAC-based extract-and-expand construction, to generate traffic keys from handshake secrets, providing domain separation and resistance to length-extension attacks inherent in plain usage. The following table enumerates the standard cipher suites in TLS 1.3, each specifying the AEAD encryption, hash for and signatures, and mandatory support where noted:
Cipher SuiteIANA IdentifierComponentsNotes
TLS_AES_128_GCM_SHA2560x1301AES-128-GCM / SHA-256Mandatory-to-implement
TLS_AES_256_GCM_SHA3840x1302AES-256-GCM / SHA-384Recommended
TLS_CHACHA20_POLY1305_SHA2560x1303 / SHA-256Recommended for low-entropy environments
TLS_AES_128_CCM_SHA2560x1304AES-128-CCM / SHA-256Optional, for constrained devices
TLS_AES_128_CCM_8_SHA2560x1305AES-128-CCM-8 / SHA-256Optional, reduced authentication tag
Security properties of these primitives demand strong randomness from CSPRNGs, key size minima (e.g., 2048-bit RSA, 256-bit ECDH), and usage limits to mitigate exhaustive search or nonce reuse, as nonce exhaustion in GCM or ChaCha20 can expose via malleability. Earlier TLS versions permitted weaker combinations, such as 3DES or , which suffered from sweet32 (2016) and Bar Mitzvah (2015) attacks respectively, prompting deprecation in RFC 7525 (2015) and full removal in TLS 1.3 to enforce at least 112-bit security margins aligned with NIST guidelines.

Public Key Infrastructure and Certificates

(PKI) in Transport Layer Security (TLS) encompasses the policies, hardware, software, and procedures required to create, manage, distribute, use, store, and revoke digital certificates and public-private key pairs for . It enables of servers by binding public keys to verifiable identities through certificates issued by trusted Certificate Authorities (CAs). TLS relies on certificates, standardized by the (ITU) in 1988 and updated in subsequent versions, to facilitate server authentication during the . An certificate is a digitally signed document containing the server's public key, identifying information such as the , issuer details, validity period (typically 1-3 years), and extensions for key usage constraints. The certificate is signed using the CA's private key, allowing verification with the corresponding public key. During the TLS handshake, after negotiating protocol parameters, the server transmits its certificate (or ) to the client. The client performs validation by: (1) checking the certificate's signature against the issuer's public key; (2) traversing the to a trusted root CA pre-installed in the client's trust store; (3) verifying not-before and not-after dates; (4) confirming hostname matching via Subject Alternative Name (SAN) extensions; and (5) querying revocation status through Certificate Revocation Lists (CRLs) or (OCSP). Failure in any step aborts the connection to prevent man-in-the-middle attacks. CAs form a hierarchical trust model: root CAs, whose self-signed certificates are inherently trusted, issue intermediate CAs, which in turn sign end-entity certificates for servers. Major root CAs include those from , Sectigo, and , embedded in operating systems and browsers like Mozilla's NSS or Microsoft's trust stores, updated periodically (e.g., via Windows updates or logs). Compromises, such as the 2011 breach affecting over 500 certificates, underscore the in centralized CA trust, prompting mitigations like pinning and multi-CA validation. Certificate Transparency (CT), mandated for public CAs since 2018 by browsers like Chrome, requires logging certificates in public, append-only logs to detect mis-issuance, enhancing accountability without altering core PKI mechanics. For revocation, allows servers to provide signed freshness proofs during handshakes, reducing latency over direct OCSP requests.

Security Model and Mechanisms

Fundamental Security Objectives

The Transport Layer Security (TLS) protocol establishes a for communications over unreliable networks, with its primary objectives centered on cryptographic protections that prevent unauthorized access, modification, or forgery of data in transit. These goals, prioritized in protocol specifications, first emphasize cryptographic to ensure that external parties cannot impersonate endpoints or compromise the and of exchanged messages, followed by requirements for among independent implementations and extensibility to address evolving threats. In TLS 1.3, the focus refines this to delivering reliable, authenticated, and encrypted data streams resistant to , tampering, and replay attacks, using for end-to-end safeguards without relying on the underlying transport for . Confidentiality protects against passive attackers intercepting readable by encrypting application data and metadata (such as record headers in earlier versions) with symmetric algorithms like AES in Galois/Counter Mode, negotiated during the and derived from shared secrets. This objective assumes an adversary capable of capturing all traffic but lacking computational power to break modern cipher suites without key exposure. complements confidentiality by detecting alterations through message authentication codes (MACs) or authenticated encryption modes like AEAD, ensuring that modified packets are rejected rather than silently accepted, thus thwarting active man-in-the-middle manipulations. Authentication verifies the identity of communicating parties, primarily the server via public key certificates signed by trusted authorities, to prevent impersonation; optional client authentication extends this bidirectionally where required, such as in mutual TLS setups. This relies on asymmetric cryptography during (e.g., Diffie-Hellman ephemeral keys in TLS 1.3) to bind identities to session keys, explicitly rejecting unauthenticated connections to mitigate risks like forged certificates or protocol downgrade attacks. While is not a core TLS objective—lacking persistent proofs of origin—the protocol's design prioritizes these triad protections over availability guarantees, acknowledging that denial-of-service remains feasible via resource exhaustion despite and rate-limiting mitigations in later versions.

Authentication, Encryption, and Integrity

Transport Layer Security (TLS) achieves by verifying the identity of communicating parties, primarily the server, through digital certificates compliant with standards. In the TLS handshake, the server transmits its certificate containing a public key, signed by a trusted (), which the client validates against a local store of root certificates to confirm the server's authenticity and prevent impersonation. Client , when required, follows a similar certificate-based but remains optional in most deployments. This mechanism relies on (PKI) for trust anchoring, with revocation checks via protocols like OCSP to detect compromised certificates. Encryption in TLS ensures confidentiality by protecting application data from eavesdroppers using symmetric cryptographic algorithms negotiated during the . Following —via methods like Diffie-Hellman ephemeral (DHE) or Diffie-Hellman ephemeral (ECDHE)— keys are derived to encrypt records with ciphers such as AES-128-GCM or ChaCha20-Poly1305. TLS 1.3, standardized in August 2018, mandates with associated data (AEAD) modes, eliminating weaker options like unauthenticated CBC from prior versions. These algorithms operate on TLS record protocol payloads, fragmenting data into blocks for processing, with keys rotated periodically to limit exposure. Integrity protection in TLS safeguards against tampering by authenticating message contents and detecting alterations. In TLS 1.3, AEAD ciphers integrate via authentication tags computed over and associated data, rejecting messages with invalid tags to foil modification attacks. Earlier versions like TLS 1.2 employed separate message codes (MACs), such as HMAC-SHA256, applied post- in non-AEAD modes, ensuring data authenticity through keyed hashes. Both approaches cover handshake and application records, with TLS 1.3 streamlining this by embedding integrity in the encryption primitive, reducing vulnerability to padding oracle exploits observed in legacy implementations. Empirical analysis confirms these mechanisms effectively mitigate common threats when properly configured, though misconfigurations persist as a deployment .

Forward Secrecy and Session Management

, also known as perfect forward secrecy (PFS), in TLS provides assurance that session keys derived during a remain secure against future compromises of long-term private keys, such as a server's RSA or certificate private key. This property holds because session keys are generated using ephemeral , typically Diffie-Hellman (DHE) or elliptic curve Diffie-Hellman (ECDHE), where temporary key pairs are created and discarded after each session, preventing retroactive decryption of captured traffic. Without PFS, an attacker recording encrypted sessions could later decrypt them upon obtaining the server's long-term key, as occurs with static RSA key transport. In TLS versions prior to 1.3, PFS was optional and implemented via cipher suites specifying DHE or ECDHE for , but deployment lagged due to higher computational demands compared to non-PFS alternatives like RSA. For instance, ECDHE gained traction around 2013 as elliptic curve operations proved efficient on modern hardware, enabling broader adoption without significant performance penalties. TLS 1.3, defined in RFC 8446 (published August 2018), enforces PFS universally by mandating ephemeral s—primarily ECDHE—and removing support for static key transport methods, ensuring every session generates independent, non-reusable key material. Session management in TLS optimizes performance by allowing resumption of prior sessions, reducing latency from full that involve and . In TLS 1.2, resumption relies on session identifiers, where the server generates a unique session ID during the initial handshake and sends it to the client in the ServerHello message; for subsequent connections, the client presents this ID in its ClientHello, and the server verifies it against its cache to resume the session if valid, reusing prior cryptographic parameters for efficiency while requiring server-maintained state, or session tickets (introduced in RFC 5077, December 2007), encrypted tokens issued by the server and stored client-side for stateless resumption without server memory overhead. Tickets encapsulate prior session parameters, enabling an abbreviated handshake, though pre-TLS 1.3 implementations risked undermining PFS if resumption reused non-ephemeral keys. TLS 1.3 refines session resumption using pre-shared keys (PSKs) derived from ticket-based external PSKs, combined with fresh exchanges to maintain PFS even in resumed sessions; this supports 0-RTT (zero round-trip time) resumption for minimal latency while deriving new secrets per connection. Resumption tickets in TLS 1.3 include key derivation tied to ephemeral exchanges, preventing long-term key compromises from exposing session content, unlike older stateful IDs that could inadvertently link sessions without PFS safeguards. Empirical measurements show resumption cuts time by up to 50-70% in high- scenarios, balancing and efficiency without sacrificing causal protections against key exposure.

Vulnerabilities and Attacks

Protocol-Level Flaws and Mitigations

The renegotiation mechanism in TLS versions prior to the adoption of secure extensions allowed man-in-the-middle attackers to inject plaintext into the initial unencrypted connection phase, as the protocol did not cryptographically bind renegotiated handshakes to the original session. This vulnerability, publicly disclosed in November 2009, affected all TLS implementations supporting renegotiation without safeguards, enabling prefixing of arbitrary data processed under the client's authenticated context. Mitigation involved implementing the secure renegotiation extension defined in RFC 5746, which adds a cryptographic binding via a renegotiation info field containing session hashes, or disabling renegotiation entirely on servers. TLS 1.3 eliminated renegotiation by design, relying instead on a single handshake with post-handshake authentication for key updates. Compression at the TLS layer, supported in versions up to TLS 1.2, introduced side-channel vulnerabilities exploited by attacks like (Compression Ratio Info-leak Made Easy), disclosed in September 2012, where attackers inject and observe variations in compressed sizes to infer secrets such as HTTP cookies. This flaw stemmed from the protocol's compression applied before encryption, leaking information through response length differences despite encryption. Affected implementations included those with TLS compression enabled alongside , amplifying risks in . The primary mitigation was disabling TLS-level compression via configuration, as standardized in updates to TLS 1.2 and fully removed in TLS 1.3 to prevent such oracle attacks. Application-layer mitigations, like token binding or avoiding compressible secrets in headers, provided partial defenses but did not address the protocol root cause. Cipher block chaining (CBC) mode in TLS 1.0 suffered from predictable initialization vectors, enabling the BEAST attack (CVE-2011-3389) in 2011, which exploited block boundaries to decrypt TLS-protected HTTP cookies through chosen plaintexts and adaptive IV reuse. TLS 1.1 introduced per-record IV randomization to counter this, but residual timing-based padding oracle attacks, such as Lucky Thirteen (CVE-2013-0169) in 2013, persisted due to the MAC-then-encrypt-then-pad construction allowing decryption via implementation-side channels. These were protocol design issues inherent to CBC's malleability without encrypt-then-MAC ordering. Mitigations included preferring authenticated encryption modes like AES-GCM (RFC 5288), adopting encrypt-then-MAC (RFC 7366), or migrating to TLS 1.3, which mandates AEAD ciphers and bans CBC entirely. Version downgrade attacks exploited the protocol's fallback , where attackers stripped or modified version fields to weaker protocols like SSL 3.0 or TLS 1.0, exposing connections to known exploits such as . This affected all versions due to lack of downgrade signaling integrity in early designs. Mitigation requires strict server-side enforcement of minimum versions (e.g., TLS 1.2+), disabling legacy support, and client-side rejection of insecure fallbacks, with TLS 1.3 enhancing resistance via cryptographically protected version . The triple attack (CVE-2014-1295), a variant allowing cross-connection key material sharing, was similarly addressed by secure renegotiation extensions tying s securely. TLS 1.3, standardized in RFC 8446 on August 10, 2018, resolved these flaws through redesigned (0-RTT optional resumption with anti-replay), mandatory via Diffie-Hellman, removal of static RSA, and exclusion of vulnerable features like compression and CBC, reducing the attack surface by approximately 50% in protocol complexity compared to TLS 1.2. Despite these advances, protocol-level risks persist if implementations enable deprecated options or fail to update cipher suites, underscoring the need for vigilant configuration alongside version upgrades.

Implementation and Configuration Errors

Implementation errors in TLS libraries arise from flaws in the software code handling cryptographic operations, often exposing sensitive data or enabling unauthorized access despite correct protocol usage. A prominent example is the vulnerability, discovered on April 7, 2014, which stemmed from a buffer over-read bug in the library's heartbeat extension implementation, affecting versions 1.0.1 to 1.0.1f. This flaw allowed remote attackers to extract up to 64 kilobytes of server memory per request, potentially disclosing private keys, session cookies, and user credentials without detection, impacting roughly two-thirds of websites at the time due to 's widespread adoption. Remediation involved immediate patching of and revocation of affected certificates, highlighting the risks of unverified memory handling in cryptographic extensions. Other implementation bugs include side-channel vulnerabilities exploiting timing or cache behaviors, such as those in padding oracle attacks like Lucky Thirteen, which targeted TLS implementations vulnerable to precise timing measurements during CBC decryption, though mitigations like constant-time algorithms have since been adopted in modern libraries. Faulty parsing of certificate structures, as in the attack on BER-encoded DER certificates, can also lead to invalid signature validations bypassing checks in affected libraries. Configuration errors, distinct from code-level bugs, occur when administrators fail to optimize server settings for security, often prioritizing compatibility over robustness. Common misconfigurations include enabling deprecated protocols like TLS 1.0 or 1.1, which lack modern protections against downgrade attacks and are rejected by contemporary clients, as evidenced by Microsoft's deprecation mandate exposing legacy systems to exploits like .
  • Weak cipher suites: Servers permitting export-grade or ciphers, vulnerable to brute-force or bias attacks, despite stronger alternatives like AES-GCM being available; for instance, allowing 3DES enables Sweet32 attacks exploiting 64-bit block collisions after approximately 2^32 blocks.
  • Incomplete certificate chains: Omitting intermediate certificates prevents client verification, leading to trust failures or fallback to insecure paths, a frequent issue detectable via tools like SSL Labs' scans showing chain issues in over 10% of surveyed sites.
  • Expired or mismatched certificates: Failure to renew certificates or match subject names to hostnames results in browser warnings or connection refusals, with data indicating millions of sites affected annually due to oversight.
  • Disabled forward secrecy: Not prioritizing Diffie-Hellman ephemeral (DHE) or variants exposes past sessions to key compromise, as non-ephemeral RSA handshakes allow decryption if long-term keys are breached.
These errors underscore the need for automated configuration auditing, as manual setups often lag behind evolving threats, with empirical scans revealing persistent issues like HSTS misconfigurations allowing stripping attacks on non-preloaded domains.

Empirical Impact and Response Measures

The vulnerability, disclosed on April 7, 2014, in the library's implementation of TLS, enabled remote attackers to read up to 64 kilobytes of server memory per probe, potentially exposing private keys, usernames, passwords, and session cookies without detection. It affected an estimated 2 million servers worldwide, including those of major services like Yahoo and , prompting immediate mass revocations of affected certificates and password resets for millions of users. No large-scale data breaches were publicly attributed solely to exploitation, but the flaw's presence since 2012 heightened risks for unpatched systems, leading to widespread scanning and patching efforts within days of disclosure. The attack, revealed in October 2014, exploited padding oracle flaws in SSL 3.0's CBC mode, allowing man-in-the-middle decryption of session cookies after forcing protocol fallback from TLS. Initially, approximately 97% of SSL-supporting web servers were vulnerable due to lingering SSL 3.0 compatibility, though active SSL 3.0 usage was below 0.3% of transactions. A subsequent TLS variant affected about 10% of servers, impacting sites like . Exploitation required multiple connections but enabled , contributing to accelerated disablement of SSL 3.0 across browsers and servers. In March 2016, the DROWN attack leveraged weak export-grade RSA in SSLv2 to decrypt TLS sessions on non-SSLv2 servers sharing keys, affecting up to 11 million servers, including 3.2 million TLS-only hosts via cross-protocol attacks requiring as few as 1,000 connections for high-value targets. It impacted one-third of sites at the time, prompting urgent scans revealing 22% vulnerability rates in some assessments. Real-world exploitation was limited by computational costs, but the attack underscored risks of legacy protocol support. The Logjam attack, disclosed in May 2015, targeted Diffie-Hellman key exchange by exploiting short or reused primes, enabling man-in-the-middle downgrade to export-grade ciphers and key recovery in under 8 hours for 768-bit groups used by millions of sites. It affected a significant portion of TLS servers permitting anonymous or weak DH, with scans showing over 7% of top sites vulnerable to state-level computation against popular 1024-bit primes. While no mass breaches were reported, it demonstrated practical breakage of 1024-bit DH security assumed safe until then. Responses included rapid protocol deprecations: SSLv2 and SSLv3 were disabled by default in major browsers by late 2014 and 2015, respectively, with TLS 1.0 and 1.1 following suit via policies from , , and by 2020 to eliminate downgrade risks. TLS 1.3, standardized in August 2018 by the IETF, addressed these by mandating , removing vulnerable CBC and modes, and streamlining handshakes to resist downgrade and padding attacks, with adoption reaching over 50% of by 2022 driven by regulatory mandates and disclosures. Implementation measures emphasized configuration hardening: disabling weak ciphers and export suites, enforcing perfect via ECDHE, and deploying certificate pinning or (HSTS) to prevent fallback exploits. Post-vulnerability scans by firms like tracked compliance, showing vulnerability rates dropping below 1% for major flaws by 2020, though legacy systems persist in enterprise environments. These efforts, informed by empirical scans rather than theoretical models, reduced exploitable TLS flaws but highlighted ongoing challenges from unpatched implementations.

Variants and Extensions

Datagram Transport Layer Security

Datagram Transport Layer Security (DTLS) extends the Transport Layer Security (TLS) protocol to support datagram-oriented transports, such as UDP, by providing equivalent security properties including , , and while accommodating , reordering, and duplication inherent to unreliable delivery. Unlike TLS, which relies on TCP's ordered and reliable stream delivery, DTLS incorporates mechanisms like explicit sequence numbers within records and handshake epochs to detect and handle out-of-order or duplicate packets, ensuring cryptographic state synchronization between endpoints. This adaptation enables secure communication for latency-sensitive applications where TCP's retransmission delays would degrade performance, such as real-time media streaming and . The protocol's process modifies TLS procedures to manage unreliability: lost or delayed messages trigger retransmissions based on timers, while a stateless mechanism during the initial ClientHello exchange mitigates denial-of-service attacks by avoiding resource-intensive server state allocation until client proof-of-work. Record-layer and integrity protection mirror TLS, using symmetric keys derived from the , but DTLS records include additional headers for fragmentation (to handle path MTU limits) and replay protection via 48-bit sequence numbers that increment per transition. These features maintain options compatible with TLS cipher suites, though implementations must tune parameters like retransmission intervals empirically for network conditions. DTLS version 1.0, specified in RFC 4347 and published on April 25, 2006, aligns with TLS 1.1 semantics but introduces datagram-specific handling. Version 1.2, detailed in RFC 6347 from August 22, 2011, incorporates TLS 1.2 improvements like enhanced pseudorandom functions and supports AEAD cipher modes for efficiency. The latest iteration, DTLS 1.3 per RFC 9147 published on May 5, 2022, adopts TLS 1.3's streamlined with 0-RTT resumption capabilities, zero-round-trip key derivation, and mandatory , while refining anti-replay and congestion controls for better with modern networks. DTLS finds application in protocols requiring secure, low-latency flows, including the (SRTP) for media in voice and video calls via RFC 5764 extensions (May 2010), WebRTC peer connections for browser-based real-time communication, and CoAP for constrained IoT devices. It also underpins VPN tunnels in implementations like OpenVPN's UDP mode and certain variants, as well as gaming and live streaming where UDP predominates to minimize jitter. Adoption has grown with the proliferation of multimedia and , though deployment requires careful configuration to balance security against overhead, such as disabling vulnerable legacy suites as recommended in RFC 7525 (April 2015). Empirical analyses indicate DTLS effectively resists common attacks like and forgery when properly implemented, but vulnerabilities arise from misconfigured timers or weak randomness in sequence handling.

Specialized Extensions and Profiles

TLS employs extensions to incorporate specialized functionality into the process, enabling adaptations for diverse network environments and applications without altering the core protocol structure. These extensions, negotiated during the ClientHello and ServerHello messages, include mechanisms for server identification, certificate validation, and protocol negotiation. For instance, the (SNI) extension permits clients to specify the target hostname, supporting where multiple secure sites share a single ; this was initially defined in RFC 4366 (2006) and refined in RFC 6066 (2011). Similarly, the status_request extension facilitates , allowing servers to provide signed certificate revocation information directly in the , reducing latency and client-side queries compared to separate OCSP fetches. Other notable extensions address constrained or specific scenarios. The trusted_ca_keys extension enables clients to advertise trusted keys, aiding servers in selecting appropriate certificates and minimizing failed handshakes in environments with limited certificate storage, such as embedded systems. (ALPN), specified in RFC 7301 (2014), allows clients and servers to agree on application protocols (e.g., over TLS) within the handshake, optimizing for multiplexed or low-latency transports like . In TLS 1.3, extensions like pre_shared_key and early_data support session resumption and zero-round-trip (0-RTT) data transmission, though the latter requires application-level safeguards against replay attacks due to its vulnerability to duplication. Profiles represent curated configurations of TLS parameters, including cipher suites, key exchange methods, and extensions, tailored to particular security requirements or deployment contexts. The Suite B Profile, outlined in RFC 6460 (2012), mandates (e.g., ECDHE with NIST P-256) and AES-GCM for and , targeting U.S. systems seeking resistance to known classical attacks, though its reliance on now-compromised NSA-designed algorithms has led to in favor of broader post-quantum considerations. For (IoT) applications, RFC 7925 (2016) defines profiles emphasizing pre-shared keys (PSK) and TLS (DTLS) , recommending ciphers like AES-128-CCM for resource-limited devices while prohibiting weak Diffie-Hellman groups to balance security and performance. Domain-specific profiles further specialize TLS deployment. RFC 8310 (2018) provides usage profiles for (DoT), specifying strict authentication via public CAs or opportunistic modes without pinning, to enhance against on-path observers while accommodating varying trust models in recursive resolvers. National guidelines, such as NIST SP 800-52 Revision 2 (2019), recommend profiles for federal systems that enforce TLS 1.2 or higher, disable legacy versions, and prioritize forward-secure cipher suites, reflecting empirical evidence from vulnerability scans showing persistent risks from outdated configurations. These profiles mitigate implementation variances, with adoption driven by interoperability testing; for example, IoT profiles have been integrated into standards like (2022) for smart home ecosystems, prioritizing low computational overhead.

Deployment and Applications

Adoption in Web and Network Protocols


Transport Layer Security (TLS) underpins secure web communications primarily through , where HTTP traffic is tunneled over TLS to encrypt data in transit. Initial adoption was slow following TLS 1.0's in 1999 as RFC 2246, but accelerated in the due to rising awareness of man-in-the-middle risks and browser warnings for unencrypted sites. By 2014, less than 50% of top websites used , but efforts like the Electronic Frontier Foundation's extension and logs drove broader implementation.
As of June 2025, HTTPS secures 88.08% of websites, with approximately 95% of global web traffic encrypted via TLS, reflecting near-universal coverage for major platforms like Google services. The launch of Let's Encrypt in April 2016, offering free automated domain-validated certificates via the ACME protocol, significantly boosted small-site adoption by simplifying issuance and renewal, issuing over 600 million active certificates by 2025. TLS 1.3 adoption has also surged, comprising nearly 60% of encrypted origin connections on platforms like Cloudflare by late 2024, favored for its reduced handshake latency and enhanced security. Beyond the web, TLS integrates into various network protocols for . In , STARTTLS upgrades plain SMTP, IMAP, and POP3 connections to TLS, with IMAP traffic almost fully encrypted in backbone measurements, though SMTP lags at lower rates due to inconsistent server support and opportunistic rather than mandatory enforcement. Google's transparency reports indicate global STARTTLS usage for outbound SMTP from exceeds 90% to supported domains as of 2023, but inter-server encryption remains patchy, enabling vulnerabilities like downgrade attacks. For DNS, (DoT), defined in RFC 7858 in May 2016, encapsulates queries in TLS on 853 to prevent , with adoption measured at low single-digit percentages of resolvers by 2021 due to compatibility hurdles and reliance on traditional UDP DNS. DoT usage has grown modestly in enterprise and privacy-focused resolvers, but (DoH) often competes, embedding queries in or over TLS for broader browser integration. Other protocols like XMPP for and NNTP for employ STARTTLS extensions, though adoption varies by service provider and lacks comprehensive empirical tracking.

Integration in Software and Hardware

TLS implementations are embedded in software via dedicated cryptographic libraries that handle protocol negotiation, , and encryption. , a widely adopted open-source library, supports TLS versions up to 1.3 and is integrated into server software such as and , as well as client applications across systems. BoringSSL, a of developed by Google, prioritizes security and performance optimizations, serving as the TLS backend for and services like Fastly's infrastructure, where it replaced to reduce vulnerability exposure. Network Security Services (NSS), maintained by , provides TLS functionality for and Thunderbird, emphasizing modular design for browser-specific needs. Other libraries like offer alternatives for distributions, enabling TLS in tools such as and Postfix. Operating systems incorporate TLS natively through system-level APIs. Windows uses the Schannel Security Support Provider, which supports TLS 1.2 by default on and later, with TLS 1.3 available in Windows 10 version 1903 and subsequent releases. Linux kernels rely on user-space libraries like or for TLS operations, integrated via and systemd-networkd for services such as SSH and . macOS and employ Secure Transport, Apple's framework supporting TLS 1.3 since macOS 10.13 High Sierra, handling secure connections in and system daemons. These integrations ensure TLS enforcement in kernel modules, file systems, and network stacks, with modern versions deprecating insecure protocols like TLS 1.0 and 1.1. Web browsers embed TLS libraries tailored to their ecosystems. Chrome and Edge leverage BoringSSL for efficient handshake processing and cipher suite negotiation. Firefox utilizes NSS to manage certificate validation and session resumption, configurable via about:config for protocol versions. Safari integrates Secure Transport directly, enabling TLS 1.3 with zero-round-trip resumption on supported hardware. Hardware integration accelerates TLS operations to mitigate CPU bottlenecks in high-throughput environments. Hardware Security Modules (HSMs) store private keys and perform cryptographic primitives like RSA or ECDH key exchanges in tamper-resistant environments, offloading computations from general-purpose processors. Trusted Platform Modules (TPMs), standardized by the Trusted Computing Group, provide hardware-rooted key generation and attestation for TLS sessions, particularly in endpoint devices for boot integrity and secure enclaves. Network interface cards (NICs) and co-processors, such as those with Intel QuickAssist Technology (QAT), enable TLS offload by accelerating handshakes and bulk encryption via dedicated ASICs, reducing latency by up to 50% in server farms and supporting asynchronous processing in frameworks like QTLS. Specialized accelerators, like the Securyzr TLS Handshake IP core, dispatch public-key operations across multiple engines for scalable throughput in embedded systems. These hardware elements integrate via APIs like PKCS#11 for HSMs or vendor-specific drivers for QAT, ensuring compatibility with software stacks while enhancing performance in data centers.

Performance and Compatibility Considerations

TLS 1.3 reduces latency compared to TLS 1.2 by requiring only one round-trip time (RTT) for initial connections, versus two RTTs, thereby halving the time to establish secure sessions and improving overall connection speed. This efficiency stems from eliminating legacy negotiation steps and mandating with exchanges, which also enhances security without proportional performance degradation. Post-handshake, symmetric encryption using cipher suites like AES-256-GCM imposes minimal CPU overhead, typically under 1% for sustained traffic on modern hardware, though initial asymmetric operations during handshakes can demand more cycles absent such as AES-NI instructions. Optimizations like session resumption and TLS 1.3's zero-round-trip (0-RTT) mode further mitigate costs by reusing prior keys for rapid reconnections, reducing latency in scenarios with frequent short-lived sessions, such as mobile browsing. selection influences throughput; for instance, ECDHE with AES-GCM outperforms RSA-based or DHE suites due to faster operations and hardware-optimized symmetric ciphers, with benchmarks showing ECDHE handshakes completing in under 10% more time than static RSA while enabling perfect . Cryptographic hardware accelerators can reduce software-based overhead by orders of magnitude, making TLS viable for high-throughput servers handling millions of connections. Compatibility challenges arise from uneven adoption across systems; as of early 2025, approximately 70% of websites support TLS 1.3, while nearly all (99.9%) still accommodate TLS 1.2 to avoid excluding legacy clients. Older operating systems and embedded devices, such as those predating or certain IoT hardware, often lack TLS 1.3 support, necessitating fallback to TLS 1.2 and risking downgrade attacks if multiple versions remain enabled. Deprecating TLS 1.0 and 1.1, completed by major browsers by 2020, has minimized vulnerabilities like but stranded some legacy systems unable to upgrade without hardware replacement. Server configurations must balance strict version enforcement—enforced via features like Microsoft's Disable Legacy TLS—for security against broader compatibility, as enabling older protocols increases attack surface despite low usage rates below 1.5% for deprecated SSL variants.

Recent Advances and Future Directions

Post-Quantum Cryptography Integration

Transport Layer Security (TLS) employs public-key algorithms vulnerable to quantum computers, which could efficiently factor large integers and solve problems using , potentially enabling decryption of recorded encrypted traffic in "" attacks. (PQC) integration into TLS focuses on replacing or augmenting these algorithms with quantum-resistant alternatives, primarily through hybrid schemes that combine classical and PQC primitives to maintain security even if one fails due to unforeseen weaknesses. In August 2024, the National Institute of Standards and Technology (NIST) finalized initial PQC standards, including FIPS 203 specifying ML-KEM (derived from CRYSTALS-Kyber) for key encapsulation mechanisms suitable for TLS , and FIPS 204 (ML-DSA from CRYSTALS-Dilithium) and FIPS 205 (SLH-DSA from SPHINCS+) for digital signatures applicable to TLS and certificate validation. These lattice-based and hash-based algorithms resist both classical and quantum attacks, with ML-KEM providing encapsulation for derivation in TLS handshakes. The (IETF) has advanced hybrid key exchange for TLS 1.3 via draft-ietf-tls-hybrid-design (revision 16, September 2025), which defines concatenation-based constructions treating hybrid exchanges as single named groups. Public keys or ciphertexts from a classical method (e.g., X25519) and a PQC KEM (e.g., ML-KEM-768) are concatenated in the KeyShareEntry, with shared secrets combined via concatenation for the , ensuring fixed-length outputs and security equivalent to the stronger component. This approach, now in RFC Editor Queue as an Informational RFC, prioritizes TLS 1.3 over legacy versions, which lack native support for such extensions. Early deployments include (AWS), which supports hybrid post-quantum key agreement combining ECDH with ML-KEM in TLS sessions via its s2n-tls library, with rollout to endpoints like Elastic Load Balancing following NIST . Cloudflare enabled hybrid ML-KEM and X25519 key agreement for TLS 1.3 traffic across its network in September 2025, securing over 6 million domains automatically. Akamai introduced support for post-quantum hybrid key exchange in TLS 1.3 by June 2025, addressing implementation challenges like increased handshake sizes (e.g., ML-KEM-768 adding approximately 1,088 bytes to client and server shares). These efforts emphasize hybrid modes as a transitional strategy, with IETF recommendations urging TLS-based applications to adopt PQC hybrids for amid ongoing evaluation of pure PQC performance and side-channel risks.

TLS 1.4 Drafts and Emerging Standards

An individual Internet-Draft, "The Transport Layer Security (TLS) Protocol Version 1.4" (draft-zhou-tls-tls14), authored by Bocai Zhou, proposes defining TLS version 1.4 as a successor to TLS 1.3 (RFC 8446). Last updated on October 2, 2025, the draft—version -04—specifies obsoleting RFC 8446 if approved and updating RFCs 5705 (Negotiating Protocol Protection), 6066 (Transport Layer Security (TLS) Extensions: Extension Definitions), 7627 (Session Hash and Extended Master Secret Extension), and 8422 (Elliptic Curves for Security). It introduces mechanisms for integration, including hybrid classical-PQC key exchanges and PQC-only negotiation options during the (Section 5). The draft remains an active individual submission, not adopted or endorsed by the IETF TLS Working Group, with an expiration date of April 5, 2026. However, its abstract explicitly states that the contribution has been withdrawn, signaling no active pursuit toward RFC publication or standardization. Earlier versions, such as -00 from August 31, 2025, similarly outlined core protocol specifications allowing client-server mutual authentication and encrypted data transfer over unreliable networks. No other formal drafts for TLS 1.4 have advanced within the IETF as of October 2025, and the focuses primarily on extensions, deprecations, and integrations for TLS 1.3 rather than a version increment. Emerging standards in the TLS ecosystem emphasize targeted improvements, such as enhanced flags (draft-ietf-tls-tlsflags) and protocol negotiations for (draft-ietf-quic-tls), without proposing a full TLS 1.4 overhaul. This reflects a cautious approach, prioritizing incremental security enhancements over rapid versioning amid ongoing post-quantum transitions and legacy cleanup.

Legacy Deprecation and Ecosystem Shifts

The (IETF) formally deprecated Transport Layer Security (TLS) versions 1.0 and 1.1 through RFC 8996, published on March 1, 2021, citing their lack of support for modern cryptographic algorithms, reliance on vulnerable cipher suites, and association with deprecated hashing functions like SHA-1. This deprecation extended to Datagram TLS (DTLS) 1.0, emphasizing risks from misconfigurations and inability to mitigate known vulnerabilities such as those exploited in attacks like and BEAST. Earlier protocols like Secure Sockets Layer (SSL) 2.0 and 3.0 had been phased out years prior due to severe flaws, including susceptibility to downgrade attacks and weak encryption primitives. Major web browsers accelerated the shift by disabling TLS 1.0 and 1.1 support starting in early 2020. disabled these versions in its March 2020 release (version 75), following announcements in 2018. Apple removed support in and macOS updates from March 2020 onward. and followed suit by mid-2020, with Chrome phasing out the protocols in version 84. These actions rendered legacy TLS incompatible with modern clients, prompting server operators to upgrade configurations to TLS 1.2 or higher to avoid connection failures. Ecosystem-wide adoption of TLS 1.3 has progressed significantly by 2025, with surveys indicating that approximately 70% of websites support the protocol as of mid-2024, up from lower rates at its 2018 standardization. TLS 1.2 remains dominant for , supported by over 99% of sites, while legacy TLS 1.0 and 1.1 usage has dwindled to negligible levels on public servers. However, challenges persist in embedded systems, legacy hardware, and enterprise environments unable to upgrade, necessitating device replacements or isolated networks, as these cannot leverage TLS 1.3's streamlined or removal of obsolete features like renegotiation. The deprecation has driven broader shifts, including mandatory TLS 1.2 enforcement by cloud providers like by October 2024 and reduced certificate lifetimes to curb risks from prolonged exposure. Integration with protocols like over , which mandates TLS 1.3, has further marginalized legacy versions, enhancing performance through zero-round-trip (0-RTT) resumption while eliminating downgrade vulnerabilities. Operating systems such as disable TLS 1.0 and 1.1 by default, reflecting a consensus on prioritizing security over compatibility with outdated infrastructure. In April 2025, the CA/Browser Forum passed Ballot SC081v3, establishing a phased reduction of maximum validity periods for public TLS certificates from 398 days to 47 days by March 2029, with changes beginning in March 2026. This measure promotes more frequent revalidation to maintain certificate reliability, addressing the increasing likelihood that certificate data diverges from reality over time and reducing risks from misissuance.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.