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

README: add instructions for verifying GPG signatures #1646

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamesob
Copy link

@jamesob jamesob commented Dec 11, 2024

Fixes #1644.

@real-or-random real-or-random added the user-documentation user-facing documentation label Dec 11, 2024
Copy link
Contributor

@jonasnick jonasnick left a comment

Choose a reason for hiding this comment

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

Thank you @jamesob. I think this is a significant improvement to our README.

Comment on lines +74 to +77
1. Check the latest release on the [Releases
page](https://github.com/bitcoin-core/secp256k1/releases). Determine the signing GPG ID
by clicking the green icon next to the tag name. For example, in the case of v0.6.0,
this would be `4861DBF262123605`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, okay I understand our discussion in #1644 better now. You're probably not aware that our GPG keys are in SECURITY.md? Yeah, that's not at all obvious. So I think the first step should be to obtain the GPG public keys of all maintainers as described in SECURITY.md.

Copy link
Author

Choose a reason for hiding this comment

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

Ah yeah I did miss that, thanks. I'll revise this change to point to that file.

Copy link
Contributor

Choose a reason for hiding this comment

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

Now that you've added the reference to the file, why not drop this step in the GitHub web interface entirely?

I think the steps should be:

  • Obtain the keys in SECURITY.md
  • Use the command line to verify the tag.
  • If successful, compare the key fingerprint with a trusted source. (I think it's a good idea to compare the full fingerprint, and not just the long key ID.)

None of these require the web (except maybe obtaining a trusted copy of the fingerprint).

README.md Outdated
Comment on lines 78 to 81
1. Cross-reference this key ID with another source controlled by its owner (e.g.
https://x.com/n1ckler).
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this step is security theater. Either this repo is legitimate and the GPG keys are correct or it's not and will have arbitrary instructions here.

One possible justification for including this step is educational: it reminds users how to increase assurance that a GPG key they encounter for the first time is correct. In that case I'd suggest to run the fingerprint through a search engine. Using google, this gives somewhat reasonable results for sipa and myself, but not for @real-or-random.

Copy link
Author

Choose a reason for hiding this comment

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

It may be overly paranoid, but I don't think it's security theater. The problem we're trying to mitigate here is a singular trust of what's presented on Github. I think definitionally, we need to consult a source that is not Github (or something obtained from Github) in order to get additional assurance that the keys we're verifying against are indeed your keys.

The thought experiment is "if Github is compromised, and the attacker can modify any of its content, will the instructions result in catching that?" I think consulting a second source for GPG IDs is necessary to fulfill that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, so iiuc the practical failure mode this can prevent is when instructions and SECURITY.md are obtained from two different sources somehow (or same source, at different times) and only SECURITY.md is compromised. Seems reasonable.

@jamesob jamesob force-pushed the jamesob-24-12-doc-gpg-verify branch from c850edd to f738f38 Compare December 13, 2024 21:10
@jamesob
Copy link
Author

jamesob commented Dec 13, 2024

@jonasnick I've pushed some changes based on your feedback, hope it helps.

Comment on lines +80 to +82
1. If possible, cross-reference this key ID with another source controlled by its owner (e.g.
https://x.com/n1ckler).
- This is to guard against the unlikely case that incorrect content is being presented by Github.com.
Copy link
Contributor

Choose a reason for hiding this comment

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

It's bad enough that we rely on GitHub, so I'd avoid links to other third-party sites. It's up to the user to decide which source they trust, and I don't think it's our job to offer suggestions here. That's bad, but it's a fundamental problem. We cannot do much about it. (For what it's worth, I don't trust x.com too much.) I expect people who obtain the source code of a C library to be able to do their research.

Comment on lines +91 to +95
1. Check out the latest release tag, e.g.
```
git checkout v0.6.0
```
1. Use git to verify the GPG signature:
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I prefer "1. / 2. / 3." instead of "1. / 1. / 1.", i.e., I prefer readability of the plain text file over maintainability.

Comment on lines +74 to +77
1. Check the latest release on the [Releases
page](https://github.com/bitcoin-core/secp256k1/releases). Determine the signing GPG ID
by clicking the green icon next to the tag name. For example, in the case of v0.6.0,
this would be `4861DBF262123605`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Now that you've added the reference to the file, why not drop this step in the GitHub web interface entirely?

I think the steps should be:

  • Obtain the keys in SECURITY.md
  • Use the command line to verify the tag.
  • If successful, compare the key fingerprint with a trusted source. (I think it's a good idea to compare the full fingerprint, and not just the long key ID.)

None of these require the web (except maybe obtaining a trusted copy of the fingerprint).

page](https://github.com/bitcoin-core/secp256k1/releases). Determine the signing GPG ID
by clicking the green icon next to the tag name. For example, in the case of v0.6.0,
this would be `4861DBF262123605`.
- Consult [SECURITY.md](./SECURITY.md) for a complete listing of maintainer keys,
Copy link
Contributor

Choose a reason for hiding this comment

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

"per Github" assumes that the user has obtained the git repo from GitHub, which is likely but not the only possibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user-documentation user-facing documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GPG signed verification of releases
3 participants