-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Versions >= 1.7 loses support for subkeys #909
Comments
Actually I'm not aware of any such changes. Are you sure that only the gopass version changed? |
I tried it again with a new password store. 1.6.12 works, and 1.8.2 doesn't (more details below). It is entirely possible I am doing something wrong cause I don't really understand gpg. I have two yubikeys configured as per this guide each with different keys. To get them both decrypting the keystore I have added their encryption public keys to the .gpg-id file within the store followed by an exclamation mark, i.e. Passwords generated on 1.8.2 will only decrpyt with one of the two yubikeys. While those generated on 1.6.12 are decrypted by both, which still holds on 1.8.2. |
@malramsay64, are you saying that you have added the fingerprints directly to the |
Yes I have been adding the fingerprints of the encryption subkeys to the $ gopass recipients add B2CBB103E7169567964C1F24B1125D5C5F57A29A
Do you want to add '0x8C945615619236BA - Malcolm Ramsay <malramsay64@gmail.com>' as an recipient to the store ''? [y/N/q]: y
Error: failed to add recipient 'B2CBB103E7169567964C1F24B1125D5C5F57A29A': Recipient already in store I was editing the |
I can confirm the issue, I am pretty much in same situation as @malramsay64. It seems to encrypt only for the last sub key which happens to be my backup :-( |
I can't speak to existing However, has anyone tried PGP's On Qubes OS and with Keybase.io, I too have had issues with sub-keys. I usually get around it by specifying my exact/default Subkey I want to use on the machine with However, best practices of PGP dictates to only have short-expiring sub-keys on your daily-driver (the machines you use every day) to limit your attack surface. E.g. sub-keys that expire every 30 days or so. Your master private key should be kept on an air-gapped machine, where you only fire it up to generate new sub-keys or to revoke old sub-keys if a machine was compromised. With that said, I have on my work machines and laptops only the sub-key I want to use on that machine - and no other private keys. I usually don't run into problems with QubesOS or Keybase.io with this setup. Only on my desktop where I have multiple private keys in the air-gapped vaultVM. So... I wonder if setting I'll experiment as well as I'm looking at The only other thing related may be the use of PGP's But as a long-time users of PGP, what I have seen is when using hidden-recipients with PGP for encrypted messages, the receiving users must cycle through all Private keys on their local machine until a match is found - as the message only has 0x00 as the target ID to decode to - since it's hidden and unknown the the receiver's PGP decoding. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Same issue here, have setup 2 yubikeys and have only the public master key and 3 subkeys in each yubikey (one for Encription, other for Signing and other for Authentication). Currently I am unable to decrypt any secret I just created... Anyone found a solution? I found out that I can only decrypt the secrets with the last subkey which in fact is stored in my backup yubikey, so I can only decrypt the secrets with that one and not with the main one. Which defeats the purpose of having only one Key with several subkeys for daily use stored in yubikeys... I followed too the guide in https://github.com/drduh/YubiKey-Guide |
As a quick follow-up, when I was testing gopass 1.7, I only had a subkey on my test domain (VM). Gopass worked fine with only my 1 private key. My guess of the root problem per the error message above that @malramsay64 posted is that the It's just a guess, but would make sense since I am able to use a subkey with 1.7 - because that is the only key on the entire system (no master key). |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Just found this project and got excited about the audit feature. I'm on macOS, and this happens. Only for the audit command however. Per earlier comments, I tried 1.6.10, and that could run audit without any warnings. The entries that yielded decryption failure with latest version are still possible to unlock with latest version if I use the plain access |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still broken. Audit fails to decode. Linux as well. |
My use-case is using the password store on my phone, but I don't trust the "key provider" app with my root key. So I'd create a subkey and encrypt the password store against it and only put that to the phone. Worst case I lose all my passwords... /shrug |
Uh-oh, I am migrating my password to password-store and I was excited to use |
I mentioned, a few years ago above lol, that when I only had my subkey (no master key) I was able to use gopass successfully. I've since moved on from gopass though. So hope that helps someone. |
I'm using Gopass exclusively with a hardware token that's only containing an encryption subkey and a signature&authn one, and it works. So I'm not sure what's happening here. As far as I know we should still be honoring .gpg-id files, but I haven't tested. Anyone got some easy to do steps to reproduce the problem? |
Also it seems we are compatible with throw-keyid and hidden recipients as far as I can tell: |
Here is what I am seeing. My setup is this:
(Not sure if it matters, but the certification and backup-encryption key are on one YubiKey, and active-encryption key is on another YubiKey.) Problem 1: can’t use the CLI to add different subkeys as recipients
This is clearly a UX problem, since this is something that should work. Compare to
and it does exactly what I need. Problem 2: identifying encryption keys by their certifying key does not seem to be future-proofI am pretty new to using Password Store in general, and I am a bit confused as to what will happen when I phase out my current encryption subkey and switch to using a new one (I rotate the active encryption key yearly). Since In other words, the problem here is that I can (easily and without noticing myself) change the actual encryption key used without editing the list of recipients, since the choice of the encryption key is “impure”. With My proposal would be to make Problem 3: ignoring multiple subkeys in
|
Yes, thank you for the detailed walk-through. We haven't worked significantly on subkeys, recipients and gpg since 1.10.1. It seems we have multiple problems, here, indeed. That's not going to be fixed overnight, I'm afraid! We'll dig into it and hopefully correct this for v1.13.0 |
We've removed some of the unnecessary indirection when handling recipients. It would be nice if someone could verify if the latest commits still suffer from this issue. It have long been fixed already. |
I ran into this problem when I figured out after rotating my keys gopass has now encrypted all (new/after fsck) passwords for a public key I don't have the private key for (on my laptop). I'm lucky I found this issue, and will share my investigations so far (& I'm happy to support further) 1. problem: Missing choice of encryption keyI have a main key with some subkeys (showing only the relevant ones here), for only some of them I have the private key (others are for other devices):
(the
=> decryption fails (
potential solutionI sadly could not find any config in gpg to use a specific encryption subkey by default. (there's an open stackexchange question) It will use the correct one if I specify the exact subkey with an exclamation mark:
but not when gopass calls it with the primary key as recipient - wrong one:
So if I could just choose a subkey for gopass, that would be a great step! I dug into your implementation, and found you parse the colons format, so I thought I post my output, in case you need it:
```
sec:u:255:22:FFD59XXXXXXXXXXXX:1676822339:1739895633::u:::scESCA:::#::ed25519:::0:
fpr:::::::::AD23C5B72XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:
grp:::::::::356B6E590XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:
uid:u::::1676823633::EAAA0AC818xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx::Manu [tennox] ::::::::::0:
ssb:u:255:22:2F004F9849B91FB0:1676847492:1700175492:::::s:::#::ed25519::
fpr:::::::::612A8E94XXXXXXXXXXXXXXXXXXXXXXXXXXXXXFB0:
grp:::::::::799A570DXXXXXXXXXXXXXXXXXXXXX2D6B817F21A:
ssb:u:255:18:2387EB8xxxxxxxxE:1676847664:1700175664:::::e:::#::cv25519::
fpr:::::::::1431694EF2E8E9XXXXXXXXXXXXXXXXXXXXX178FE:
grp:::::::::EE6BEDA2C06FXXXXXXXXXXXXXXXXXXXXXXX49ACE:
ssb:u:255:22:B13E450XXXXXXXXD:1676853009:1700181009:::::a:::#::ed25519::
fpr:::::::::54CB5739XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX2D:
grp:::::::::634A7255XXXXXXXXXXXXXXXXXXXXXXXXB6A9F2BC:
ssb:u:255:18:37F4E8BXXXXXXXXX:1676822339:1708358339:::::e:::+::cv25519::
fpr:::::::::08E33517FEXXXXXXXXXXXXXXXXXXXXXXXXXXX2FE:
grp:::::::::227E1C7C0DXXXXXXXXXXXXXXXXXXXXXXXXXA4752:
ssb:u:255:22:6B7259XXXXXXXXXX:1676823245:1708359245:::::s:::+::ed25519::
fpr:::::::::E1CDC957xxxxxxxxxxxxxxxxxxxxxxxxxxB809E0:
grp:::::::::E1D20D77XXXXXXXXXXXXXXXXXXXXXXXXXXXXA36C:
```
|
I just found a workaround - adding the subkey id with an exclamation mark to
gopass will then add the primary key in I also created a request for that option on gnupg |
Summary
Gopass 1.6.12 has support for subkeys added to a .gpg-id file, this no longer works for either the 1.8 or 1.7 versions.
Steps To Reproduce
Expected behavior
Environment
Additional context
This is mostly a note to anyone else that comes across this problem since I didn't find any specific note about this in the docs or release notes.
The text was updated successfully, but these errors were encountered: