All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] tlshd: Allow the use of post-quantum cryptography
@ 2025-08-28 22:23 Scott Mayhew
  2025-08-28 22:23 ` [PATCH 1/5] tlshd: Fix priority string to allow PQC Scott Mayhew
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Scott Mayhew @ 2025-08-28 22:23 UTC (permalink / raw)
  To: chuck.lever; +Cc: kernel-tls-handshake

These patches allow tlshd to use post-quantum cryptography.  The first
patch fixes the priority string and allows the PQ algorithms to be used.
The remaining patches implement dual certificate support.  Dual
certificates are necessary to enable a smooth transition period,
allowing servers to work with both clients that are PQ-enabled and
clients that are not.  The server will prefer the ML-DSA certificate but
will fall back to the traditional certificate for clients that do not
support ML-DSA.

For those who prefer a web UI, these patches are also available in this
branch:
https://github.com/scottmayhew/ktls-utils/tree/pqc

To use these patches, you need a recent version of gnutls as well as
crypto-policies (if used by your distro).  These commands will help you
determine if your gnutls has the necessary stuff:

$ gnutls-cli -l | grep ML-DSA
$ gnutls-cli -l | grep MLKEM

You'll need to generate a cert using ML-DSA-44/ML-DSA-65/ML-DSA-87.  For
example, here's how I generate a self-signed cert using ML-DSA-65:

$ openssl req -new -x509 -newkey mldsa65 -days 365 \
	-keyout /etc/pki/tls/private/rhel10.smayhew.test.mldsa65.key \
	-out /etc/pki/tls/certs/rhel10.smayhew.test.mldsa65.pem \
	-subj "/CN=rhel10.smayhew.test" \
	-addext "subjectAltName=DNS:rhel10.smayhew.test,IP:192.168.124.69" \
	-noenc -quiet

Obviously if you're using openssl to generate your certs, you'll need a
recent openssl too.  Or you can use certtool if you prefer the gnutls
utilities.

You'll need to add the cert and key to the relevant sections of
tlshd.conf and you should be good to go.

If you have debug logging turned on, you should see this if you perform a
handshake with a PQ-enabled peer you should see something like this:

Aug 28 17:58:25 rhel10.smayhew.test tlshd[3291]: Session description: (TLS1.3)-(HYBRID-X25519-MLKEM768)-(ML-DSA-65)-(AES-256-GCM)

and if you perform a handshake with a non-PQ-enabled peer:

Aug 28 18:04:21 rhel10.smayhew.test tlshd[3352]: Session description: (TLS1.3)-(ECDHE-X25519)-(RSA-PSS-RSAE-SHA256)-(AES-256-GCM)


Scott Mayhew (5):
  tlshd: Fix priority string to allow PQC
  tlshd: Server-side dual certificate support
  tlshd: Make sure x509.pq.certificate is using a PQ public-key alg
  tlshd: Make sure the client supports the PQ pk alg used by the server
    cert
  tlshd: Client-side dual certificate support

 configure.ac             | 12 +++++
 src/tlshd/client.c       | 66 +++++++++++++++++++++++++--
 src/tlshd/config.c       | 97 +++++++++++++++++++++++++++++++++++-----
 src/tlshd/ktls.c         |  2 +-
 src/tlshd/server.c       | 86 +++++++++++++++++++++++++++++++++--
 src/tlshd/tlshd.conf     |  4 ++
 src/tlshd/tlshd.conf.man | 15 +++++++
 src/tlshd/tlshd.h        | 18 +++++---
 8 files changed, 276 insertions(+), 24 deletions(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-09-03 15:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-28 22:23 [PATCH 0/5] tlshd: Allow the use of post-quantum cryptography Scott Mayhew
2025-08-28 22:23 ` [PATCH 1/5] tlshd: Fix priority string to allow PQC Scott Mayhew
2025-08-29 16:47   ` Chuck Lever
2025-08-28 22:23 ` [PATCH 2/5] tlshd: Server-side dual certificate support Scott Mayhew
2025-08-29 16:59   ` Chuck Lever
2025-09-03 13:28     ` Scott Mayhew
2025-09-03 14:17       ` Chuck Lever
2025-09-03 15:03       ` Chuck Lever
2025-08-28 22:23 ` [PATCH 3/5] tlshd: Make sure x509.pq.certificate is using a PQ public-key alg Scott Mayhew
2025-08-28 22:23 ` [PATCH 4/5] tlshd: Make sure the client supports the PQ pk alg used by the server cert Scott Mayhew
2025-08-28 22:23 ` [PATCH 5/5] tlshd: Client-side dual certificate support Scott Mayhew

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.