Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    55comments
  2. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    29comments
  3. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    38comments
  4. San Francisco Onion Futures Company(onionfutures.com ↗)
    61comments
  5. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    397comments
  6. Typesafe-computer-use drives a Mac toward a goal for 1/50th of a cent per step(github.com/awlevin ↗)
    39comments
  7. Science Is Open Software(jepedersen.dk ↗)
    33comments
  8. SDCC – Small Device C Compiler(sourceforge.net ↗)
    16comments
  9. Cloudflare Quick Tunnels(cloudflare.com ↗)
    277comments
  10. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    10comments
  11. Apple M6 Pro Achieves the Highest Single-Core CPU Score in Geekbench 7(geekbench.com ↗)
    6comments
  12. Saving another 100TB of RAM(cloudflare.com ↗)
    68comments
  13. How to Write with an LLM(sockpuppet.org ↗)
    322comments
  14. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    30comments
  15. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    2comments
  16. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    83comments
  17. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    5comments
  18. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    103comments
  19. Goroutine Leak Profiles(go.dev ↗)
    2comments
  20. OpenJev(openjev.com ↗)
    260comments
  21. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    88comments
  22. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    67comments
  23. Veronese's Dogs(publicdomainreview.org ↗)
    discuss
  24. Suppress vulnerabilities applying Kubernetes context to scans(github.com/alegrey91 ↗)
    1comments
  25. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    12comments
  26. Minimal Phone 2(minimalcompany.com ↗)
    220comments
  27. Stepfun Step 5 Preview (LLM): On AA Pareto frontier(artificialanalysis.ai ↗)
    2comments
  28. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    57comments
  29. Cyclomatic Complexity in C#(ndepend.com ↗)
    19comments
  30. Inside ZCode: Silently uploading your Git history to the cloud(ferstar.org ↗)
    97comments

Setup Keybase.io, GPG and Git to sign commits on GitHub

247 pointsby 10y agogithub.com
118 comments
10y agoHN ↗

Is keybase.io still mostly useless because it is not compatible with other key-exchange servers and can't be easily added to Enigma in Thunderbird?

10y agoHN ↗

AFAIK keybase.io is not meant as a key exchange server. You should publish your keys using an existing exchange server.

10y agoHN ↗

Exactly! It would be nice if keybase.io had a simple click this button to publish your public key to common key exchange servers. But it isn't that hard to do it manually.

10y agoHN ↗

The problem is that AFAIK they don't tell their users that anywhere, and I often encounter people that only have their key on Keybase and it's a real pain to import their key.

10y agoHN ↗

OK, I clicked. Where is your email address? Was that stawros or stavros? Do I really need to copy the key or .asc address, wget it and import? How do I know if that's your latest key? Did not you revoke it last week and forgot to update keybase but didn't forget to update your blog? THERE MUST BE AN EASIER WAY!

Ehh screw that. I'll write it in plaintext.

10y agoHN ↗

Where is your email address? Was that stawros or stavros?

It's right in the key!

Do I really need to copy the key or .asc address, wget it and import?

Is this a failure of keybase? You import it as with any other key, "decrypt from clipboard" in your favorite manager, or similar.

How do I know if that's your latest key?

I don't know, how do you know that with a keyserver?

Did not you revoke it last week and forgot to update keybase but didn't forget to update your blog?

Again, same as any other keyserver.

THERE MUST BE AN EASIER WAY!

It seems that the frustration is with the PGP client, rather than keybase or the server, though.

10y agoHN ↗

Keybase has a pretty good command line tool and commands very similar to ones in the article we are commenting upon can be used to grab the public key of a Keybase user using just their Keybase username.

It should probably be easy to presume that if a user gives you their Keybase username they are telling you it's the easiest way to get their most up-to-date key(s) and revocations and that they are actively managing it. (Pretty much the same assumption any time anyone ever suggests to you a specific keyserver over just a fingerprint and keyserver roulette; that's probably the keyserver they actively check/update/revoke and will be the timeliest.)

10y agoHN ↗

Keybase has a pretty good command line tool

Another example of the walled garden. You need their tool, whereas you can just use gpg with every other keyserver.

10y agoHN ↗

Did not you revoke it last week and forgot to update keybase but didn't forget to update your blog?

Revocations are a big problem.

As browser PKIs have demonstrated, revocation lists are basically insane and absolutely Do Not Work at scale when keys are able to live for years.

The endgame with browsers was that the cert revocation lists basically aren't checked. Hooray.

More fundamentally, revocation (even if it was scalable) is fail-unsafe. If someone can block your connections to revocation info sources, they can get you to perform unsafe operations. It's not a stretch to say that this is an absurd problem when we're trying to roll out secure cryptosystems: a network DoS should not crack open my security.

This is something TUF -- http://theupdateframework.com/ -- tackles with their timestamped re-assertions. It limits the amount of time that you can fail-unsafe by after seeing a revocation... to a tunable parameter, perhaps days or even hours, instead of years. At the same time, you get to keep your long-lived keys (you don't have to constantly update everyone on new keys).

We should learn some tricks from TUF for our personal comms PKIs. It would solve a lot of problems.

10y agoHN ↗

Keybase was created by NSA to make pgp/gpg harder...

10y agoHN ↗

«I don't really get what keybase.io is supposed to solve»

Keybase was built to solve the "web of trust" bootstrap problem [1] by leveraging the web of social media profiles a user typically has with simple replicable proofs of social media identity.

[1] Arguably the hardest problem in PKI: how do you get user to trust that a public key is for the right person? In the classic PGP/GPG web of trust you do things like "key signing parties" and physical in real life interactions and deciding your threshold for how far you trust the friend of my friend signed this key. In the Keybase model you can see that the key (or family of keys) are tied to a certain combo of Twitter, Facebook, HN, et al accounts/profiles and generally trust that the person with all those accounts is the person you are trying to communicate with.

10y agoHN ↗

Fair enough, when it comes to coming up with creative ways to solve the web of trust problem.

I still do not know what problem keybase.io solves when they allow uploading of private keys.

10y agoHN ↗

That would be the second hardest problem in PKI: key escrow and key management. The answers to the questions most average users have like: What do I do if I lose my machine? If I'm logged in from the library or work or my friend's PC? If I use multiple machines every day?

When the "right" answer includes "Print out this long thing, put it in a safe deposit box, and pray you never have to type in this long string of numbers", you immediately lose a lot of potential users; it doesn't quite fit the "Grandparent test" (could your Grandparent use it?).

Absolutely there's a trade-off in trusting a 3rd Party key escrow, but there's an immense usability benefit to average users that want something easier to do and "some security" really can be better than "no security", even if a lot of hard-line paranoid wonks have good reason to believe otherwise.

10y agoHN ↗

My grandparents don't even use email. I don't think we should be setting them as the lowest common denominator for security. Some things that are worth doing require a little bit of effort.

10y agoHN ↗

You have have to consider the lowest common denominator in security. You're security it's only as good as your weakest link. Say you have an emergency and your grandparents need to email your PII to a hospital. Can they do it securely? You need to email some PII to them. Can you do it securely? Some security for all is better than no security for most, hence the "grandparent test".

10y agoHN ↗

I think it would be even better if we could design systems where it isn't even necessary for a family member to "email your PII" to anyone. That's a terrible idea in almost any situation, regardless of your security.

10y agoHN ↗

Yes. Keybase is trying to make a walled garden for itself.

I got really frustrated by this a couple weeks ago when I needed to get a key from a contractor but it was only on Keybase, which at the time I thought could be used as a GPG keyserver.

10y agoHN ↗

Just because something is useless to you does not mean it's useless to everyone else. There are clearly a lot of people using Keybase.

10y agoHN ↗

The Homebrew steps seem simpler to me, especially if you already use it. Also easy to update - does the suite auto-update?

Why don't you like Homebrew?

10y agoHN ↗

Anybody here got invitation codes for keybase ?

10y agoHN ↗

Send me an email at [my username with the underscore replaced with a period] at the mail service owned by Google.

10y agoHN ↗

I think I have 20 or so left.

Send a note to hi at myusername [dot] co

10y agoHN ↗

Keybase makes it really easy to sign commits. By using keybase you get to manage keys and sign quickly. gpg will take hours of reading with its non-intuative cli. You're making less work for yourself.

Gpg is the flossing of encryption. It has great efficacy and terrible efficiency.

10y agoHN ↗

I think the cooler part of keybase.io is that it provides a platform for authenticating your separate social accounts (reddit,twitter, etc...) along with websites and github. That's pretty neat, and I can't say I've seen something like it before.

10y agoHN ↗

I also have a few. I would be happy to share. myusername at gmail

10y agoHN ↗

I have 10 that I'd like to get rid of.

If anyone wants an invitation: username at protonmail.ch.

10y agoHN ↗

I have a good number of invites as well. You can email me at [keybase_username] at protonmail.com if you'd like one.

10y agoHN ↗

I have a couple dozen. [username] and google's email service. I'm at work now so I might not get to requests until lunch or after work.

10y agoHN ↗

Thanks for saying this. Or in other words, there are two steps:

1. Make git aware of your signing key

git config user.signingkey "..."

2. Sign the commit

git commit -S ...

That's it.

10y agoHN ↗

...with the added security benefit of not uploading your private key on Keybase!

10y agoHN ↗

How is publicly sharing your public key a security flaw?

10y agoHN ↗

Keybase would prefer to handle your private key too. You can work with your key offline too, but you have to be aware that this is what you want when setting up- and it's very much not the happy path, so the site will not fully work as you might expect.

Not faulting them, they provide the steps needed, but it might be annoying enough for some people to start uploading private keys.

10y agoHN ↗

I've signed up a long time ago (yay early adopters I guess), so I can't comment on the sign up process or setup with your own GPG key nowdays.

But their website works 100% and provides all the functionality if you don't let them host the private key (they give you an easy-to-inspect snippet to paste into your terminal that downloads/signs/uploads things for them. Note, it does do anything when you paste - you need to manually hit enter)

Not disagreeing with you - Just adding my 2c.

10y agoHN ↗

It works fine; you just have to know up front to not just click "yes" for everything during the sign-up process. Not a big deal for people who already know how GPG works, but the whole point of Keybase is to make it easier to use for people new to crypto, and that audience can't be expected to understand that the default settings are a terrible idea.

10y agoHN ↗

I'm talking about uploading your private key. Obviously, it's required if you want keybase to sign on your behalf.

10y agoHN ↗

You can use Keybase with GPG without letting it handle your private key. (I do.)

10y agoHN ↗

You can but last time I used it the first option you were presented with was giving keybase your key. I don't know if that's changed years later because I closed the app at that point, I wasn't interested in using or encouraging others to use such a thing. The guy pointing this out was downvoted and I frequently see the fact that its possible to not give them your key presented as somehow making it acceptable that they ask for it.

10y agoHN ↗

Which I have opted not to do as a over a decade user of GnuPG. But for complete newbs, JavaScript managed keys is preferable to no key at all.

10y agoHN ↗

Much easier than keybase.io. It's still early for keybase though, Im excited to see where they go with it.

10y agoHN ↗

This is timely, considering Ken's recent hack attempt on his github account.

Does anyone know what happens when commit signatures don't match?

10y agoHN ↗

Thanks! That post just prompted me to check what password is on my DNS account, and it turns out to be an insecure one, so I'm fixing that right now.

10y agoHN ↗

Thanks for posting this here.

Please note that this was initially written as a reference for myself, being relatively inexperienced with the keybase client and gpg tooling in general. There are certainly different ways to accomplish the same and you don't have to use keybase, but I wanted to. Please keep this in mind.

Ironically, only the first commit is signed.

10y agoHN ↗

Ironically, only the first commit is signed.

Yeah, and even though I had set this up myself just a few minutes before I submitted PR #3, I ended up committing on the web UI as well, with no signature :D

10y agoHN ↗

When does keybase plan to do nightly keydumps like SKS offers?

10y agoHN ↗

But what do you do with the signatures on the signed commits? It is of some, limited value, to GPG sign because it does provide a little bit more of "John Hancock" for a release, but how does this work in a continuous integration environment? Does the CI server reject commits that are not properly signed? Does the server refuse to run unsigned or incorrectly signed Git deployed code?

10y agoHN ↗

It provides a confirmation that the person who's name & email are on a commit actually made the commit. I can configure my instance of git to make commits as "Linus Torvalds <torvalds@linux-foundation.org>", but only the real Linus can sign them with a publicly-verifiable GPG key.

10y agoHN ↗

# Push an encrypted copy of your new secret key to the Keybase.io server? [Y/n] Y

What's the purpose of this? What attack vectors does it expose?

10y agoHN ↗

Keybase desires to act as a keyserver and public identity record, keeping your aggregated identity, and a backup of your public and private key pair. The latter is (read: should be) encrypted and only accessible to you. They make that optional, though, and will happily keep track of only your public key. It is absolutely optional, and it exposes you in one critical way: You have to take Keybase's word that they cannot (and will not develop the ability to) access your private key, even though it's on their servers.

I don't use that feature, because I can't see an advantage to it. I can keep a paper copy of my private key in a safety deposit box, if I'm worried about having a secured backup of it that's out of my hands.

10y agoHN ↗

You can use it to do actions on the Keybase site by typing in your decryption password. Attack vectors: Keybase site code gets replaced with something malicious, now they have your key password and decrypted private key.

You can also do everything on the command line without trusting Keybase's server or their frontend JS.

10y agoHN ↗

Another problem: if their storage or a backup is compromised, the attackers can brute-force passwords offline without rate-limiting.

In some ways that's worse than actively trojaning their JavaScript since there's no possible way for the target to know that's happened whereas the fronted at least has the low but non-zero chance of someone noticing the malicious code.

10y agoHN ↗

I'm not sure keybase does this by default, but make sure to upload your key to a keyserver such as MIT's (https://pgp.mit.edu). Otherwise, git will complain that the signature is invalid when doing `git log --show-signature`.

10y agoHN ↗

Github doesn't complain for me, so I can only assume that it does this itself. What I did was grab my key from keybase and inserted that into my local keyring, then uploaded that to my github.

10y agoHN ↗

GitHub is happy as long as you upload the public key to GitHub. Git though uses pgp key servers to verify the signature.

10y agoHN ↗

This is only true if the person looking at the repo doesn't have a copy of your key locally. It's important to remember that all of these tools work offline and don't require some web 2.0 service to operate. :P

10y agoHN ↗

If anyone wants in, here are 5 invite links.

[Edit: all used up.]

Each works for only one signup, so hurry up :-)

By the way, most users get around 20 free invites shortly after signing up. If one of the links above opened your account, why not share five of your own invites afterwards?

10y agoHN ↗

And should they run dry, here are some more invites:

Edit: 25 people from HN now have a keybase account.

Should anyone care, you can use:

  $.makeArray($("input.form-control[value]").map(function() {return $(this).val();})).join(" ")

To produce a list of your active invites from the invite page.

10y agoHN ↗

I got the second one and just finished setting it up, thanks!

10y agoHN ↗

Displaying the signature in the web UI is actually the only feature from GitHub I miss when using GitLab. It's not a huge deal, but it gives me a warm-and-fuzzy.

10y agoHN ↗

And as noted nearly every time this 7-year-old comment by Torvalds is mentioned, this is of course technically correct due to the properties of git's Merkle tree, but completely impractical as far as the human implications.

Consider: You've just written 20 lines of code, and you're creating a commit. Can you validate that all 20 lines were created by you before you commit?

Now, consider that you're looking to create a tag for version 2.0, coming from 1.4, with a net 4,000 new lines of code. Can you quickly and confidently validate that all 4,000 lines of code are as expected?

Clearly, the frequent, small validations are much simpler than infrequently signing huge releases. When integrity matters and humans are involved, small batches win.

10y agoHN ↗

If you autosign every commit then you aren't validating anything anyway. All that means is you have another mindless process running automatically in the background. So what's your point?

10y agoHN ↗

You're talking about two different threats / attacks:

1. Someone got access allowing them to push commits.

2. Someone got access allowing them to push commits and also got unrestricted access to the trusted PGP key.

In the first case, auto-signing will expose the issue. In the second, not. But in the second case, you're likely screwed in many other ways.

10y agoHN ↗

Linus has a point, but it's not without flaws. Linus is saying that it makes you complacent, and doesn't prove anything about any release, and that you should sign golden commits. He says this because only what is shipped needs to be trustworthy; and the value of a signature degrades with the more things it signs.

This raises the question, though; how do you know when you reach that golden commit? Is the signer responsible for auditing every commit since the last signature, every line of code? If he doesn't, what does the signature prove?

That's what Linus has wrong; The signatures aren't about proof, they're about audit trail. For Linus and the kernel.org use case, this isn't necessary. They've already built tooling, and most importantly structure around the code auditing. Every commit that goes into the mainline is somewhat audited by Linus himself. There's a whole layer of competent release engineers in front of him. Code doesn't make it onto the kernel.org repos without having been trusted by a very select group, and doesn't get pulled to master without the word of God.

I suggest, for the average developer, having two keys. One online, to verify that the commit was developed on your computer. One offline, that is only used for releases. One for audit trail, one for golden.

10y agoHN ↗

I was also told that having a signature on every commit makes pulling the entire repo take forever (because it has to validate every commit). Not sure how true that is.

10y agoHN ↗

While I don't know how bad the performance would be on huge repos, there is of course an option to turn it on or off (--[no-]verify-signatures.) which I believe is off by default.

10y agoHN ↗

I have 5 keybase invites free if anyone wants to take them.

Edit: All invites taken

10y agoHN ↗

Why would I want to sign all (any?) of my commits? Releases sure, but every single one? What's the point?

Tangentially on topic, when did keybase get that terrible logo? It looks like it'd be the mascot for an off-brand bag of potato chips.

10y agoHN ↗

Only signing releases is equivalent to saying "every bit of code I just released I trust and so should you". This means that you have to have reviewed every change to make sure someone didn't dupe you into signing a commit you didn't mean to.

Signing every commit is a much easier guarantee to make: "this change was made by me and I trust this change". In aggregate it's much better than just having signed releases (though of course you should sign releases in addition to this).

10y agoHN ↗

Here are some invites if you are interested. (added more, replaced some used ones)

16 used, here are more

  https://keybase.io/inv/b24a826ad7
  https://keybase.io/inv/6875c4bf5a
10y agoHN ↗

Thanks for the invite! I'll reply here with a bunch when mine are available.

10y agoHN ↗

Here are a few as well:

  https://keybase.io/inv/16bbae7280
  https://keybase.io/inv/ca4549544a
  https://keybase.io/inv/666215bb91
  https://keybase.io/inv/417ae3ff89
10y agoHN ↗

Here are a few more:

    https://keybase.io/inv/943528e525
    https://keybase.io/inv/fa145b0e59
    https://keybase.io/inv/3e259244ad
    https://keybase.io/inv/cfddcccc32
10y agoHN ↗

Usage note: "setup" is a noun, "set up" is a verb.

10y agoHN ↗

I have 22 invites left if anyone would like let me know!

10y agoHN ↗

Somebody please explain to me: What's the point in signing on github when I can set the key on github itself (e.g. account gets compromised). A simple flag (on github's server) that is showing that my email on commit is the same as on the account would also do the job. What if my key is compromised and set a new one on github? What happens with my old signed commits? Another question: We are mostly no airplane mechanics which need to sign everything of our work. Why would you give up deniability of doing something (with your signed key) without thinking about the consequences? I'm thinking of legal cases here (hey you signed your commit!).

10y agoHN ↗

Github can't verify you actually committed a change unless it's signed. You can set whatever email address you want on any commit.

They could verify who pushed it to github, since that action is authenticated, but restricting pushing other people's commits would break many workflows (eg, a bot pushing from a local git server), or a reviewer pushing code sent to a mailing list, or resolving conflicts in a merge locally.

You can also verify the GPG key independently of Github. Perhaps your CI system could verify all commits it builds are signed, and your deployment system could too. There's no need to use Github as the authoritative source for that sort of thing.

10y agoHN ↗

To continue the chain of invites, I have 22 available. You can contact me at matthew at leaguer [dot] io