-
Notifications
You must be signed in to change notification settings - Fork 37
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
Error trying to select an existing key #1885
Comments
Thanks for the bug report. I just fixed a bug with weird S2Ks yesterday, but this seems to be a new one. I'll take a look a little later today, thanks for your continued patience and help! |
Should have included version numbers:
(latest that's in homebrew) |
Very helpful, thanks. |
Can you issue this command? gpg --export-secret-key D1B3ADC0E0238CA6 | gpg --list-packets | grep S2K For me I see something like:
You can snip out the salt if you want, though it's not truly sensitive. Thanks for your help! |
|
Super useful, thanks... |
@maxtaco let me know if there's any other info I can provide. |
We've ordered some yubikeys so we'll check back in once we can understand and repro the issue. Obviously harder to debug since it's a private key and we can't ask for more data. Thanks @alex! |
haha, awesome. thanks much! |
Just to add to this, it's happening to me with a Yubikey 4
Running the lastest on OS X installed via brew
To reproduce:
|
FWIW, the error message appears to have regressed:
Has any thought been given to bringing back the old "do a signature" method of adding a PGP key, until this issue is resolved |
Shoot, likely the update failed. Can you do a Also, can you do a Thanks. cc: @gabriel |
(My |
Whoops, sorry I meant |
|
Thanks @alex. The other bad news is that the feature you want still isn't done. We've been working super hard on a bunch of other features that we hope to push out the door this week. |
👍 |
Looks like we botched the update mechanism with an non-backwards-compatible protocol change. We'll fix that bug with high priority, but in the mean time, it should work to |
Confirmed that there's no more EOF error, and we're back to a boring old On Sun, Jan 24, 2016 at 10:37 PM, Maxwell Krohn [email protected]
"I disapprove of what you say, but I will defend to the death your right to |
Just chiming in that I'm getting the same error with a nitrokey pro based RSA key. |
Yup, this is just any hardware device in GPG. It happens with an OpenPGP smart card as well. |
I believe this might be an issue with the underlying golang library: golang/go#13605 |
@alevy we've been slowly working around these errors in our fork. It's news to me that we're not handling non-hardware keys where the primary is offline. I should look further into it. Can you paste in (or email me) a copy of your public key? Thanks! |
@maxtaco Output of the command you asked for earlier $ gpg --export-secret-key 838FA1C717F60F73 | gpg --list-packets | grep S2K
iter+salt S2K, algo: 7, SHA1 protection, hash: 2, salt: 505E4AF0A0ECB4E9
iter+salt S2K, algo: 7, SHA1 protection, hash: 2, salt: C7A32F2BD624865F
iter+salt S2K, algo: 7, SHA1 protection, hash: 2, salt: 87082912A711A4F3
iter+salt S2K, algo: 7, SHA1 protection, hash: 2, salt: C759B7A6C999A81E
gnu-dummy S2K, algo: 0, simple checksum, hash: 0
iter+salt S2K, algo: 7, SHA1 protection, hash: 2, salt: 9DC5C2578FFE383B The public key is big, so I'll just e-mail it to you. Incidentally, this would be an amazing use of KBFS, but alas, I don't have access yet :( |
I think I have an idea for a fix, but want to test it. @alevy, do you remember how you generated your key? Can you generate a new throw-away one the same way (or tell me the GPG version, platforms and steps that you used?) Thanks! |
I have a PR up: keybase/go-crypto#10 My guess is this solves the issue, but I can't test it. My GPG install spits out |
@alevy I might have fixed your issue; changes are now in master. |
@maxtaco awesome. Will test tomorrow. |
I set it up with the fellow who wrote these guides: https://github.com/matthewjweaver/mjw-toolbox/tree/master/crypto/yubi I give it a 50/50 that the guide matches what I ran. I'll take a whirl at this and send a PR for the "read and discard" |
Cool! Thank you! On Sunday, February 21, 2016, Alex Gaynor [email protected] wrote:
|
PR sent! |
(If there's some way I can export the relevant state for you so it's more reproducible, let me know!) |
We have a new error to contemplate:
https://github.com/keybase/go-crypto/blob/master/openpgp/packet/packet.go#L158-L169 looks to the site of the offender. |
A buddy of mine has not had this issue with a key he generated on the Yubikey. I'm not sure if that is useful/relevant. cc/ @legittalon The primary difference I can see between his and my key is that his master key is present on the Yubikey, while mine is not, as it was generated in Tails. |
I've just updated to
Key was freshly generated on a Nitro-Key-Pro |
@alex we have good progress on YubiKeys, @jacobhaven will update. @pipermerriam no promises about Nitro Keys, we've never played with those. |
@ansiwen would you guys be willing to send the keybase folk a nitrokey to play with? |
@pipermerriam: I'm not into the USB Nitrokeys. @jans23: what do you think, can you send them one? |
I have the same experience and setup as @killtheliterate w/yubikey. 1.0.14-1 on Arch Linux:
|
@pipermerriam Yes, we can send you a Nitrokey. Please send me your address. Nitrokey Pro works out of the box with GnuPG. Do you utilize GnuPG or is it your own software? |
@jans23: I think either @maxtaco or @jacobhaven needs the Nitrokey, @pipermerriam just organized it because he is interested in the solution, I guess. |
To manage expectations, we might not have enough bandwidth to accommodate all GPG hardware, since we're focusing most of our efforts these days on our FS product. Always happy to look at PRs though |
If you integrated Yubikey's OpenPGP Card feature already it may work Am 23.03.2016 um 21:23 schrieb Maxwell Krohn:
|
This appears to be resolved. |
After googling for this error, since I was hitting it in an unrelated setup, I found this thread (again, hilariously) and have a plausable theory for this: When GnuPG exports the secret chunks of a key, it will also export the subkey private material. This will come as wholly uninteresting to everyone involved, I'm sure. However, the interesting part is when that subkey does not have a private component associated with it (e.g. a hardware token, or subkey that has a key on another machine), it is marked "offline". From the GPG manpage:
So, I made a key, and added a subkey with the I then added a new key and let it keep the key material.
And, now the interesting part of
Now, on the real subkey packet, it has an S2K packet that looks legit, and the "offline" key has a "gnu-dummy" subkey on it. Neat! Seems like it's exporting shim (and empty) secret packets for the keys it doesn't have the private half to, which would explain why it's coming up with anyone doing stuff with Yubikeys. This is a really wackado thing for GnuPG to do, and I'm kinda creeped out that it does this rather than just outputting the public key packet. I'm sure there's a totally plausible and mature reason to do this rather than legacy code. I guess the behavior of If it didn't crash there, it would for sure blow up when it tried to read the actual private key material, so maybe this is better? Who can know. |
I think the point of the dummy packet is so that GnuPG can tell the difference between "we don't have this secret key" and "we're supposed to have this secret key, look for a hardware device that can sign with it for us, and potentially prompt to insert it if not found". Otherwise any time you asked to sign with any key, it would have to go rummaging for a smartcard, and then maybe pop up a confusing prompt asking you to insert something you don't necessarily even have if you picked somebody else's key. |
@mithrandi a good answer, and it does, in fact distinguish between key packets (marked with a Which I still, for the record, think is whackado. |
I pushed this error to x/crypto/openpgp last night - golang/go#23226 |
FWIW me made so many changes to go’s implementation that we forked it a
while ago.
…On Sat, Dec 23, 2017 at 10:35 AM Paul Tagliamonte ***@***.***> wrote:
I pushed this error to x/crypto/openpgp last night - golang/go#23226
<golang/go#23226>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1885 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA05_0c8nJqjSflRTdOqsDGHl5DRjSEvks5tDR23gaJpZM4GpQcL>
.
|
This is likely caused because it's a key on a hardware device (Yubikey NEO):
The text was updated successfully, but these errors were encountered: