I've always liked Bertrand Russell's comment on Kant in History of Western Philosophy:
"Hume, with his criticism of the concept of causality, awakened him from his dogmatic slumbers--so at least he says, but the awakening was only temporary, and he soon invented a soporific which enabled him to sleep again."
> The thing done today weren't even computationally possible a decade ago.
Not the things that are breaking, no. The FAA was doing ATC a decade ago. We had email and cloud servers a decade ago. We had bank websites a decade ago. The scale of those things today is perhaps larger than a decade ago, but not enormously larger; indeed, the increase in scale in those things is much smaller than the increase in computing power in the world from a decade ago. So these things should have gotten more reliable--but they haven't.
we made these systems simpler to maintain, to reduce the amount of skill we need to pay for to maintain them. And that does reduce the maintenance costs, at the cost of more compute. but who cares about compute costs where compute per unit of money doubles every 18 months, amirite?
unfortunately it also increases the competence required to change these systems without degrading their performance and usability.
since no one wants to pay that extra cost either, we let the systems degrade a little bit at every change instead, hoping they degrade slower than hardware improves.
that bet was bound to lose eventually, because of laws of physics, and because that degradation pattern affects hardware too.
and the double whammy is - with little demand for expertise - the supply is effectively gone too. so now that the walls have closed in, there is no way out.
We also had this decentralized network which turned into a monopolized shithole that fries normies brains. Although that was probably more than a decade ago.
There’s an open issue for it, but nobody is currently working on it. It’s not a mandatory feature or even something that installers current look at; if and when they do I think it’d be a much higher priority subject.
> nobody should care or even think about this stuff.
Does that mean I, as someone who has projects on PyPI, shouldn't care if I am unable to provide any attestations because I don't want to have to go through one of the recognized forges?
> Authenticity and minimally-scoped credentials should be ambient properties of a system
But if the only way to get them is to go through one of the recognized forges, then they're not "ambient properties" of just PyPI alone, because there's no way for me to use them just with PyPI alone.
> what they are is a cryptographic signature over a set of claims, which allows for authenticated auditing of a project's state over time.
Which is great--but does not in any way require that the attestation can only be produced by working through one of a small set of recognized "forges". You could do this just as easily by, for example, letting me upload to my PyPI account a public key (the same as forges like Github do to allow SSH access), and then letting me sign builds that I upload using the corresponding private key. But that kind of workflow is not being supported. Why not?
> Which is great--but does not in any way require that the attestation can only be produced by working through one of a small set of recognized "forges"
That's true, there's some context elsewhere in these threads about how PyPI can enable email attestations. The short version is that PyPI wanted to make this work by default, which was trivial with Trusted Publishing (since it already provides a strong source of verifiable machine identity).
"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. This is the same mistake that the Web PKI made for decades, and has spent the last 15 years slowly untangling. The ideal setup is one where users demonstrate control over an identity, and then the signing scheme binds that identity to a short-lived signing key. That's how email attestations work.
From what I can gather from the github issue that was linked to, those would still require the email identity to be vouched for by a provider. (Though if whoever already is hosting my email could be a "provider", that would at least greatly expand the list of providers from the current small number of forges.) There doesn't seem to be any way for me to, for example, link a public key I generate myself to an email address that PyPI already has on file for me.
> "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?
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.
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 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.
> 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.
Is "a public key that I personally upload to my PyPI account, using the credentials you already have that allow me to use that account" on the list of targets that will ever be supported?
If not--i.e., if only recognized "forges" are ever going to be supported--why not?
So what? Ultimately the trust model is supposed to be there to validate that this latest blob of code is coming from the same source as the last blob of code for the same project, authenticated with the same public key. And that's all it is telling you, and all that it can tell you, whether the attestation is generated during a Github workflow or by a program running on my personal computer that you can't see. It is not telling you that this latest blob of code is safe and free from problems. It's just telling you that it comes from the same source.
The average person using GPG isn’t actually providing me much evidence in that regard, given the number of ways to have technically used a GPG key to sign an artifact that aren’t secure.
That's easy to handle: if the signature isn't secure, it doesn't count as an attestation. I have no problem with putting the onus on the person doing the signing to do it right. But at present doing it right on your own is not even an option. Only going through one of the tech giants is.
They can't. But they can't tell for sure if large tech corporations are doing that either. Data breaches are a thing. Auditing Github workflows doesn't prevent them.
The fact that a large company can mess things up doesn't change the fact that it's way more viable to review how Github or Gitlab or Codeberg handles key material and security than it is to make a comparable local developer flow that avoids common mistakes like just dropping the signing key on disk on whatever servers you want to run your builds from.
> it's way more viable to review how Github or Gitlab or Codeberg handles key material and security
Only if you already trust them.
> dropping the signing key on disk on whatever servers you want to run your builds from
I run my builds on my local machine. The private key I would use to sign them if PyPI supported that is not anywhere in the repo I'm using.
Of course you would have to trust that I'm telling the truth in what I just said. But, as above, you also need to trust what the large tech forges are telling you in order to review how they handle their keys.
If the PGP key was generated on a yubikey, then the owner of the key can generate and publish an attestation certificate[0][1], and then anybody (including PyPI, I assume) can verify and "gold star" artifacts signed by gpg keys with verified attestations. Pulling a private key off a yubikey isn't super easy, at least not that I know of. Maybe other hardware keys can do similar things?
Seems more straightforward than custom stuff built on OIDC, but I'm not a security guy, so maybe I'm missing something?
One missing bit of context here might be that PyPI used to support GPG signing your packages and barely anybody did it. And that’s not even with trying to push for hardware keys to limit user ability to make a mistake.
You can also look to FIDO2 / passkeys to see that a lot of the folks who have concerns about PyPI trusted publishing also view device attestation as a scourge.
It would be even nicer if there were a way to have an attestation without publishing with a workflow controlled by one of the tech giants. There's no way for me, someone who has had a PyPI account for many years and has used it for all that time to upload packages, to attach my own public key to my PyPI account and then sign uploaded distributions with my private key so the signature can be verified and count as an attestation.
I think the problem is this type of attestation is hard to weigh as a trust signal, vs the cloud CI version.
Inherently, if someone steals your key, or gains access to a box that can use that key for signing, they are indistinguishable from you. Hand PGP signing also lacks time-bound signing, any ratchet mechanism, CT log, consistent key hierarchy, or standard to bind signer name and project identity.
> this type of attestation is hard to weigh as a trust signal, vs the cloud CI version
In the sense that I'm not a large corporation and nobody else is auditing my personal computer, yes, that's true. Note, though, that large corporations are also subject to nefarious actors misusing their infrastructure. What if a rogue employee hacks their internal system? Or Russia or China manages to get a backdoor into it?
In any case, all this doesn't make the method I described impossible. It just means that attestations produced by an individual workflow need to be clearly labeled to distinguish them from attestations produced using a tech forge's workflow, so people will understand what, specifically, is being attested to. Then people could weigh each trust signal as they choose.
> Hand PGP signing
To be clear, I wasn't talking specifically about this method of signing with a personal key. I agree there are lots of issues with PGP as an overall system. I was only talking about the general idea of having some way for individuals to independently generate an attestation without having to go through a tech forge's workflow.
I think their system is vague, subject to political pressure to revoke attestation, and confusing.
We definitely should have a system that has multiple mechanisms for authorship attestation, of ongoing identity control, code control and binary generation sanctity. The last step can be made repeatable if we can manage reproducible builds.
If you generate the GPG key on the yubikey (every tutorial says not to do this unfortunately). Practically, hardly anyone does it securely with a HSM/yubikey, and they store their key online, where it is collected by info stealers. Even if someone uses a Yubikey, they can prove that they did. The lack of a CT system means signing is secret and not timestamped. We need to do better.
> If we had stuck with 0 and 1, we would have avoided all this confusion.
I don't see how. Indeed, using 0 and 1, the int values, as if they were boolean false and true created more confusion. First, int has more values than just 0 and 1--and all of them are "truthy". Second, treating 0 and 1 as booleans is still treating boolean-ness as a noun--but also confusing that with treating it as an adjective for those int values.
PEP 285, which introduced the bool type, gives other rationales as well:
"Hume, with his criticism of the concept of causality, awakened him from his dogmatic slumbers--so at least he says, but the awakening was only temporary, and he soon invented a soporific which enabled him to sleep again."
reply