Skip to content

Document post-quantum TLS support - #1695

Open
artberger wants to merge 3 commits into
mainfrom
adb-pqc-tls
Open

artberger wants to merge 3 commits into
mainfrom
adb-pqc-tls

Conversation

@artberger

@artberger artberger commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Highlight post-quantum key exchange support, based on the post-quantum TLS blog.

Add post-quantum (X25519MLKEM768) sections to the listener TLS
settings and backend TLS pages for Kubernetes and standalone.

Signed-off-by: Art Berger <art.berger@solo.io>
@artberger artberger self-assigned this Dec 4, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Deploying agentproxy with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1adac45
Status:⚡️  Build in progress...

View logs

Signed-off-by: Art Berger <art.berger@solo.io>
@artberger
artberger marked this pull request as ready for review December 4, 2026 13:04
Agentgateway supports post-quantum key exchange with the hybrid `X25519MLKEM768` group, which combines the classical X25519 key exchange with ML-KEM-768 (FIPS 203). When the gateway proxy connects to a backend, the proxy is the TLS client. The backend picks the group, but the proxy decides which key shares to send first.

{{< version include-if="1.4.x,1.5.x,1.6.x,1.7.x,1.8.x" >}}
By default, the proxy sends an X25519 key share first. A backend that follows the client's order settles on X25519, and a backend that prefers the hybrid needs an extra round trip to ask for it. To lead with the hybrid, list `X25519_MLKEM768` first in the `keyExchangeGroups` field of an {{< reuse "agw-docs/snippets/policy.md" >}}. Keep `X25519` in the list so that backends without ML-KEM still connect in the same handshake.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should fix. I think this text does not hold for FIPS builds. In crates/agentgateway/src/transport/tls.rs, the FIPS default groups have no bare X25519.

  • v1.6 to v1.8 with fips: P-256, P-384, X25519_MLKEM768
  • main with fips: X25519_MLKEM768, P-256, P-384

So "sends an X25519 key share first" here and "also sends an X25519 key share" in the main variant (line 1096) are both wrong on a FIPS build. The ["X25519_MLKEM768", "X25519"] example also looks like it is rejected there, because provider_with_options_validated fails on a group that is not FIPS approved. That would mark the policy as invalid and return 503s.

Can you scope the backend text to non-FIPS builds, or add a sentence about the FIPS defaults? The same text is in both standalone backend-tls.md pages.


Agentgateway supports post-quantum key exchange with the hybrid `X25519MLKEM768` group, which combines the classical X25519 key exchange with ML-KEM-768 (FIPS 203). An attacker who records the traffic must break both algorithms to decrypt it, so the traffic stays protected even after quantum computers can break X25519.

The hybrid is in the default key exchange groups for listeners, so you do not need to change your configuration or certificates. Clients that offer the hybrid, such as current browsers, Go 1.24 or later, and curl or OpenSSL 3.5 or later, negotiate it in TLS 1.3. Older clients fall back to a classical group such as X25519. The hybrid requires the `aws-lc-rs` crypto provider that the official agentgateway builds use. Builds that use the SymCrypt crypto provider do not support ML-KEM.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should fix, question. On a SymCrypt build, to_supported_kx_group maps X25519_MLKEM768 to rustls_symcrypt::X25519 ("SymCrypt has no MLKEM; fall back to X25519"). I did not find a check that rejects the value, though I might have missed one.

If that is right, a SymCrypt user who lists only X25519_MLKEM768 to require post-quantum key exchange gets classical X25519 with no error. Can you confirm the behavior? If the downgrade is silent, I think the "require" paragraphs need to say so. The backend page and both standalone pages currently say only that the hybrid requires aws-lc-rs.


## Post-quantum key exchange {#post-quantum}

Agentgateway supports post-quantum key exchange with the hybrid `X25519MLKEM768` group, which combines the classical X25519 key exchange with ML-KEM-768 (FIPS 203). An attacker who records the traffic must break both algorithms to decrypt it, so the traffic stays protected even after quantum computers can break X25519.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should fix. The page uses two spellings without an explanation. The prose and the OpenSSL output use X25519MLKEM768, and the API value is X25519_MLKEM768. A reader who copies the name from this sentence into the policy gets a validation error.

Can you add a clause that says which spelling is the TLS group name and which is the value for keyExchangeGroups? The same sentence opens all four sections.

```
{{< /version >}}

The hybrid requires the `aws-lc-rs` crypto provider that the official agentgateway builds use. For a step-by-step walkthrough, including how to verify the negotiated group, see the [Post-quantum TLS on agentgateway](https://agentgateway.dev/blog/2026-12-03-post-quantum-tls-agentgateway/) blog post.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion, optional. The listener pages show how to check the negotiated group, but for backends the only verification steps are in the blog post. The post is written for v1.8.1 and will age. A short step in the docs that verifies the negotiated group on a backend connection would remove that dependency.


Agentgateway supports post-quantum key exchange with the hybrid `X25519MLKEM768` group, which combines the classical X25519 key exchange with ML-KEM-768 (FIPS 203). An attacker who records the traffic must break both algorithms to decrypt it, so the traffic stays protected even after quantum computers can break X25519.

The hybrid is in the default key exchange groups for HTTPS listeners, so you do not need to change your configuration or certificates. Clients that offer the hybrid, such as current browsers, Go 1.24 or later, and curl or OpenSSL 3.5 or later, negotiate it in TLS 1.3. Older clients fall back to a classical group such as X25519. The hybrid requires the `aws-lc-rs` crypto provider that the official agentgateway builds use. To check the crypto provider of your binary, look for `"crypto_backend": "aws-lc-rs"` in the output of `agentgateway --version`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit. "curl or OpenSSL 3.5 or later" is ambiguous, because 3.5 is not a curl version. Do you mean curl that is built with OpenSSL 3.5 or later? The same phrase is in the main copy and in the Kubernetes listener page.

| `subjectAltNames` | A list of names that agentgateway accepts instead of `hostname`. Agentgateway accepts the certificate if the certificate is valid for any name in the list, and no longer checks the certificate against `hostname`. This setting does not change the SNI, so set `hostname` as well if the backend needs a specific SNI. |
| `insecureHost` | If set to `true`, agentgateway skips only the name check. The certificate must still be signed by a trusted CA, either the CA in `root` or, if `root` is unset, a CA in the system trust bundle. Use this setting when the name cannot be listed or changes, not to trust a certificate from an unknown CA. This setting takes precedence over `subjectAltNames`. |
| `insecure` | If set to `true`, agentgateway disables all TLS verification. |
| `keyExchangeGroups` | The key exchange groups that agentgateway offers to the backend, in order of preference. The possible values are `X25519`, `P-256`, `P-384`, and `X25519_MLKEM768`. If unset, agentgateway uses its default groups. For more information, see [Post-quantum key exchange](#post-quantum). |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit. "If omitted" instead of "If unset", to match the field description wording in the rest of the docs. The same row is in the main copy.

Suggested change
| `keyExchangeGroups` | The key exchange groups that agentgateway offers to the backend, in order of preference. The possible values are `X25519`, `P-256`, `P-384`, and `X25519_MLKEM768`. If unset, agentgateway uses its default groups. For more information, see [Post-quantum key exchange](#post-quantum). |
| `keyExchangeGroups` | The key exchange groups that agentgateway offers to the backend, in order of preference. The possible values are `X25519`, `P-256`, `P-384`, and `X25519_MLKEM768`. If omitted, agentgateway uses its default groups. For more information, see [Post-quantum key exchange](#post-quantum). |

Signed-off-by: Art Berger <art.berger@solo.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants