]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: add server-side ECH
authorRoland Shoemaker <roland@golang.org>
Wed, 30 Oct 2024 03:22:27 +0000 (20:22 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 21 Nov 2024 22:50:04 +0000 (22:50 +0000)
commitf69711434ae0ab383fb6088000736af9bd5638f4
tree35b7c8f66b041ff3de157fda6a02a9d66083c16e
parent50087aa1b46460c8cd65f28afb59c5f79d8f27d8
crypto/tls: add server-side ECH

Adds support for server-side ECH.

We make a couple of implementation decisions that are not completely
in-line with the spec. In particular, we don't enforce that the SNI
matches the ECHConfig public_name, and we implement a hybrid
shared/backend mode (rather than shared or split mode, as described in
Section 7). Both of these match the behavior of BoringSSL.

The hybrid server mode will either act as a shared mode server, where-in
the server accepts "outer" client hellos and unwraps them before
processing the "inner" hello, or accepts bare "inner" hellos initially.
This lets the server operate either transparently as a shared mode
server, or a backend server, in Section 7 terminology. This seems like
the best implementation choice for a TLS library.

Fixes #68500

Change-Id: Ife69db7c1886610742e95e76b0ca92587e6d7ed4
Reviewed-on: https://go-review.googlesource.com/c/go/+/623576
Reviewed-by: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
14 files changed:
api/next/68500.txt [new file with mode: 0644]
doc/next/6-stdlib/99-minor/crypto/tls/68500.md [new file with mode: 0644]
src/crypto/tls/bogo_config.json
src/crypto/tls/bogo_shim_test.go
src/crypto/tls/common.go
src/crypto/tls/ech.go
src/crypto/tls/handshake_client.go
src/crypto/tls/handshake_client_tls13.go
src/crypto/tls/handshake_messages.go
src/crypto/tls/handshake_messages_test.go
src/crypto/tls/handshake_server.go
src/crypto/tls/handshake_server_test.go
src/crypto/tls/handshake_server_tls13.go
src/crypto/tls/tls_test.go