Cyberstudy
1.4 4.5 In progress

Transport Layer Security (TLS)

17 flashcards

Summary

Transport Layer Security (TLS) secures most internet traffic, including HTTPS. It authenticates the server with a certificate, agrees on session keys and encrypts the connection. Only TLS 1.2 and 1.3 should be enabled, with strong cipher suites.

In plain words

TLS replaced SSL and secures HTTPS (port 443) and many other protocols. The server proves its identity with a CA-issued certificate, both sides agree on a cipher suite, and an encrypted session begins. Client certificates can add mutual authentication. Use TLS 1.2 or 1.3. TLS 1.3 removes old insecure options, which prevents downgrade attacks, and speeds up the handshake. A TLS 1.2 cipher suite such as ECDHE-RSA-AES128-GCM-SHA256 names the key exchange, signature, bulk cipher and hash.

Detailed explanation

  • Transport Layer Security (TLS): A protocol that provides encryption, integrity and server authentication for data in transit; the successor to SSL.
  • Secure Sockets Layer (SSL): The original protocol; all SSL versions are insecure and disabled.
  • HTTPS: HTTP carried over TLS on port 443.
  • Client certificate: Optional certificate that lets the server authenticate the client too, giving mutual TLS.

Versions

  • TLS 1.3: Current; fewer round trips, forward secrecy always and only AEAD ciphers.
  • TLS 1.2: Acceptable with strong forward-secret cipher suites.
  • TLS 1.0 and 1.1: Deprecated and must be disabled.
  • Downgrade attack: Tricking client and server into using a weaker version; prevented by disabling old versions.

Cipher suites

  • Cipher suite: The set of algorithms a connection uses for key exchange, authentication, bulk encryption and hashing.
  • TLS 1.2 example: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 means ECDHE key exchange, RSA authentication, AES-128-GCM encryption and SHA-256 for key derivation.
  • TLS 1.3 example: TLS_AES_256_GCM_SHA384 names only the cipher and hash, because key exchange is always ephemeral and negotiated separately.

Important terms

taken from the text above
Transport Layer Security (TLS)
A protocol that provides encryption, integrity and server authentication for data in transit; the successor to SSL.
Secure Sockets Layer (SSL)
The original protocol; all SSL versions are insecure and disabled.
HTTPS
HTTP carried over TLS on port 443.
Client certificate
Optional certificate that lets the server authenticate the client too, giving mutual TLS.
TLS 1.3
Current; fewer round trips, forward secrecy always and only AEAD ciphers.
TLS 1.2
Acceptable with strong forward-secret cipher suites.
TLS 1.0 and 1.1
Deprecated and must be disabled.
Downgrade attack
Tricking client and server into using a weaker version; prevented by disabling old versions.
Cipher suite
The set of algorithms a connection uses for key exchange, authentication, bulk encryption and hashing.
TLS 1.2 example
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 means ECDHE key exchange, RSA authentication, AES-128-GCM encryption and SHA-256 for key derivation.
TLS 1.3 example
TLS_AES_256_GCM_SHA384 names only the cipher and hash, because key exchange is always ephemeral and negotiated separately.

Examples & real-world scenarios

  • Disabling SSL 3.0, TLS 1.0 and TLS 1.1 on a web server.
  • Mutual TLS between two internal services.
  • Reading a cipher suite name to identify its key exchange.

Scenario

A server still allows old SSL versions for one legacy client. That opens the door to downgrade attacks for everyone. Retiring or upgrading the legacy client and allowing only TLS 1.2/1.3 closes the gap.

Common mistakes

  • Calling it 'SSL' and allowing actual SSL versions to stay enabled.
  • Misreading cipher suite parts. ECDHE is the key exchange; AES-GCM is the bulk cipher.

Practical skills

  • Decode a TLS 1.2 cipher suite name.
  • Check your own website's TLS configuration.

What I should remember

  • TLS 1.3: Current version with mandatory forward secrecy.
  • SSL: Obsolete and insecure.
  • Cipher suite: The combination of algorithms used by a TLS connection.
  • Mutual TLS: Both client and server present certificates.