Skip to content

Commit 289934f

Browse files
authored
tls: Add X25519Kyber768Draft00 PQ "curve" behind build tag (#5852)
… when compiled with cfgo (https://github.com/cloudflare/go).
1 parent 3a3182f commit 289934f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

modules/caddytls/cf.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//go:build cfgo
2+
3+
package caddytls
4+
5+
// This file adds support for X25519Kyber768Draft00, a post-quantum
6+
// key agreement that is currently being rolled out by Chrome [1]
7+
// and Cloudflare [2,3]. For more context, see the PR [4].
8+
//
9+
// [1] https://blog.chromium.org/2023/08/protecting-chrome-traffic-with-hybrid.html
10+
// [2] https://blog.cloudflare.com/post-quantum-for-all/
11+
// [3] https://blog.cloudflare.com/post-quantum-to-origins/
12+
// [4] https://github.com/caddyserver/caddy/pull/5852
13+
14+
import (
15+
"crypto/tls"
16+
)
17+
18+
func init() {
19+
SupportedCurves["X25519Kyber768Draft00"] = tls.X25519Kyber768Draft00
20+
defaultCurves = append(
21+
[]tls.CurveID{tls.X25519Kyber768Draft00},
22+
defaultCurves...,
23+
)
24+
}

0 commit comments

Comments
 (0)