News for hackers. Stuff that matters.
Re:Why does APT not use HTTPS? by skywhopper on Monday January 21, 2019 @07:57AM (#18960054)
There's a big difference, privacy-wise, between being able to say "X is talking to this debian mirror and thus probably running debian" and "X is downloading exactly these packages from this debian mirror".
Re:Why does APT not use HTTPS? by xorcist on Monday January 21, 2019 @08:11AM (#18960123)
The point being made is that the fact that X just talked Y bytes to this Debian mirror is enough to know exactly which packages were downloaded.

The argument that https obfuscates which packages you download is not a good one, and may cause users to unnecessarily worry about the implications (and conversely, that they end up "more safe" if that was not the case). If that type of privacy is desirable you should probably use something like Tor.

Re:Why does APT not use HTTPS? by kstrauser on Monday January 21, 2019 @12:38PM (#18961946)
When I say `apt-get install foo` and it brings in 47 other packages, the problem gets exponentially more difficult. "He downloaded 1,432,509,104 bytes; what packages were those?" is more or less O(2^n): https://en.wikipedia.org/wiki/Knapsack_problem

If you download exactly one package, it may be easy to deduce which one it was (assuming that the protocol overhead is identical each time, and that changing timestamps and nonces doesn't affect the byte length whatsoever, etc.). If you download more than one at a time, which is common with Debian, then the problem is a whole lot harder.

Re:Why does APT not use HTTPS? by q3k on Monday January 21, 2019 @01:06PM (#18962144)
An HTTPS stream can be side-channel (ie size, time) broken down into black-box HTTP/1 requests quite easily. Remember, even with Connection: Keep-alive, you still have to request every file synchronously after you're done with the previous one.
Re:Why does APT not use HTTPS? by loeg on Monday January 21, 2019 @06:26PM (#18964612)
> Remember, even with Connection: Keep-alive, you still have to request every file synchronously after you're done with the previous one.

Wait, why? I don't know of any reason HTTP clients can't pipeline requests.

Re:Why does APT not use HTTPS? by AstralStorm on Tuesday January 22, 2019 @03:08AM (#18966774)
They can but they do not because servers are broken (and terribly so) and it brings less than zero gain for big files.

See, debian does not want to manage specific mirror server features if they don't have to. If they were in that position they'd make their own protocol.

Re:Why does APT not use HTTPS? by loeg on Tuesday January 22, 2019 @01:12PM (#18970617)
Right, that makes sense. So it's not so much a client limitation as a minimum common denominator for their hosting infrastructure.
Re:Why does APT not use HTTPS? by DoctorOetker on Monday January 21, 2019 @08:52AM (#18960352)
its not because a naive implementation of privacy enhanced APT would fail that all implementations would failt at protecting privacy. Concatenating all the packages and a variable length noise string together, should go a long way.

It would be more fruitful to discuss the different ways an attacker might deduce what software was installed from a naive implementation: download sizes, download date (i.e. new update available for package P, then a substantial fraction of users who were downloading from the server that day were probably installing P etc...

In theory an onion router might substantially improve the situation if the attacker has a hard time identifying which server the user is talking to, and thus making it hard to identify if the user is even installing anything at all...

sadly I don't trust TOR as long as I can't exclude a specific attack scenario I have always suspected about TOR but never actually known to be present...

Re:Why does APT not use HTTPS? by brazzy on Monday January 21, 2019 @09:21AM (#18960503)
> its not because a naive implementation of privacy enhanced APT would fail that all implementations would failt at protecting privacy. Concatenating all the packages and a variable length noise string together, should go a long way.

Sure, but then you are not talking about "just use HTTPS", you're talking about creating your own protocol and requiring all APT packet sources to speak that protocol, requiring a specialized server software, where currently they can just use whatever HTTP server they want. Switching the whole infrastructure and installed base over to that would be a massive multi-year project, not just a handful code and configuration changes.

Re:Why does APT not use HTTPS? by DoctorOetker on Monday January 21, 2019 @09:32AM (#18960571)
Note I use the phrase "naive implementation" and was never talking about nor clamoring for "just use HTTPS".

The real discussion is not "blindly use HTTPS, or leave it like it is", for me the real interesting question is: can we design a package distribution system that preserves privacy against nation state level actors? can we virtually force those to attack the ATP servers themselves? could we use oblivious transfer ? could we design a fresh minimalist onion router (as opposed to bloated TOR) for package distribution?

Re:Why does APT not use HTTPS? by marcosdumay on Monday January 21, 2019 @10:31AM (#18960976)
> can we design a package distribution system that preserves privacy against nation state level actors?

That's a great question. Also, can we do it on top of the current Debian infrastructure (HTTP and everything)? Or do we need to change anything?

Re:Why does APT not use HTTPS? by brazzy on Monday January 21, 2019 @11:12AM (#18961279)
> Also, can we do it on top of the current Debian infrastructure (HTTP and everything)?

I'm pretty sure that is not possible, because the current infrastructure is just plain old HTTP file servers (anything that can sling bits will do) run by whoever fancies being a part of it.

Re:Why does APT not use HTTPS? by marcosdumay on Monday January 21, 2019 @11:23AM (#18961364)
If you create an onion layer like the GP proposes, I don't see any loss from it running over HTTP servers.
Re:Why does APT not use HTTPS? by xorcist on Monday January 21, 2019 @04:18PM (#18963716)
It already exists. It's called tor.

But the question here was why https isn't default in apt, not why tor isn't.

Re:Why does APT not use HTTPS? by DoctorOetker on Tuesday January 22, 2019 @12:40AM (#18966228)
you're replying downstream of my comment containing "for me the real interesting question is:..." where I generalized the question away from the false dichotomy "keep apt as it is, or make https default in apt"
Re:Why does APT not use HTTPS? by brazzy on Monday January 21, 2019 @11:09AM (#18961254)
> The real discussion is not "blindly use HTTPS, or leave it like it is", for me the real interesting question is: can we design a package distribution system that preserves privacy against nation state level actors?

That is certainly an intersting theoretical question, but in practice there is also the question of the costs of something that requires you to change and complicate the whole distributed infrastructure vs. the benefits - are there actually real people who need privacy against "nation state level actors" specifically concerning the Linux packages they install?

Re:Why does APT not use HTTPS? by DoctorOetker on Monday January 21, 2019 @12:59PM (#18962096)
what about journalists, whistleblowers, strictly vocal critics of the centralized surveillance state [0], lawyers, politicians, ... ?

[0] https://news.ycombinator.com/item?id=16947652

EDIT: just adding, we also don't know what the cost is of the most efficient privacy presevering distribution method actually is. only when people investigate and try will we find out.

Re:Why does APT not use HTTPS? by mr__y on Monday January 21, 2019 @01:38PM (#18962399)
> variable length noise Just thinking... could this be achieved by simply adding some extra response headers on the mirror side? That is the response could contain some headers like

   X-Unnecessary-Header-0: [random-string]
   X-Unnecessary-Header-1: [other-random-string]
   ...
This could be enough to insert random-length noise without the need to invent any new protocol. Of course this would only be effective for smaller packages as I assume that headers size is limited and as a result this would significantly change the perceived download size only for smaller packages.
Re:Why does APT not use HTTPS? by DoctorOetker on Monday January 21, 2019 @02:54PM (#18963070)
that might work, and the larger packages might be sent as a sequence of parts, so that essentially all packages have the same size

other things to keep in mind is the dependency graph, some large packages might be rather unique in total filesize downloaded

Re:Why does APT not use HTTPS? by fps_doug on Monday January 21, 2019 @08:08AM (#18960105)
The post you replied to outlined a way to determine which packages were downloaded for the HTTPS way, so I don't get what you're trying to say here.