Skip to content
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

feat: Setup code signing for all packages using opgenpgp #51

Closed
wants to merge 4 commits into from

Conversation

dignifiedquire
Copy link
Member

Update: Added process references
Update: Added sha512 checksums

I've setup a pgp on my yubikey that is used for the code signing process. This process generates pgp signatures for every single tar/zip file and adds them to directory. As in the description explained they can be verified by running

$ gpg --verify file.tar.gz.asc file.tar.gz

if the key is present.

Ref ipfs/kubo#957

References

Key Management

Setup

  • Every developer (currently me) who has the right to sign releases generates a pgp key, stored on dedicated hardware like a yubikey
  • The fingerprint is added to dist.ipfs.io
  • The public key is uploaded to https://pgp.mit.edu/ for ease of distribution

Verification

  • The user who downloads from dist.ipfs.io can fetch the listed public keys listed from https://pgp.mit.edu/ and add them to their keyring
  • The user downloads the signature + file
  • The user uses pgp + signature to verify the file

Checksums

In addition to the signatures there are also file.sha files containing the sha512 checksum of the packages.

@dignifiedquire dignifiedquire added the need/analysis Needs further analysis before proceeding label Feb 8, 2016
@dignifiedquire
Copy link
Member Author

cc @jbenet @whyrusleeping


You will need to download the public key of the release managers, which are currently,

* Friedel Ziegelmayer <dignifiedquire@gmail.com> [`27F50659`](https://pgp.mit.edu/pks/lookup?search=0x27F50659&op=vindex&fingerprint=on).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to have full fingerprint here. Short ones are not so good any more.

@dignifiedquire
Copy link
Member Author

sure, curious why are they not good anymore?

@Kubuxu
Copy link
Member

Kubuxu commented Feb 8, 2016

There is a list of keys for all short fingerprints generated, if someone will not look at the name and email there is a chance he will download a wrong one from the keyserver.

@dignifiedquire
Copy link
Member Author

thanks @Kubuxu will update with this in mind

@jbenet
Copy link
Member

jbenet commented Feb 8, 2016

Would be nice to have multiple sigs here (like say @whyrusleeping and i both signing off to a release)

@jbenet
Copy link
Member

jbenet commented Feb 8, 2016

@dignifiedquire thank you for leading the charge here! 👍 ❤️

@dignifiedquire
Copy link
Member Author

@jbenet yes need more sigs for sure, but I don't have yours lying around ;) So @jbenet @whyrusleeping please make a PR adding your sigs in here, preferably from a key on your yubikey

@whyrusleeping
Copy link
Member

@dignifiedquire
Copy link
Member Author

TODO from my side, write up general strategy for review

@ghost ghost mentioned this pull request Feb 10, 2016
@dignifiedquire dignifiedquire mentioned this pull request Feb 15, 2016
6 tasks
@dignifiedquire
Copy link
Member Author

@jbenet added first draft of a security doc describing the different parts.

* The private key MUST be stored on seperate hardware than the computer used to sign
the release. For convenience something like a [YubiKey](https://www.yubico.com/)
is recommended.
* The key must have a length of at least `2048` bits and of type RSA.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that generally keys above 4096 should be used, but right now I haven't found a way to generate those keys on my yubikey. So if someone knows how please let me know and we can increase this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only Yubikey 4 and 4 Nano support RSA 4096 and even not all of them IIRC.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use Neo which supports only 2048.

@RichardLitt
Copy link
Member

LGTM.

In order to ensure that downloaded binaries are not compromised we provide
two ways of checking the integrity of the downloaded files.

In the following the reference to "tarball" means either a `zip` or `tar.gz` file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use "archive"

@djdv
Copy link

djdv commented Mar 28, 2018

Recently, there has been discussion in other repos about creating source tarballs that could be built offline due to various connection issues (lost hash, geographic censorship).
ipfs/ipget#48 (comment)
ipfs/kubo#4765 (comment)

These releases will have to be signed for user saftey if they are to be ferried by third parties across various boundaries. As such, I simply want to pulse an alert on this issue due to its age and significance.
@whyrusleeping @Kubuxu

@hsanjuan
Copy link
Contributor

hsanjuan commented Apr 7, 2020

@Stebalien should we pick this up?

@Stebalien
Copy link
Member

That would be awesome! Note: I think a higher priority is a way to update dists without having to fetch and re-add everything if you're looking to improve dists.

@Stebalien
Copy link
Member

Closing as stale.

@Stebalien Stebalien closed this May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/analysis Needs further analysis before proceeding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants