freedomofpress / securedrop

GitHub repository for the SecureDrop whistleblower platform. Do not submit tips here!
https://securedrop.org/
Other
3.6k stars 685 forks source link

Investigate / enable brotli compression for HTTP responses #7141

Open legoktm opened 5 months ago

legoktm commented 5 months ago

Description

brotli is a (relatively) newer compression algorithm originally developed by Google that broadly provides better compression than gzip.

How will this impact SecureDrop users?

Better compression will lead to faster downloads, which even at say 10% improvement, could be a nice optimization given the slowness/flakiness of Tor.

How would this affect SecureDrop's threat model?

It's possible there are attacks against brotli that don't apply to gzip, but we rely on Tor for network level protection, so those attacks shouldn't apply to us, unless Tor itself is also vulnerable (and then out of our scope, IMO).

Technical notes

eloquence commented 5 months ago

If we revisit the compression choice, see also some of the usability considerations in our current confusing mix of ZIP and gzip: #2289

legoktm commented 5 months ago

Ahhh, right. I should clarify that I was just thinking about brotli for HTTP-level compression.

legoktm commented 3 months ago

In the Firefox 126 release notes:

Firefox now supports Content-encoding: zstd (zstandard compression). This is an alternative to broti and gzip compression for web content, and can provide higher compression levels for the same CPU used, or conversely lower server CPU use to get the same compression. This is heavily used on sites such as Facebook.

Not sure when this will make its way to Tor Browser and if we can enable it in focal's apache.