Skip to content

proposal: crypto/tls: add configuration for ECH GREASE #75241

@fortuna

Description

@fortuna

Proposal Details

The existing implementation has no support for GREASE.

I tried to simulate GREASE by setting a fake, but well-formed ECH Config list in tls.TLSConfig.EncryptedClientHelloConfigList, but that doesn't work. According to the draft, if the client offers ECH, and the server doesn't accept it, the client must abort the connection with an "ech_required" alert:

If both authentication and the handshake complete successfully, the client MUST perform the processing described below then abort the connection with an "ech_required" alert before sending any application data to the server.

We need an explicit GREASE option to make the client ignore those as per https://www.ietf.org/archive/id/draft-ietf-tls-esni-25.html#name-client-greasing.

BoringSSL has SSL_set_enable_ech_grease, so the support should be easy to add.
(Edit: it doesn't seem like Go uses BoringSSL)

I propose:

type Config struct {
...
	EncryptedClientHelloGREASEDisable bool
}

That way, the TLS client will always do GREASE if the ECHConfigList is not set, and people can disable it if needed.

ECH GREASE should be enabled by default, because people won't be aware of the need to disable it, and the ECH connections will stick out, leaking traffic information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions