Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 12, 22:00 UTC
tls: Add X25519Kyber768Draft00 PQ "curve" behind build tag (#5852)
… when compiled with cfgo (https://github.com/cloudflare/go).
Bas Westerbaan committed
Oct 11, 2023 at 21:45 UTC
289934f3d16405c6aa791d2b0702c2f893045e0e
1 file changed
+24
modules/caddytls/cf.go
new
+24
@@ -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
+}