Hacker News new | past | comments | ask | show | jobs | submit login

The research article cited in the announcement is titled "PGP signatures on PyPI: worse than useless."

That's the issue. Pretending there is a security solution in place is worse than being upfront that there is none. If you look down and notice that your seatbelt is actually made out of angel hair pasta, you might drive more carefully. Hopefully you'll also get a better car.




But they're not "worse than useless", that article was wrong. PGP/GPG are without doubt problematic, they have weak points (like use of SHA-1, some keys that could not be located, and terrible UI) but they are not worse than having no traceability of the package at all between the author and PyPI.


The system guaranteed that a key signed a package. That was its entire utility.

At best, it defeated plausible deniability for package maintainers who had avowed public keys, but then somehow signed a bad package. This wouldn't have stopped the malware from getting onto your system. It only would have led you to the hapless (but honest) package maintainer.

It didn't stop someone who is not you from generating a PGP key for Richard WM Jones, signing malware, uploading to PyPi, and then disappearing back under the rock where they live. And if you believe this system is not useless, then you also believe that at least one person out there was not dissuaded from installing that malware because "Hey, someone named Richard WM Jones went through the trouble of signing it!"

As is often the case, the value of this system depends on your threat model. I'm not too worried about someone going rogue from the tiny population of people who were using PGP correctly. But I am worried about using a platform that claimed to have signing infrastructure, when that infrastructure had no meaningful checks on who was signing.


> they are not worse than having no traceability of the package at all between the author and PyPI.

Except that they are: PGP does not give you this kind of identity relationship. The most it can give you is an association to a key ID, which is (1) brute-forceable, and (2) not strongly bound to any actual user or machine identity.

The only thing worse than an unsecured scheme is an insecure scheme that lulls users into a false sense of security and authenticity. PGP signatures on PyPI are the latter.


>The most it can give you is an association to a key ID, which is (1) brute-forceable

This is false. That would mean brute forcing a 160 bit SHA-1 hash. That is not possible.


This is wrong on every conceivable level:

1. Key IDs are 32-bit truncations of the SHA-1 hash. That means 32 bits of state, not 160. Fake key IDs are observable in the wild[1].

2. You're confusing pre-image resistance with collision resistance. SHA-1 has been publicly vulnerable to practical collision attacks since 2017[2].

[1]: https://www.phoronix.com/news/Short-PGP-Collision-Attacks

[2]: https://shattered.io/


OK, you are talking about the 64 bit keyID. The 32 bit keyIDs are no longer used for the reason you state.

Shattered is about SHA-1 use in key signatures. It has nothing to do with keyIDs.


It's like the larger holy war against self-signed certificates in TLS. They are strictly better than plaintext but there is software that will prefer a plaintext connection to self-signed TLS.


Unverifiable security is not "strictly better" than plaintext.


It is. In both cases you may be MiTMed, but with plaintext that MiTM session may also be eavesdropped upon.

This isn't really debateable. Unverified sig simply is strictly better.


In both cases you can be eavesdropped upon. It really isn't debatable indeed, unverifiable security is not security.


Nope. An unverified TLS session still cannot be examined by a third party. You know you are communicating with exactly one party, even if you don't know who that is.

Your attacker may share the data with a third party, but that's true of verified connections too.


It is true that an unverified TLS session does prevent passive attacks it does not prevent against "active" attacks. The general consensus is that it's not a useful property to differentiate passive from active here, since every passive attack can be upgraded to work as an active attack, on top of the fact that explaining the subtle differences to people is extremely difficult (and since they can be upgraded to active attacks, not worth it).


Unless you have the other parties selfsigned cert pinned, you very well may be experiencing MITM and not know about it.


Exactly. You may be being MITMed, but that attack cannot also be eavesdropped or altered by another attacker.


Assuming of course that the other attacker doesn't just MITM the first attacker.

But this is a very silly threat model, "I want exactly one person to be able to attack me at a time".


Not sure what's silly about that. If I'm on the hotel wifi I'd rather my neighbor not be able to eavesdrop on the person phishing me.

I don't see what's so hard about this:

Plaintext is worst (active and passive attacks possible)

Unverified TLS is better (active attacks possible)

Verified TLS is best (neither active nor passive attacks possible)


It's been a couple days since this thread quieted down, but I've continued to think about the logic behind the discussion. I believe the fallacy here is akin to arguing about numbers without units attached to them.

For most of the people in this thread, the units are all something like "number of times my house burns down." I guess I'd rather my house burned down once rather than twice, so to that extent your position is not irrational. But the second time is not meaningfully different; the only further loss is maybe a magazine or newspaper that the postal service delivered the day after the first fire and placed on the ashes that used to be my mailbox. It's certainly sad that I won't get to read the paper after the second fire in as many days, but I'm still mostly concerned that my house burned down.

Your units, on the other hand, are inconsistent and surprisingly ordered. Either you really enjoyed the unburned article you read, apparently enough to forget that the rest of your worldly possessions are gone (this is the "at least nobody eavesdropped on my conversation with the MITM" position), which implies that the units are large, or that avoidance of eavesdropping outweighs undetected MITM. Or else you wear an asbestos suit 24/7 because you already assumed most of the world is on fire and don't care if it engulfs your home (this is the part about how you believe HN could someday serve malicious JS, so that origin authenticity wasn't a big deal in the first place), which suggests that the units were small.

Your values are your own, and only you can decide to change them. But the discussion might have been shorter and smoother if you'd acknowledged that others have been using a single, consistent unit called "catastrophes," and that the only numbers we care about are zero and any.


Good analogy. I stopped responding after I understood some easily avoidable risks were totally acceptable to bandrami. That's not how my risk model works, especially when it's usually very easy to not accept such risks at all and the alternative would be a potential disaster.

I personally like to have my life/work set up so that I know what catastrophies _can't_ happen (the probablities can be compared to the effort required to boil oceans or waiting until the heat death of the universe).


Again, not "totally acceptable", but better to be limited to a single attack channel than multiple ones. You're just being willfully obtuse to ignore that.


+1. High-school curriculums should include something like applied Bayesian reasoning. Understanding dependent probabilities is an underappreciated superpower.


What I learned from this thread is that a lot of y'all seem to trust counterparties a lot more than you should just because one of the 172 CAs in your OS's chain will claim they are who they say they are. Remember that those 172 CAs include the Chinese and Turkish governments.


Technically the MITMer could send your data to the intended server in plaintext, or upload your traffic as a torrent, or something else fun like that.


The counterparty of verified TLS can also share your communication with a 3rd party; that isn't the problem verification solves.


"Private chat with the devil" is not a useful security model for most web sessions, and it's certainly not suitable for codesigning. Authenticity is the property we're aiming for; if it was just integrity, we'd do nothing at all other than provide digests.


"Private chat with the devil" is the perfect security model for most web sessions. I trust very few websites I visit in any real sense.


> "Private chat with the devil" is the perfect security model for most web sessions. I trust very few websites I visit in any real sense.

I'm sorry, but this is either incorrect or a gross misunderstanding of your own threat model.

Most people treat their online self as an extension of their physical self: that means banking information, private personal details, intimate communications, and everything else that's normally private by virtue of physical ownership needs to go through an authenticated channel.

You might not care that someone can't MITM your Wikipedia traffic, but you almost certainly care that someone can't MITM your tax returns or your medical records.


> You might not care that someone can't MITM your Wikipedia traffic, but you almost certainly care that someone can't MITM your tax returns or your medical records.

So presumably, you'd demand a cert from a trustworthy authority in those cases. But you still don't want your ISP to be able to inject ads into the recipe blog you're reading.


With self signed certificates your ISP can just serve their own self signed certificate, and then inject ads into the recipe blog.


And I definitely want 3rd party verification for my tax preparation website.

But I don't trust news.ycombinator.com any more than I trust somebody pretending to be news.ycombinator.com; validating that cert does nothing useful for me.


> But I don't trust news.ycombinator.com any more than I trust somebody pretending to be news.ycombinator.com; validating that cert does nothing useful for me.

Yes, you absolutely do. You don't expect news.ycombinator.com to serve you malicious JavaScript, or to redirect you to porn, or to do anything other than serve churlish content from the Internet commentariat.


> You don't expect news.ycombinator.com to serve you malicious JavaScript

I absolutely do not trust this site (or most sites) enough to run arbitrary javascript it serves.


> even if you don't know who that is

Thus it can be the eavesdropper, easy.


Exactly, the eavesdropper.

Even if you're being MiTMd by a criminal organization, you aren't also being listened to by the NSA.


I think another thing with pgp is that it's in this awkward place where it's bad enough that few people use it, but good enough that it prevents someone from making an alternative.


Nobody's making a PGP alternative because a major part of what makes PGP bad is that it tries to be a generic solution to every problem, when in practice signing and encryption workflows are incredibly domain-specific.

People are continuously creating better tools for domains that historically saw PGP usage. To name a few: Signal for short-form messaging, age for file encryption, signify/minisign for artifact signing.


The article is closer to a blog post than a multiple authors peer reviewed research paper published in a high impact journal.


That's because it is a blog post. It isn't advertised as anything else.


I wonder if the domain being `blog.pypi.org` tipped them off?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: