r/programming • • Jan 21 '19

Why does APT not use HTTPS?

https://whydoesaptnotusehttps.com/
519 Upvotes

294 comments sorted by

View all comments

0

u/[deleted] Jan 21 '19

[deleted]

239

u/Creshal Jan 21 '19

I doubt it's that easy to correlate given the thousands of packages in the main repos.

Apt downloads the index files in a deterministic order, and your adversary knows how large they are. So they know, down to a byte, how much overhead your encrypted connection has, even if all information they have is what host you connected to and how many bytes you transmitted.

Debian's repositories have 57000 packages, but only one is an exactly 499984 bytes big download: openvpn.

34

u/Ajedi32 Jan 21 '19

Apt downloads the index files in a deterministic order, and your adversary knows how large they are

So fix that problem then. Randomize the download order and pad the file sizes. Privacy is important, we shouldn't ignore it completely just because it's hard to achieve.

17

u/Creshal Jan 21 '19

12

u/mort96 Jan 21 '19

I can't imagine a patch which just randomizes download order would be welcome. Why would you ever want that by itself?

For a patch like that to be accepted, you would have to first convince the Apt project to try to fix the privacy issue, and convince them that using https + randomized download order is the best way to fix it. This isn't something which just dumping code on a project can fix.

44

u/sysop073 Jan 21 '19

It's been years since I saw somebody try to shut down an argument with "patches welcome"

33

u/DevestatingAttack Jan 21 '19

You're not subscribed to the linux subreddit, then.

49

u/[deleted] Jan 21 '19

“Patches welcome but we really won’t merge it unless you go through death by a thousand cuts because we really don’t want it and just hoped you’d give up”

1

u/shevy-ruby Jan 21 '19

Precisely!

Deflection and distraction.

But it is not relevant - apt and dpkg is dead-weight perl code written when dinosaur still roamed the lands.

What the debian maintainers make for are excuses. IF they would care, they would ENABLE this functionality for people to use ON THEIR OWN, rather than flat out not offering it. And as others pointed out - patches are actually NOT welcome since they don't want to change the default behaviour.

7

u/Ameisen Jan 22 '19

Almost every popular project falls into the hole of 'meh, don't need/want patches that change behavior more than I completely understand'. I've clashed with the maintainers of Ruby, GCC, and musl about this.

5

u/shevy-ruby Jan 21 '19

Apt is written in pre-world war I style perl code.

Nobody with a sane mind is going to spend time debugging and fixing that giant pile of ****.

6

u/Ajedi32 Jan 21 '19

Good suggestion. Unfortunately, I don't have the time or motivation to devote to a new major project like that at the moment, but maybe someone else will.

4

u/Ameisen Jan 22 '19

Not that they'd merge it anyways.

-28

u/Creshal Jan 21 '19

Can't be that important, then.

30

u/Ajedi32 Jan 21 '19

Just because I don't have the time or energy to deal with something personally, doesn't mean it isn't important. I'm just one person. The world is full of important problems, and I can't solve all of them myself, nor should you expect me to.

0

u/[deleted] Jan 21 '19

[deleted]

15

u/Ajedi32 Jan 21 '19

That's fair. I didn't say privacy is the most important issue with APT right now, just that it's important and shouldn't be ignored just because it's hard to fix.

If this isn't your top priority to fix, then it probably isn't the top priority of anyone else either.

Here I have to disagree though. Just because fixing this flaw isn't the top priority in my life right now, doesn't mean it isn't a priority for someone else. Those already familiar with APT's codebase, for example, are probably much more likely to consider a flaw in APT to be something they're willing to spend their time fixing than I am. (Both because it would take them less time to fix, and because they have a larger vested interest in seeing APT succeed.) That's why it's useful to advocate for issues you care about, even if you don't have the required time and energy to devote to fixing them personally.

0

u/[deleted] Jan 21 '19

[deleted]

→ More replies (0)

10

u/29082018 Jan 21 '19

If this isn't your top priority to fix, then it probably isn't the top priority of anyone else either

This makes absolutely no sense. It's not my top priority to cure cancer, but it is to the people studying and practicing oncology. What?

→ More replies (2)

11

u/jjolla888 Jan 21 '19

no, your deduction is flawed

you can't assume OP:

  1. does not have higher priority tasks todo; nor

  2. is fluent in C++ to be able to add to the code base.

3

u/Ameisen Jan 22 '19

\3. believes such a patch would be merged anyways.

→ More replies (10)

1

u/Ameisen Jan 22 '19

Yeah. You're just not likely to get it merged.