# TLS_DH_anon_WITH_AES_128_GCM_SHA256 cipher suite

> TLS_DH_anon_WITH_AES_128_GCM_SHA256 (0x00,0xA6): DH/anon · AES-128-GCM · TLS 1.2. ssl.sh rating: Insecure. OpenSSL/GnuTLS names and Nginx/Apache config.

Source: https://ssl.sh/ciphers/tls-dh-anon-with-aes-128-gcm-sha256/
Last updated: 2026-11-10

TLS_DH_anon_WITH_AES_128_GCM_SHA256 (0x00,0xA6) is a cipher suite for TLS 1.2: DH key exchange, anon authentication, AES-128-GCM encryption and AEAD message authentication. ssl.sh rates it Insecure.

| Field | Value |
|---|---|
| IANA | TLS_DH_anon_WITH_AES_128_GCM_SHA256 |
| Hex code | 0x00,0xA6 |
| OpenSSL | ADH-AES128-GCM-SHA256 |
| GnuTLS | TLS_DH_ANON_AES_128_GCM_SHA256 |
| Key exchange | DH |
| Authentication | anon |
| Encryption | AES-128-GCM |
| MAC | AEAD |
| TLS versions | TLS 1.2 |
| Rating | Insecure |
| IANA "Recommended" | D |
| References | RFC 5288, RFC 10015 |

## What each component means

A [cipher suite](https://ssl.sh/glossary/cipher-suite/) names the algorithms a client and server agree on in one handshake. TLS_DH_anon_WITH_AES_128_GCM_SHA256 combines DH key exchange, anon authentication, AES-128-GCM encryption and AEAD integrity protection. Each part is explained below with its known weaknesses; for the bigger picture see [how cipher suites work](https://ssl.sh/learn/cipher-suites/).

Key exchange: anonymous DH (anon). The server sends its Diffie-Hellman parameters with no certificate and no signature, so the client cannot tell whether it is talking to the real server. An active [man-in-the-middle](https://ssl.sh/glossary/man-in-the-middle/) can run a separate anonymous handshake with each side and read or alter everything; encryption without authentication only stops passive eavesdroppers. Java's default jdk.tls.disabledAlgorithms blocks every anon suite for this reason.

Encryption: AES with a 128-bit key, the 128-bit block cipher of FIPS 197 (2001). Most server and phone CPUs have AES instructions (AES-NI on x86, the ARMv8 cryptography extensions), which make it fast and avoid the cache-timing leaks of table-based software implementations.

Mode: GCM (Galois/Counter Mode), an [AEAD](https://ssl.sh/glossary/aead/): counter-mode encryption plus a GHASH authenticator with a 16-byte tag, checked in one step, so the CBC padding attacks don't apply. In TLS 1.2 the 12-byte nonce is a 4-byte implicit salt from the key block plus an 8-byte explicit part sent with every record, as first specified for AES-GCM in [RFC 5288](https://www.rfc-editor.org/rfc/rfc5288) (2008); a nonce must never repeat under the same key.

Integrity: there is no separate MAC because the AEAD tag authenticates every record. The SHA256 at the end of the name selects the TLS 1.2 PRF hash used to derive keys and compute the Finished messages.

## Why this rating

- Anonymous key exchange without server authentication, so a man-in-the-middle can impersonate the server.

## Which TLS libraries support it

Support for TLS_DH_anon_WITH_AES_128_GCM_SHA256 as read from each library's own source code or official documentation on 2026-11-10. “Enabled by default” means the library negotiates it with no configuration; “off by default” means it is implemented but has to be switched on.

| Library | Status | Details |
|---|---|---|
| OpenSSL 3.5 | Implemented | cipher string `ADH-AES128-GCM-SHA256` |
| GnuTLS | Implemented | name `TLS_DH_ANON_AES_128_GCM_SHA256`; minimum protocol `TLS 1.2` |
| BoringSSL | Not supported | - |
| Go crypto/tls | Not supported | - |
| NSS 3.133 | Not supported | - |
| Firefox | Not supported | - |
| Java 21 (SunJSSE) | Supported, off by default | blocked by “`anon`” in the default jdk.tls.disabledAlgorithms |
| Windows Schannel (Windows 11 / Server 2022) | Not supported | - |
| rustls 0.23.46 | Not supported | - |

None of the 9 libraries tracked here enables it by default. Supported but off by default in: Java 21 (SunJSSE). Also implemented by: OpenSSL 3.5 and GnuTLS.

NSS shows the library's own defaults; Firefox switches every NSS suite off at start-up and re-enables only those with a security.ssl3.* or security.tls13.* preference. Java defaults are derived from the jdk.tls.disabledAlgorithms value Oracle documents for JDK 21, which later updates may extend. The OpenSSL and GnuTLS rows only show whether the suite is implemented.

- [BoringSSL — ssl/ssl_cipher.cc (main)](https://boringssl.googlesource.com/boringssl/+/refs/heads/main/ssl/ssl_cipher.cc) (2026-11-10)
- [Go — src/crypto/tls/cipher_suites.go (master)](https://github.com/golang/go/blob/master/src/crypto/tls/cipher_suites.go) (2026-11-10)
- [Go — src/crypto/tls/defaults.go (master)](https://github.com/golang/go/blob/master/src/crypto/tls/defaults.go) (2026-11-10)
- [NSS — lib/ssl/ssl3con.c (as vendored in Firefox)](https://github.com/mozilla-firefox/firefox/blob/main/security/nss/lib/ssl/ssl3con.c) (2026-11-10)
- [NSS — TAG-INFO](https://github.com/mozilla-firefox/firefox/blob/main/security/nss/TAG-INFO) (2026-11-10)
- [Firefox — security/manager/ssl/nsNSSComponent.cpp](https://github.com/mozilla-firefox/firefox/blob/main/security/manager/ssl/nsNSSComponent.cpp) (2026-11-10)
- [Firefox — modules/libpref/init/StaticPrefList.yaml](https://github.com/mozilla-firefox/firefox/blob/main/modules/libpref/init/StaticPrefList.yaml) (2026-11-10)
- [Oracle — JDK 21 Providers Documentation: SunJSSE Cipher Suites](https://docs.oracle.com/en/java/javase/21/security/oracle-providers.html#GUID-7093246A-31A3-4304-AC5F-5FB6400405E2) (2026-11-10)
- [Oracle — JDK 21 JSSE Reference Guide: jdk.tls.disabledAlgorithms](https://docs.oracle.com/en/java/javase/21/security/java-secure-socket-extension-jsse-reference-guide.html) (2026-11-10)
- [Microsoft Learn — TLS Cipher Suites in Windows 11](https://learn.microsoft.com/en-us/windows/win32/secauthn/tls-cipher-suites-in-windows-11) (2026-11-10)
- [Microsoft Learn — TLS Cipher Suites in Windows Server 2022](https://learn.microsoft.com/en-us/windows/win32/secauthn/tls-cipher-suites-in-windows-server-2022) (2026-11-10)
- [docs.rs — rustls 0.23.46 crypto::aws_lc_rs (default provider)](https://docs.rs/rustls/0.23.46/src/rustls/crypto/aws_lc_rs/mod.rs.html) (2026-11-10)

## History and standards status

TLS_DH_anon_WITH_AES_128_GCM_SHA256 (0x00,0xA6) is registered in the IANA TLS Cipher Suites registry with [RFC 5288](https://www.rfc-editor.org/rfc/rfc5288), “AES Galois Counter Mode (GCM) Cipher Suites for TLS” (August 2008, Standards Track) as its specification. [RFC 9325](https://www.rfc-editor.org/rfc/rfc9325) (2022), part of BCP 195, says implementations SHOULD NOT negotiate static DH or ECDH key agreement because neither has forward secrecy. [RFC 10015](https://www.rfc-editor.org/rfc/rfc10015) (2026) now says clients MUST NOT offer and servers MUST NOT select non-ephemeral FFDH suites in (D)TLS 1.2, and IANA changed this entry's Recommended value to D.

## Nginx / Apache

Disable

```nginx
ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:!ADH-AES128-GCM-SHA256';
```

```apache
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:!ADH-AES128-GCM-SHA256
```


## How to test whether a server accepts it

Offer only TLS_DH_anon_WITH_AES_128_GCM_SHA256 with openssl s_client; if the handshake completes, the server accepts it:

```bash
openssl s_client -connect example.com:443 -tls1_2 -cipher ADH-AES128-GCM-SHA256 </dev/null
```

nmap's ssl-enum-ciphers script connects repeatedly, trying one suite at a time, and lists every suite the server accepts with a grade from A to F. Look for TLS_DH_anon_WITH_AES_128_GCM_SHA256 in its output:

```bash
nmap --script ssl-enum-ciphers -p 443 example.com
```

To decode a name or hex code, use the [cipher suite lookup](https://ssl.sh/tools/cipher-suite-lookup/); the [SSL checker](https://ssl.sh/tools/ssl-checker/) shows which protocol versions a live server accepts and the cipher suite it negotiates.

## FAQ

### Is TLS_DH_anon_WITH_AES_128_GCM_SHA256 secure?

No. ssl.sh rates it insecure. Anonymous key exchange without server authentication, so a man-in-the-middle can impersonate the server. [RFC 10015](https://www.rfc-editor.org/rfc/rfc10015) (2026) now says clients MUST NOT offer and servers MUST NOT select non-ephemeral FFDH suites in (D)TLS 1.2, and IANA changed this entry's Recommended value to D.

### Can TLS_DH_anon_WITH_AES_128_GCM_SHA256 be used with TLS 1.3?

No. TLS 1.3 has its own suites that name only the AEAD and the hash, and TLS 1.2 suites can't be used in a TLS 1.3 handshake. TLS_DH_anon_WITH_AES_128_GCM_SHA256 works with TLS 1.2. The closest TLS 1.3 suite is [TLS_AES_128_GCM_SHA256](https://ssl.sh/ciphers/tls-aes-128-gcm-sha256/), which TLS 1.3 combines with a separately negotiated key exchange such as X25519.

### How do I disable TLS_DH_anon_WITH_AES_128_GCM_SHA256 in Nginx or Apache?

Exclude it by its OpenSSL name: append `!ADH-AES128-GCM-SHA256` to `ssl_ciphers` in Nginx or to `SSLCipherSuite` in Apache httpd. Listing only the suites you want, as in the snippet above, works even better. Reload the server and repeat the openssl s_client test to confirm the handshake now fails.

### Which clients and libraries still support TLS_DH_anon_WITH_AES_128_GCM_SHA256?

Only after explicit configuration: Java 21 (SunJSSE). Implemented, default state not tracked here: OpenSSL 3.5 and GnuTLS. Not supported: BoringSSL, Go crypto/tls, NSS 3.133, Firefox, Windows Schannel (Windows 11 / Server 2022) and rustls 0.23.46.
