+5 votes
222 views
in Security by (242k points)
reopened
TLS: how it is encrypted on the Internet

1 Answer

+3 votes
by (1.6m points)
edited
 
Best answer

What is TLS?
How does TLS work?
Pros and cons of TLS
TLS application fields
TLS Applications
Known attacks on TLS

image

TLS: how it is encrypted on the Internet

In the early days of the Internet, some aspects, such as data security, were not as important as they are today. All communication was transmitted from one computer to another openly and without encryption. We could compare it to a postcard: any postman can read it..

The TLS protocol , also known as SSL / TLS, introduced encryption of transmitted content . To continue the analogy, such encryption would be the equivalent of a sealed envelope that only its rightful recipient can read.

Index
  1. What is TLS?
  2. How does TLS work?
  3. Pros and cons of TLS
  4. TLS application fields
  5. TLS Applications
  6. Known attacks on TLS

What is TLS?

TLS is the acronym for Transport Layer Security, which translates into Spanish as transport layer security . This name refers to the transport layer of the TCP / IP model. TLS is a process that encrypts Internet data streams so that only their legitimate recipients can read them. It was previously known as SSL (Secure Socket Layer). Since this abbreviation is still more popular than TLS, it is common for us to refer to TLS by the double designation SSL / TLS..

How does TLS work?

TLS encrypts by symmetric encryption all data traffic that takes place through TCP.

Note

Find comprehensive information on encryption methods in our guide..

Although it sounds easy in practice, the reality is more complicated. The main problem is that the server must communicate the key to the client, and additionally it must do so before the communication is secured with TLS. If you regularly send encrypted files by mail, you will know this problem: you encrypt a file and then you must share the password with the recipient, for example, by phone.

To solve this problem, the TLS protocol use the following method:

  1. When the client, for example a web browser, contacts the web server, it first sends its certificate. This  SSL certificate  proves that the server is authentic and is not forging a false identity.
  2. The client checks the validity of the certificate and the server sends a random number encrypted with the public key ( public key ) to the server.
  3. From that random number, the server generates a session key ( session key ) with which communication must be encrypted. Since the random number comes from the client, the client can be sure that the session key actually originates from the contacted server.
  4. The server forwards the session key to the client in encrypted form . This encryption is done using the Diffie-Hellmann cryptographic protocol.
  5. Now both parties can send their data securely with the session key.

The reason that asymmetric cryptography is only used for the transmission of the session key (but not for the encryption of the data stream itself) is the disadvantage that it has in speed: asymmetric cryptography is relatively slow and would delay the data communication.

Pros and cons of TLS

TLS is a simple solution to make data traffic more secure on the web, since it does not require the parties to encrypt the content themselves, such as the data of a form. Instead, it is sufficient that the traffic occurs through the TLS protocol , regardless of the operating system and computer applications used by those involved. During transmission, all data streams are automatically encrypted.

The price of this security is a slightly slower connection, as the process stages just described? Certificate, random number and key exchange? it is very demanding at the computational level.

TLS application fields

As we have explained, TLS can be used universally, regardless of the application or operating system. As a consequence, many application protocols have a secure version of TLS. The designation scheme is very simple: when the protocol communicates over TLS, the letter S is placed after the protocol name.

The most important scope of TLS is the World Wide Web or, more specifically, the HTTP protocol. Its encrypted variant is called  HTTPS .

Other common application cases are:

  • POP3S : Emails from the server are received with the POP3 protocol.
  • IMAPS : the inbox is synchronized with the server using the IMAP protocol.
  • SMTPS : sending emails.
  • FTPS : file transfer via FTP protocol.
  • SIPS : Voice over IP telephony using the SIP protocol.
  • IRCS : encrypted chats.

OpenVPN, a free software for establishing a virtual private network (VPN), also uses the TLS protocol .

TLS Applications

Some important applications of TLS are:

  • OpenSSL - By far your most common application, as most web pages use HTTPS.
  • GnuTLS : Developed by the Free Software Foundation .
  • LibreSSL : Developed by OpenBSD.
  • NSS : Developed by Network Security Services .
  • BoringSSL : Developed by Google.
  • Cryptlib : Developed by Peter Gutmann.
  • Botan : BSD license, developed by Jack Lloyd.
  • JSSE : Developed by Java Secure Socket Extension and Oracle.
  • S2n : Developed by Amazon.

This list is not exhaustive. You can find information on the uses of TLS in the English Wikipedia article TLS App Comparison .

Known attacks on TLS

TLS is not totally safe from attacks and leaks. Some known points of attack are:

  • Bugs : like the famous Heartbleed hole , a serious bug in early OpenSSL versions, which was fixed in 2014.
  • Weak encryption - As a consequence of US export restrictions on crypto, exportable versions were developed easier to decipher than the originals.
  • Compression attacks : Using HTTP compression instead of TLS compression makes it easier for hackers to guess TLS-encrypted content through a variety of processes.
  • The BEAST attack affected TLS version 1.0 and was already described in 2014. Current versions of TLS are more secure against such attacks.
  • The Padding Oracle attack was discovered in 2002 and was not corrected until SSL version 3.0. The current TLS version 1.3 is not affected.

In addition, an attempt was made to avoid the emergence of a fully secure TLS encryption so that authorities could inspect encrypted communications, for example if they were related to financial transactions or criminal activities. One of the organizations that worked the most for TLS to have such a weak point was the ETSI (European Telecommunications Standards Institute).


...