Hacker News new | ask | show | jobs
by zahlman 19 days ago
> "Why not a public key?" is a good question, and the very short answer is that greenfield signing designs should not assume that all users are able to manage the secrecy of long-lived key materials, much less force them to make parameter decisions when (re)generating materials.

How is offering the public-key option in any way making such an assumption or applying any such force?

1 comments

As can be seen in every sub-thread of this HN post, users are constantly buffeted by bad advice around key management and generation. It’s the reason applied cryptographers still have to even say “don’t use PGP,” despite it not being a sensible thing to even seek out in 2026 (much less 2016).

(Other large-scale PKI initiatives, like the Web PKI, learned this a long time ago. It’s why we have the CABF BRs instead of asking end users to pinky promise that they’re going to securely generate -‘d store a key and keep it around for 10+ years.)

So basically, you are viewing an attestation as making some kind of promise about how carefully the attester handles their private keys. And you're willing to trust a small number of large tech companies to do that, but you're not willing to trust individuals like me to do it. Am I reading that right?
No, I wouldn't say that's right. Attestations are signatures from user-held keys under the hood; they're just short-lived keys bound to an identity rather than long-lived keys.

The nuance is that the party that does that binding is typically someone who is doing more than keeping their private keys on disk, which is why they're trusted to handle more than short-lived key materials. As mentioned elsewhere that can include "big tech companies" (is ActiveState big? I have no idea) but PyPI also supports self-hosted GitLab instances for organizations. Key management is what matters to us, and knowing that we can trust the parties that we still have to trust.

> the party that does that binding

In other words, you only trust parties to do the binding whose key management you find to be acceptable, and "I keep my private key on my local machine that nobody else ever has access to" is not acceptable. Correct?

> PyPI also supports self-hosted GitLab instances for organizations

How does PyPI verify that those organizations are doing key management in a way you find acceptable?

> the Web PKI

The Web allows self-signed certificates. I can put one on my website and people can use HTTPS to connect to it that way. And then it's up to each person who goes to my website to decide how secure my self-signed certificate is, as opposed to one that comes from a CA.

But of course the browser vendors don't look at it that way, they'll put serious warnings up to the user if they see a self-signed certificate, which they won't for a CA-signed certificate. That's basically your thought process as well, yes? Except that since you control the equivalent of the "website" and its certificate here (namely PyPI and its upload process), you won't even allow the equivalent of a self-signed certificate at all.

The Web PKI does not allow self-signed certificates. You can self-sign a certificate and badger your users into trusting it, but as you note the browsers won't help you do that because it's a security pit of despair.

> you won't even allow the equivalent of a self-signed certificate at all.

You can embed a signature into a Python package if you want. There's even a spec for it[1], although nobody has ever really adopted it. And, of course, you can always host a signature somewhere else (and even link to it via standard packaging metadata). But PyPI will no longer allow you to upload a PGP sidecar (which were never standardized, either) because we have strong evidence that (1) nobody ever really bothered to verify them, and (2) even if they had, the quality of the key material was poor.

[1]: https://peps.python.org/pep-0427/#signed-wheel-files

> The Web PKI does not allow self-signed certificates.

That's not what the rest of your post says. The rest of your post says that you can use one for your website--which of course is true since no one can stop you if you insist on doing it--but that the rest of the Web infrastructure will treat your certificate poorly.

I am simply pointing out that it looks to me like PyPI's attestation mechanism is taking a similar viewpoint to the Web infrastructure in this respect.

> You can embed a signature into a Python package if you want.

I'm talking about the attestation mechanism. That mechanism, unless I'm missing something, does not support self-signed certificates.