What is TLS & How Does it Work? - Internet Society (2024)

Transport Layer Security (TLS) > TLS Basics

Transport Layer Security (TLS) encrypts data sent over the Internet to ensure that eavesdroppers and hackers are unable to see what you transmit which is particularly useful for private and sensitive information such as passwords, credit card numbers, and personal correspondence.

This page explainswhat TLS is, how it works, andwhy you should deploy it.

What is TLS?

TLSis a cryptographic protocol that provides end-to-end security of data sent between applications over the Internet. It is mostly familiar to users through its use in secure web browsing, and in particular the padlock icon that appears in web browsers when a secure session is established. However, it can and indeed should also be used for other applications such as e-mail, file transfers, video/audioconferencing, instant messaging and voice-over-IP, as well as Internet services such as DNS and NTP.

TLS evolved from Secure Socket Layers (SSL) which was originally developed by Netscape Communications Corporation in 1994 to secure web sessions. SSL 1.0 was never publicly released, whilst SSL 2.0 was quickly replaced by SSL 3.0 on which TLS is based.

TLS was first specified inRFC 2246in 1999 as an applications independent protocol, and whilst was not directly interoperable with SSL 3.0, offered a fallback mode if necessary. However, SSL 3.0 is now considered insecure and was deprecated byRFC 7568in June 2015, with the recommendation that TLS 1.2 should be used. TLS 1.3 is also currently (as of December 2015) under development and will drop support for less secure algorithms.

It should be noted that TLS does not secure data on end systems. It simply ensures the secure delivery of data over the Internet, avoiding possible eavesdropping and/or alteration of the content.

TLS is normally implemented on top of TCP in order to encrypt Application Layer protocols such as HTTP, FTP, SMTP and IMAP, although it can also be implemented on UDP, DCCP and SCTP as well (e.g. for VPN and SIP-based application uses). This is known as Datagram Transport Layer Security (DTLS) and is specified in RFCs6347,5238and6083.

Why should I care about TLS?

Data has historically been transmitted unencrypted over the Internet, and where encryption was used, it was typically employed in a piecemeal fashion for sensitive information such as passwords or payment details. Whilst it was recognised back in 1996 (byRFC 1984) that the growth of the Internet would require private data to be protected, it has become increasingly apparent over the intervening period that the capabilities of eavesdroppers and attackers are greater and more pervasive than previously thought. TheIABtherefore released a statement in November 2014 calling on protocol designers, developers, and operators to make encryption the norm for Internet traffic, which essentially means making it confidential by default.

Without TLS, sensitive information such as logins, credit card details and personal details can easily be gleaned by others, but also browsing habits, e-mail correspondence, online chats and conferencing calls can be monitored. By enabling client and server applications to support TLS, it ensures that data transmitted between them is encrypted with secure algorithms and not viewable by third parties.

Recent versions of all major web browsers currently support TLS, and it is increasingly common for web servers to support TLS by default. However, use of TLS for e-mail and certain other applications is still often not mandatory, and unlike with web browsers that provide visual clues, it is not always apparent to users whether their connections are encrypted.

How does TLS work?

TLS uses a combination of symmetric and asymmetric cryptography, as this provides a good compromise between performance and security when transmitting data securely.

With symmetric cryptography, data is encrypted and decrypted with a secret key known to both sender and recipient; typically 128 but preferably 256 bits in length (anything less than 80 bits is now considered insecure). Symmetric cryptography is efficient in terms of computation, but having a common secret key means it needs to be shared in a secure manner.

Asymmetric cryptography uses key pairs – a public key, and a private key. The public key is mathematically related to the private key, but given sufficient key length, it is computationally impractical to derive the private key from the public key. This allows the public key of the recipient to be used by the sender to encrypt the data they wish to send to them, but that data can only be decrypted with the private key of the recipient.

The advantage of asymmetric cryptography is that the process of sharing encryption keys does not have to be secure, but the mathematical relationship between public and private keys means that much larger key sizes are required. The recommended minimum key length is 1024 bits, with 2048 bits preferred, but this is up to a thousand times more computationally intensive than symmetric keys of equivalent strength (e.g. a 2048-bit asymmetric key is approximately equivalent to a 112-bit symmetric key) and makes asymmetric encryption too slow for many purposes.

For this reason, TLS uses asymmetric cryptography for securely generating and exchanging a session key. The session key is then used for encrypting the data transmitted by one party, and for decrypting the data received at the other end. Once the session is over, the session key is discarded.

A variety of different key generation and exchange methods can be used, including RSA, Diffie-Hellman (DH), Ephemeral Diffie-Hellman (DHE), Elliptic Curve Diffie-Hellman (ECDH) and Ephemeral Elliptic Curve Diffie-Hellman (ECDHE). DHE and ECDHE also offer forward secrecy whereby a session key will not be compromised if one of the private keys is obtained in future, although weak random number generation and/or usage of a limited range of prime numbers has been postulated to allow the cracking of even 1024-bit DH keys given state-level computing resources. However, these may be considered implementation rather than protocol issues, and there are tools available to test for weaker cipher suites.

With TLS it is also desirable that a client connecting to a server is able to validate ownership of the server’s public key. This is normally undertaken using an X.509 digital certificate issued by a trusted third party known as a Certificate Authority (CA) which asserts the authenticity of the public key. In some cases, a server may use a self-signed certificate which needs to be explicitly trusted by the client (browsers should display a warning when an untrusted certificate is encountered), but this may be acceptable in private networks and/or where secure certificate distribution is possible. It is highly recommended though, to use certificates issued by publicly trusted CAs.

What is a CA?

A Certificate Authority (CA) is an entity that issues digital certificates conforming to the ITU-T’sX.509 standard for Public Key Infrastructures (PKIs). Digital certificates certify the public key of the owner of the certificate (known as the subject), and that the owner controls the domain being secured by the certificate. A CA therefore acts as a trusted third party that gives clients (known as relying parties) assurance they are connecting to a server operated by a validated entity.

End entity certificates are themselves validated through a chain-of-trust originating from a root certificate, otherwise known as the trust anchor. With asymmetric cryptography it is possible to use the private key of the root certificate to sign other certificates, which can then be validated using the public key of the root certificate and therefore inherit the trust of the issuing CA. In practice, end entity certificates are usually signed by one or more intermediate certificates (sometimes known as subordinate or sub-CAs) as this protects the root certificate in the event that an end entity certificate is incorrectly issued or compromised.

Root certificate trust is normally established through physical distribution of the root certificates in operating systems or browsers. The main certification programs are run by Microsoft (Windows & Windows Phone), Apple (OSX & iOS) and Mozilla (Firefox & Linux) and require CAs to conform to stringent technical requirements and complete a WebTrust, ETSI EN 319 411-3 (formerly TS 102 042) or ISO 21188:2006audit in order to be included in their distributions. WebTrust is a programme developed by the American Institute of Certified Public Accountants and the Canadian Institute of Chartered Accountants, ETSI is the European Telecommunications Standards Institute, whilst ISO is the International Standards Organisation.

Root certificates distributed with major operating systems and browsers are said to be publicly or globally trusted and the technical and audit requirements essentially means the issuing CAs are multinational corporations or governments. There are currently around fifty publicly trusted CAs, although most/all have more than one root certificate, and most are also members of theCA/Browser Forumwhich develops industry guidelines for issuing and managing certificates.

It is however also possible to establish private CAs and establish trust through secure distribution and installation of root certificates on client systems. Examples include theRPKI CAs operated by the Regional Internet Registries (AfriNIC,APNIC,ARIN,LACNICandRIPE NCC) that issue certificates to Local Internet Registries attesting to the IP addresses and AS numbers they hold; as well as theInternational Grid Trust Federation (IGTF)which provides a trust anchor for issuing server and client certificates used by machines in distributed scientific computing. In these cases, the root certificates can be securely downloaded and installed from sites using a certificate issued by a publicly trusted CA.

One weakness with the X.509 PKI system is that third parties (CAs) are able to issue certificates for any domain, whether or not the requesting entity actually owns or otherwise controls it. Validation is typically performed through domain validation – namely sending an e-mail with an authentication link to an address known to be administratively responsible for the domain. This is usually one of the standard contact addresses such as ‘hostmaster@domain’ or the technical contact listed a WHOIS database, but this leaves itself open to man-in-the-middle attacks on the DNS or BGP protocols, or more simply, users registering administrative addresses on domains that have not been reserved. Perhaps more importantly, Domain Validated (DV) certificates do not assert that a domain has any relationship with a legal entity, even though a domain may appear to have one.

For this reason, CAs are increasingly encouraging the use of Organisation Validated (OV) and Extended Validation (EV) certificates. With OV certificates, the requesting entity is subject to additional checks such as confirmation of organisation name, address and telephone number using public databases. With EV certificates, there are additional checks on legal establishment, physical location, and the identity of the individuals purporting to act on behalf of the requesting entity.

Of course, this still does not prevent CAs accidentally or fraudulently issuing incorrect certificates, and there have also been incidents of security breaches where CAs were tricked into issuing fake certificates. Despite substantial tightening up of security procedures in the wake of several high-profile incidents, the system remains reliant on third party trust which has led to the development of the DNS-based Authentication of Named Entities (DANE) protocol as specified in RFCs6698,7671,7672and7673.

With DANE, a domain administrator can certify their public keys by storing them in the DNS, or alternatively specifying which certificates should be accepted by a client. This requires the use of DNSSEC which cryptographically asserts the validity of DNS records, although DNSSEC does not yet have widespread deployment and major browsers currently require installation of an add-on in order to support DANE. Moreover, DNSSEC and DANE will still require validation of domain holders that will likely have to be undertaken by domain registries and/or registrars instead of CAs.

Did you find this resource helpful? By donating any amount, you help fund more research and content like this.

♥ Donate

I'm a cybersecurity enthusiast with a deep understanding of Transport Layer Security (TLS) and its crucial role in securing data transmitted over the Internet. My expertise stems from hands-on experience, research, and a commitment to staying abreast of the latest developments in the field.

TLS Basics:

1. What is TLS? Transport Layer Security (TLS) is a cryptographic protocol designed to provide end-to-end security for data transmitted between applications over the Internet. It ensures the confidentiality and integrity of information, particularly crucial for private and sensitive data such as passwords, credit card numbers, and personal correspondence.

2. TLS Evolution: TLS evolved from Secure Socket Layers (SSL), originally developed by Netscape in 1994. SSL 3.0 formed the basis for TLS, first specified in RFC 2246 in 1999. TLS 1.3, under development as of December 2015, aims to drop support for less secure algorithms.

3. TLS Implementation: TLS is commonly implemented on top of TCP for protocols like HTTP, FTP, SMTP, and IMAP. Datagram Transport Layer Security (DTLS), specified in RFCs 6347, 5238, and 6083, extends TLS to work on UDP, DCCP, and SCTP for applications like VPN and SIP.

4. Why TLS Matters: TLS encrypts data, preventing eavesdropping and alteration during transmission. It ensures the secure delivery of information, including logins, credit card details, and other sensitive data. The IAB has emphasized making encryption the norm for Internet traffic.

5. How TLS Works: TLS employs a combination of symmetric and asymmetric cryptography. Symmetric cryptography uses a shared secret key for encryption and decryption, while asymmetric cryptography involves key pairs—a public key for encryption and a private key for decryption.

6. Key Generation and Exchange: Various methods, including RSA, Diffie-Hellman (DH), and Elliptic Curve Diffie-Hellman (ECDH), are used for key generation and exchange. Forward secrecy is achieved with methods like DHE and ECDHE.

7. Certificate Authorities (CAs): TLS relies on digital certificates issued by CAs, ensuring the authenticity of public keys. CAs are entities conforming to the X.509 standard for Public Key Infrastructures (PKIs). Root certificates establish trust, and major browsers and operating systems distribute publicly trusted CAs.

8. CA Types: CAs issue end entity certificates, validated through a chain-of-trust from root certificates. Public CAs conform to stringent technical requirements, while private CAs can be established for specific purposes.

9. Weaknesses and Improvements: The X.509 PKI system allows CAs to issue certificates for any domain, leading to vulnerabilities. Domain Validated (DV) certificates lack assurances about the domain's relationship with a legal entity, prompting the use of Organisation Validated (OV) and Extended Validation (EV) certificates.

10. DNS-Based Authentication: DNS-based Authentication of Named Entities (DANE) protocol, specified in RFCs 6698, 7671, 7672, and 7673, aims to enhance security by certifying public keys in the DNS. However, widespread deployment of DNSSEC, a prerequisite for DANE, is still pending.

In summary, TLS is a critical protocol for securing Internet communications, employing advanced cryptographic techniques and relying on the infrastructure provided by Certificate Authorities. The constant evolution of TLS and related technologies reflects the ongoing efforts to enhance the security and privacy of online interactions.

What is TLS & How Does it Work? - Internet Society (2024)

FAQs

What is TLS & How Does it Work? - Internet Society? ›

Transport Layer Security (TLS) encrypts data sent over the Internet to ensure that eavesdroppers and hackers are unable to see what you transmit. To make the Internet more secure, TLS, the successor to Secure Sockets Layer (SSL), needs to be widely deployed by all kinds of applications across the Internet.

What is TLS and how does it work? ›

Transport Layer Security, or TLS, is a widely adopted security protocol designed to facilitate privacy and data security for communications over the Internet. A primary use case of TLS is encrypting the communication between web applications and servers, such as web browsers loading a website.

What is SSL and TLS What purpose do they serve to the internet? ›

TLDR: SSL/TLS encrypts communications between a client and server, primarily web browsers and web sites/applications. SSL (Secure Sockets Layer) encryption, and its more modern and secure replacement, TLS (Transport Layer Security) encryption, protect data sent over the internet or a computer network.

How much of the internet uses TLS? ›

As of October 2020, more than 90% of Internet traffic is communicated over TLS [20]. TLS has evolved from Secure Socket Layer (SSL) to its newest version, TLS 1.3, enhancing security and performance from its legacy versions [25].

What is the SSL protocol and how does it work? ›

The Secure Sockets Layer (SSL) protocol was developed by Netscape Communications Corporation. SSL ensures the data that is transferred between a client and a server remains private. This protocol enables the client to authenticate the identity of the server.

How does TLS work between client and server? ›

The TLS client sends the random byte string that enables both the client and the server to compute the secret key to be used for encrypting subsequent message data. The random byte string itself is encrypted with the server's public key.

How does TLS server and client work? ›

TLS uses a combination of symmetric and asymmetric encryption to ensure message privacy. During the TLS handshake, the TLS client and server agree an encryption algorithm and a shared secret key to be used for one session only.

What is the main difference between SSL and TLS? ›

SSL vs. TLS Comparison Table
SSLTLS
Generally slower and less reliableOffers improved speed, reliability, and lower latency
Has been deprecated due to significant vulnerabilitiesCurrently in wide use due to its robust security
Establishes connection using a port.Establishes connection using protocol.
5 more rows
Jan 11, 2024

What is TLS used to provide? ›

Transport Layer Security (TLS) is a cryptographic protocol designed to provide communications security over a computer network. 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.

What is the difference between HTTPS and TLS? ›

HTTPS is just the HTTP protocol but with data encryption using SSL/TLS. SSL is the original and now deprecated protocol created at Netscape in the mid 90s. TLS is the new protocol for secured encryption on the web maintained by IETF. And now you know the hiss-tory.

Is TLS outdated? ›

Over time, new TLS versions are developed, and some of the previous versions become outdated for vulnerabilities or technical reasons; and, therefore, should no longer be used to protect data. TLS 1.2 or TLS 1.3 should be used, and any organizations should not use SSL 2.0, SSL 3.0, TLS 1.0, and TLS 1.1.

Is TLS still used? ›

As previously mentioned, as of the end of 2020, TLS versions 1.0 and 1.1 are no longer supported. That means that websites that don't support TLS 1.2 or higher are now incapable of creating secure connections.

What is the most common protocol that uses TLS? ›

As shown in the following table , the secure sockets layer is added between the transport layer and the application layer in the standard TCP/IP protocol stack. The application most commonly used with TLS is Hypertext Transfer Protocol (HTTP), the protocol for Internet web pages.

What is the TLS handshake? ›

During a TLS handshake, the two communicating sides exchange messages to acknowledge each other, verify each other, establish the cryptographic algorithms they will use, and agree on session keys. TLS handshakes are a foundational part of how HTTPS works.

Why do we need a TLS certificate? ›

TLS/SSL certificates secure internet connections by encrypting data sent between your browser, the website you're visiting, and the website server.

How does SSL work in networking? ›

SSL: Secure Sockets Layer

SSL is standard technology for securing an internet connection by encrypting data sent between a website and a browser (or between two servers). It prevents hackers from seeing or stealing any information transferred, including personal or financial data.

What is the difference between SSL and TLS? ›

SSL is technology your applications or browsers may have used to create a secure, encrypted communication channel over any network. However, SSL is an older technology that contains some security flaws. Transport Layer Security (TLS) is the upgraded version of SSL that fixes existing SSL vulnerabilities.

How do I know if my TLS is working? ›

For Chrome
  1. Open the Developer Tools (Ctrl+Shift+I)
  2. Select the Security tab.
  3. Navigate to the WebAdmin or Cloud Client portal.
  4. Under Security, check the results for the section Connection to check which TLS protocol is used.
Sep 6, 2023

What happens during TLS? ›

During a TLS handshake, the two communicating sides exchange messages to acknowledge each other, verify each other, establish the cryptographic algorithms they will use, and agree on session keys. TLS handshakes are a foundational part of how HTTPS works.

Top Articles
Latest Posts
Article information

Author: Stevie Stamm

Last Updated:

Views: 6305

Rating: 5 / 5 (80 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Stevie Stamm

Birthday: 1996-06-22

Address: Apt. 419 4200 Sipes Estate, East Delmerview, WY 05617

Phone: +342332224300

Job: Future Advertising Analyst

Hobby: Leather crafting, Puzzles, Leather crafting, scrapbook, Urban exploration, Cabaret, Skateboarding

Introduction: My name is Stevie Stamm, I am a colorful, sparkling, splendid, vast, open, hilarious, tender person who loves writing and wants to share my knowledge and understanding with you.