Repository navigation
security: add cryptography reference #26878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
craig-osterhout
wants to merge
4
commits into
docker:main
Choose a base branch
from
craig-osterhout:post-quantum-cryptography
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+171
−1
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| --- | ||
| title: Post-quantum cryptography at Docker | ||
| linkTitle: Post-quantum cryptography | ||
| description: >- | ||
| See which Docker products and endpoints support hybrid post-quantum key | ||
| exchange, and check the connections and images you depend on. | ||
| keywords: post-quantum cryptography, PQC, hybrid key exchange, X25519MLKEM768, | ||
| ML-KEM, TLS, OpenSSL 3.5, Docker Hardened Images, Docker Hub, Docker | ||
| Sandboxes, quantum-safe | ||
| weight: 50 | ||
| --- | ||
|
|
||
| This page lists hybrid post-quantum key exchange support for Docker endpoints, | ||
| Docker Sandboxes, and Docker Hardened Images, and shows how to check the | ||
| connections and images you depend on. | ||
|
|
||
| Docker is extending hybrid key exchange to the remaining endpoints and to | ||
| Docker Hardened Images FIPS variants. For details, see | ||
| [Docker and the move to post-quantum cryptography](https://www.docker.com/blog/docker-and-the-move-to-post-quantum-cryptography/). | ||
|
|
||
| ## Hybrid key exchange | ||
|
|
||
| Hybrid key exchange on this page means the `X25519MLKEM768` TLS 1.3 key | ||
| exchange group, defined in | ||
| [RFC 10024](https://www.rfc-editor.org/rfc/rfc10024.html). | ||
|
|
||
| Hybrid key exchange applies only when both ends of a connection support it. | ||
| If either end doesn't, the connection uses classical key exchange. | ||
|
|
||
| ## Docker endpoints | ||
|
|
||
| These are the services your clients connect to. An endpoint that supports | ||
| hybrid key exchange uses it when your client offers it. | ||
|
|
||
| | Endpoint | Hybrid key exchange | | ||
| | --- | --- | | ||
| | Docker Desktop and Docker Engine downloads | Supported | | ||
| | Docker Hardened Images registry (`dhi.io`) | Supported | | ||
| | Docker Hub image pulls (`docker.io`), including Docker Official Images | Not supported | | ||
| | Docker Hub web application (`hub.docker.com`) | Supported | | ||
| | Docker Sandboxes cloud API and hosted MCP gateway | Supported | | ||
| | Docker Sandboxes cloud scheduling service | Not supported | | ||
| | Docker sign-in (`login.docker.com`) | Supported | | ||
|
|
||
| ## Docker Sandboxes | ||
|
|
||
| Docker Sandboxes (`sbx`) offers hybrid key exchange by default on the | ||
| connections its CLI and daemon make. The | ||
| [`tls.postQuantumKeyExchange`](/manuals/ai/sandboxes/configuration/settings.md#tlspostquantumkeyexchange) | ||
| setting controls it. | ||
|
|
||
| ## Docker Hardened Images | ||
|
|
||
| Applications in an image use hybrid key exchange only when their TLS library | ||
| supports it and the other end supports it. | ||
|
|
||
| | Image | Hybrid key exchange | Details | | ||
| | --- | --- | --- | | ||
| | Images on Debian 13, or Alpine 3.22 or later | Offered by default | These images ship OpenSSL 3.5 or later. Applications that use the system OpenSSL offer hybrid key exchange. | | ||
| | FIPS variants | Not offered | FIPS variants use the validated OpenSSL 3.1.2 FIPS provider, which doesn't support hybrid key exchange. | | ||
|
|
||
| ## Check a connection | ||
|
|
||
| Use OpenSSL 3.5 or later to test whether an endpoint accepts hybrid key | ||
| exchange. Check your local version first: | ||
|
|
||
| ```console | ||
| $ openssl version | ||
| ``` | ||
|
|
||
| Then require TLS 1.3 and offer only the hybrid group, so the handshake fails | ||
| if the server doesn't support it: | ||
|
|
||
| ```console | ||
| $ openssl s_client -tls1_3 -connect hub.docker.com:443 \ | ||
| -servername hub.docker.com \ | ||
| -groups X25519MLKEM768 </dev/null 2>&1 \ | ||
| | grep "Negotiated TLS1.3 group" | ||
| ``` | ||
|
|
||
| If the endpoint supports hybrid key exchange, the output shows: | ||
|
|
||
| ```text | ||
| Negotiated TLS1.3 group: X25519MLKEM768 | ||
| ``` | ||
|
|
||
| If it doesn't, the handshake fails with an alert, such as | ||
| `handshake failure` or `protocol version`, and the group shows as `<NULL>`. | ||
|
|
||
| Replace `hub.docker.com` with any endpoint you want to test, such as | ||
| `dhi.io`, `login.docker.com`, or one of your own services. | ||
|
|
||
| ## Check an image | ||
|
|
||
| Images can include different TLS libraries and language runtimes, so no | ||
| single command covers every image. Check the following, in order: | ||
|
|
||
| 1. Find the TLS libraries and runtimes in the image. | ||
| 1. Compare their versions with the versions that support hybrid key exchange. | ||
| 1. Test a running service directly, if the image runs a TLS server. | ||
|
|
||
| ### Find the TLS libraries in the image | ||
|
|
||
| List the packages in the image SBOM with | ||
| [Docker Scout](/manuals/scout/how-tos/view-create-sboms.md) and filter for | ||
| common TLS libraries and runtimes: | ||
|
|
||
| ```console | ||
| $ docker scout sbom --format list <image> | grep -iE "openssl|libssl|gnutls|boringssl|golang|stdlib|node|python|openjdk" | ||
| ``` | ||
|
|
||
| For Docker Hardened Images, the system OpenSSL already supports hybrid key | ||
| exchange, except in FIPS variants. See | ||
| [Docker Hardened Images](#docker-hardened-images). Use the SBOM to find | ||
| runtimes and applications that bundle their own TLS library. See | ||
| [Software Bill of Materials](/manuals/dhi/explore/security-concepts/sbom.md). | ||
|
|
||
| ### Compare versions | ||
|
|
||
| Hybrid key exchange depends on the library or runtime that makes the TLS | ||
| connection, not on the image as a whole. Look up the component the | ||
| application uses: | ||
|
|
||
| | Component | Hybrid key exchange | | ||
| | --- | --- | | ||
| | OpenSSL | Offered by default in 3.5 and later | | ||
| | OpenSSL FIPS provider 3.1.2 | Not offered | | ||
| | Go standard library (`crypto/tls`) | Offered by default in 1.24 and later | | ||
| | Other libraries and runtimes | Check the vendor documentation | | ||
|
|
||
| An application can bundle its own TLS library instead of using the system | ||
| OpenSSL. For example, Go programs use the Go standard library | ||
| (`crypto/tls`). | ||
|
|
||
| If the image includes these tools, you can also ask the runtime directly: | ||
|
|
||
| ```console | ||
| $ docker run --rm --entrypoint openssl <image> version | ||
| $ docker run --rm --entrypoint python3 <image> -c "import ssl; print(ssl.OPENSSL_VERSION)" | ||
| $ docker run --rm --entrypoint node <image> -p process.versions.openssl | ||
| ``` | ||
|
|
||
| Docker Hardened Images runtime images don't include a shell or other | ||
| non-essential components. Use the SBOM for those images instead. | ||
|
|
||
| ### Test a running service | ||
|
|
||
| If the image runs a TLS server, start it and test the port with the same | ||
| OpenSSL command used in [Check a connection](#check-a-connection): | ||
|
|
||
| ```console | ||
| $ docker run -d --name tls-test -p 8443:<container-port> <image> | ||
| $ openssl s_client -tls1_3 -connect localhost:8443 -groups X25519MLKEM768 </dev/null 2>&1 | grep "Negotiated TLS1.3 group" | ||
| $ docker rm -f tls-test | ||
| ``` | ||
|
|
||
| The test also depends on the server configuration. A server can restrict its | ||
| TLS groups even when its library supports hybrid key exchange. | ||
|
|
||
| To keep TLS libraries current, use current Docker Hardened Images (Debian 13, | ||
| or Alpine 3.22 or later) and rebuild regularly. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.