caddy icon indicating copy to clipboard operation
caddy copied to clipboard

Support TLS 1.3 fixed and/or random record padding

Open Seirdy opened this issue 2 years ago • 1 comments

Traffic analysis can decipher the size of a request; combined with the hostname or destination IP, this allows an eavesdropper to infer pages a user visits.

TLS 1.3 introduces record padding, mitigating this attack. By adding padding to records, size becomes a much less reliable source of information: fixed record padding makes sizes less unique, while random record padding makes sizes less consistent.

For comparison: Nginx built with OpenSSL allows fixed record paddings through the ssl_conf_command directive. The RecordPadding command allows sizing records to multiples of a given number of bytes. However, I am not aware of any server that supports random record sizing.

Seirdy avatar Oct 13 '22 20:10 Seirdy

Golang stdlib doesn't allow http handlers to control underlying tls.Conn, you need to report to golang to allow tls.Conn Write to inject padding. Then maybe caddy can add a configuration.

WeidiDeng avatar Oct 14 '22 00:10 WeidiDeng

Since this is something the Go standard lib will have to implement before we can do anything (we are not going to fork crypto/tls for our standard builds), I'll close this issue until it's actionable. Interested users should request this feature upstream from golang/go directly.

mholt avatar May 10 '24 21:05 mholt