Skip to content

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

Open
madolson wants to merge 2 commits into
valkey-io:mainfrom
madolson:promote/pq-tls-docs
Open

madolson wants to merge 2 commits into
valkey-io:mainfrom
madolson:promote/pq-tls-docs

Conversation

@madolson

@madolson madolson commented Dec 3, 2026

Copy link
Copy Markdown
Member

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 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.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>

@zuiderkwast zuiderkwast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Makes sense, though I haven't verified the correctness against other sources.

Comment thread topics/tls.md Resolved
Comment thread topics/tls.md Outdated
versions, ciphers and cipher suites, etc. Please consult the self documented
`valkey.conf` for more information.

### Post-quantum key exchange

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This and all the other level-3 headings on this page are all sub-headings of a single h2 ## Getting started. I think they should all be h2 instead. (It's unrelated though.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done. I dropped "Getting Started" and made all of them h2.

The OpenSSL configuration file is not specific to post-quantum key
exchange, so its mechanics get their own section and the post-quantum
section shows only the Groups line. Every subsection sat under a single
Getting Started heading, so that heading is dropped and the subsections
become top-level.

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants