Skip to content

Document post-quantum key exchange in the TLS topic - #5

Closed
madolson wants to merge 2 commits into
mainfrom
pq-tls-docs
Closed

madolson wants to merge 2 commits into
mainfrom
pq-tls-docs

Conversation

@madolson

@madolson madolson commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

Valkey built against OpenSSL 3.5 or later negotiates hybrid post-quantum key exchange (X25519MLKEM768) by default, and every official container image already ships OpenSSL 3.5, but the TLS page does not mention it. This adds a section on the OpenSSL and TLS 1.3 requirements, how to check what a server negotiates, and how to require or prefer post-quantum groups through an OpenSSL configuration file, since Valkey has no directive for groups.

AI generated details

Behavior the section documents

Valkey never sets groups itself and loads the OpenSSL configuration at startup (src/tls.c:174-176, OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG ...)), so OpenSSL's defaults and system_default section decide the groups.

The Groups = X25519MLKEM768 config from the section, against Valkey unstable e3a958b built with OpenSSL 3.5.10:

== client offers X25519MLKEM768:
Negotiated TLS1.3 group: X25519MLKEM768
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
== client offers X25519:
error:0A000410:SSL routines:ssl3_read_bytes:ssl/tls alert handshake failure:ssl/record/rec_layer_s3.c:918:SSL alert number 40
Negotiated TLS1.3 group: <NULL>
New, (NONE), Cipher is (NONE)

With no OpenSSL config the same build negotiates X25519MLKEM768, and Groups = X25519 refuses a PQ-only client with alert 40.

Container images

All valkey-container Dockerfiles (7.2 through unstable) use debian:trixie-slim (OpenSSL 3.5.9) or alpine:3.23/alpine:3.24 (OpenSSL 3.5.10).

Decision for reviewers

The section does not mention tls-groups (valkey-io/valkey#4501, valkey-io/valkey#4502) because it has not merged. Proposal: update this section to lead with tls-groups once it ships, and keep the OpenSSL config path for older versions.

This was generated by AI but verified, with love, by a human.

Valkey built against OpenSSL 3.5 or later negotiates hybrid ML-KEM key
exchange (X25519MLKEM768) with no configuration, but the TLS page does not
say so. Add a section covering the OpenSSL and TLS 1.3 requirements, how to
check the negotiated group with openssl s_client, and how to require or
prefer post-quantum groups with an OpenSSL configuration file, since Valkey
has no directive for groups.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
@madolson madolson added the needs-review Staged work waiting on madolson's review label Dec 3, 2026
Comment thread topics/tls.md Outdated
break the elliptic curve key exchange TLS uses now. Hybrid post-quantum key
exchange protects against this by combining a classical group such as X25519
with ML-KEM, the key encapsulation mechanism standardized in NIST FIPS 203.
The connection stays secure as long as either one holds.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Suggested change
The connection stays secure as long as either one holds.
The connection stays secure as long as either ML-KEM or elliptic curve key exchange are secure.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
@madolson madolson added promoted Change has been promoted upstream and removed needs-review Staged work waiting on madolson's review labels Dec 3, 2026
@madolson

madolson commented Dec 3, 2026

Copy link
Copy Markdown
Owner Author

Promoted upstream: valkey-io#577

@madolson madolson closed this Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

promoted Change has been promoted upstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant