# What Is TLS 1.2 (Transport Layer Security 1.2)?

> TLS 1.2 is the version of Transport Layer Security defined in RFC 5246 (2008) that introduced SHA-256 based key derivation and AEAD ciphers such as AES-GCM.

Source: https://ssl.sh/glossary/tls-1-2/
Last updated: 2026-11-10

TLS 1.2 is the third version of TLS, defined in RFC 5246 in 2008. It replaced the fixed MD5/SHA-1 pseudo-random function with one whose hash is chosen by the cipher suite (normally SHA-256), added the signature_algorithms extension so peers can negotiate signature and hash algorithms, and made room for [AEAD](https://ssl.sh/glossary/aead/) cipher suites such as AES-GCM. A full handshake takes two round trips before application data can flow.

## Why it matters
Together with [TLS 1.3](https://ssl.sh/glossary/tls-1-3/), TLS 1.2 is one of only two versions that current browsers accept, and it is still needed for clients that cannot do TLS 1.3, such as older Android and Java versions and many embedded devices. Unlike TLS 1.3, its security depends heavily on configuration: the same protocol can negotiate a strong suite with [ECDHE](https://ssl.sh/glossary/ecdhe/) and AES-GCM, or a weak one with RSA key transport and CBC that offers no forward secrecy.

## Example
A TLS 1.2 cipher list limited to forward-secret AEAD suites, using real OpenSSL names:

```nginx
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
```

In OpenSSL-based servers, `ssl_ciphers` applies to TLS 1.2 and below only; TLS 1.3 suites are configured separately.

## Common misconceptions
- **"TLS 1.2 is obsolete and should be disabled."** It is not deprecated. With ECDHE key exchange and AEAD suites it is considered secure, and dropping it locks out clients that lack TLS 1.3.
- **"Enabling TLS 1.2 is enough."** The cipher list still matters: RSA key-exchange, CBC-SHA1 and 3DES suites remain negotiable under TLS 1.2 unless you remove them.
- **"TLS 1.2 is slow."** The extra round trip is real for full handshakes, but session resumption and connection reuse hide most of it.

## Related terms

- [TLS](https://ssl.sh/zh/glossary/tls/): TLS 是 IETF 制定的传输层安全协议，为 HTTPS 等网络连接提供加密、完整性保护和服务器身份认证，是 SSL 的继任者。
- [TLS 1.3](https://ssl.sh/zh/glossary/tls-1-3/): TLS 1.3 是当前最新的传输层安全协议版本（2018 年的 RFC 8446，现行规范为 RFC 9846），完整握手只需一个往返，且只保留 AEAD 加密算法。
- [密码套件](https://ssl.sh/zh/glossary/cipher-suite/): 密码套件是 TLS 客户端和服务器协商使用的一组命名的加密算法组合，例如 TLS_AES_128_GCM_SHA256，决定连接用什么算法保护数据。
- [AEAD](https://ssl.sh/zh/glossary/aead/): AEAD 是带关联数据的认证加密算法，一次运算同时完成数据加密和完整性认证，并能保护不加密的附加数据不被篡改。
- [ECDHE](https://ssl.sh/zh/glossary/ecdhe/): ECDHE 是椭圆曲线上的临时 Diffie-Hellman 密钥交换，TLS 双方每次握手都生成新的椭圆曲线密钥对，并据此协商出共享密钥。
- [前向保密](https://ssl.sh/zh/glossary/forward-secrecy/): 前向保密是密钥交换的一种安全属性：即使服务器的长期私钥日后泄露，过去连接的会话密钥也不会因此暴露。
- [TLS 握手](https://ssl.sh/zh/glossary/tls-handshake/): TLS 握手是 TLS 连接开始时的一组消息交换，客户端与服务器在其中协商协议版本和密码套件、验证服务器身份并派生会话密钥。
