-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPG verification and signing of packages #208
Comments
the the deken-plugin (as built into Pd, but which can also be updated separately; this is the "download phase"), currently doesn't do any signature verification (which of course should be fixed in the long run). so the basic infrastructure is already there. your additional suggestion is about "automatic signatures", which i either don't understand or at least don't see to have any positive effects. signing packages is about adding trust about the origin of these packages. |
i think the biggest issue is, that I don't know yet how to design the GPG-verification. a package can have one of the following states:
the only obvious reaction i can think of is to reject packages that have an incorrect GPG-signature.. But what to do about the rest?
We should have some WoT verification, e.g. allowing
An idea is to allow the user to explicitely specify a number of authorities (or rather their keys) from which they accept packages (and reject all packages signed by other people) |
The main problem with public key infrastructure is, while diffie helman is fine for transferring of keys, the main crux of determining if the keys are valid in the first place, i.e. they belong to who they are purported to belong to, is not really addressed, other than through the "go forth and signing party" mantra of the web of trust. The browsers do this by preinstalling a set of certificate authorities akin to pre shared keys, and regularly updating them through the repository update process. If pure data includes an independent set of keys with which we can trust, it'll be the first in creating a trusted keyring. So for instance, if developers get together at a pure data conference, and you verify using actual photo IDs, that could be one method. The other method depends on accrued reputation as a form of verification. For instance, miller puckette would be one with an accrued reputation that would entail, a key that is not his be found out quicker and revoked, and he would be less likely to upload malicious code. When two or more individuals with accrued reputation meet and they key sign each other, is when there begins a network effect of trust. They form the trust anchors by which the entire community can base the downloads from. And so, the first step is requiring developers to sign their uploads, and when their accrued reputation becomes significant and they meet others from the community, their uploaded keyring can serve as trust anchors for others. As it is, the web of trust for most is simply downloading keys from a keyserver without actually being able to verify those keys. That's more like 'the thread of transient temporality' really. |
so what should we do? |
Currently there isn't really a great way of doing this so. Fundamentally noone really wants to sift through uploaded code to verify that it functions the way it is supposed, so this scheme is mostly to focus on stopping downloading of code that is not the same as the one being uploaded: Phase 1:
Phase 2:
|
this is probably the biggest hurdle in the entire game.
what's the "upload server"?
what does "github" have to do with this? what do you mean with "CD distributed"? |
3.3 Github or for that matter any other entity that distributes PD, should have a copy of the public key. With the public key distributed by many entities, a method of verifying tampering would be for the user to download as many versions of pd to check for any changes to the public key. CD distribution is the method by which distros are distributed through compact discs in magazines, meetups, etc. CD distros have the advantage of being an immutable checkpoint where one can say at this point our sets of processes lead us to believe the distro is ok. A public key distributed with pd and included as a package on disc of a repo, would likewise serve as a nice physical immutable checkpoint |
|
thanks for your clarifications. regarding "CD as a medium for distros": we already have Pd in linux distros like Debian. These distros come with a lot of packaged externals. and these distros come with an established way of guaranteeing the integrity of their packages (using gpg signatures on a distro level, reproducible builds,...). I mention this only, because in terms of developer-cooperation i think it totally illusory to force your ordinary Pd external developer to do a proper key management (as in: creating keys, uploading keys, extending key expiration dates,...; and using proper keylengths and password-protect their keys; and once the keys are password-protected to not forget the password during any period (extending 2 months) of inactivity). Linux distributions have a different lever and thus they can (and do) force such things on their maintainers. |
+1. Personally, I don't know how to use GPG signatures at all ¯_(ツ)_/¯ Outside of Linux distros, Pd itself is usually downloaded directly from Miller's website and externals are downloaded via Deken (people need a puredata.info account to upload packages, so I could imagine doing some kind of checking/verification there). Has there been any case of malware disguised as a Pd external? I don't think Pd users are a valuable target for criminals... |
Some commentary about reproducible builds. I've taken a bunch of source and compiled them and checked against binaries on the system. They're always invariably different. At the moment, only certain languages can produce repro builds. Rust and go-lang are some. Everything else requires a certain amount of teeth pulling to work. About some adversity in key usage, at this moment i'm trying to verify a ubuntu 19.10 iso, I download the hash sums, and the gpg file. The local user keyring doesn't have the public key for the gpg file. I go to pool.sks-keyservers.net and search for the ubuntu cd automatic signing key. The resulting page lists the searched key and a bunch of other users' keys that verify the searched key. I try to download the result and import it into the keyring. This does not work, there seems to be an issue with some bytes of the file. The page itself is http only, so i change it to https. The browser tells me the ssl cert is issued to a different site. I look for the key that is already on my system, distributed by the distro. But, using a key that is in an iso that comes from the same site that i've downloaded the hashes and gpg file from seems to be against the spirit of having independent verification. So now i use gpg --recv-key to get the key from the hkp keyserver directly, but since i'm behind a proxy, this doesn't work. And to cap it off, dirmngr, which is supposed to handle ocsp, crl, has not been able to honour http_proxy environment variables for years. I'm not sure why there's this extreme friction to getting a valid key off a server to verify these hashes.
gpg key generation is usually done on the local computer because the private key is meant to never be distributed anywhere. Doing a key generation on an external system and distributing that means there's a possibility of copying of the private key. |
well. A big obstacle when attempting to build reproducible is that many builds include the build date ( |
Repro builds: Having seen that list, I'd say there should be an easier way for developers to do that. For example, maybe an apt-get source gets a dockerfile to create an environment to do a repro build. |
probably, but that is not a problem for deken's "GPG verification and signing of packages". |
Is there someone's gpg public key that i can download that has a large amount of already signed keys? |
what do you mean by that?
- a key that has been used often to sign deken packages?
- a key that has often been signed by other people('s keys)?
- a key that has often been used to sign other people('s keys)?
and what is "often"?
|
So if a person signs another person's key and vice versa, and they update their keys on the keyserver, the web of trust entails that anyone downloading the public key will get a set of those keys as well. But first, finding these individuals is difficult if one is surrounded by non techies. So based on that criteria, what is the argmax(KeyringSize(key)) i.e. whose key should i download such that i have the largest number of trusted( or marginally trusted) public keys |
Currently, any package can be uploaded to the repository, without verification of whom that uploaded the compiled tarballs.
Is it possible that instead of submitting compiled tarballs into the site, there is an upload script that resides on the user's machine that hashes and signs the signature of that package before uploading to the site?
During the download phase, the tarball containing the signed hash can be used to verify the integrity of the tarball and at the same time provide authenticity about the person who uploaded it. Knowing that pki itself is a complicated thing, and not every developer wants to deal with maintaining private keys, still, the upload script could hide the details of key submission to a keyserver, while the download script could verify good signatures on the downloaded packages.
This would help in following the provenance of the tarball.
The text was updated successfully, but these errors were encountered: