-
Notifications
You must be signed in to change notification settings - Fork 172
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: Unknown S2K function - Issue caused by exported to card gpg keys #44
Comments
I have figure it out! For somebody who has the same issue:
I believe this is a bug in this tool, so some fix is welcomed! |
Thank you @gaoyichuan ! I'm going to close this issue for now, and change the title so future users with the same issue can find it easily. |
Sorry @gaoyichuan - are you saying there is a bug here? Are we using the wrong algo number for something? |
@pinheadmz For those who have one or more of their subkeys exported to smart cards, those subkeys will have a S2K algo number of 101, and at https://github.com/bcoin-org/bcrypto/blob/76266c9e3b8119f99eb5d69a196e9163de5c332d/lib/pgp.js#L1504 |
My suggestion is to skip that pgp packet when it cannot be processed, at https://github.com/bcoin-org/bcrypto/blob/76266c9e3b8119f99eb5d69a196e9163de5c332d/lib/pgp.js#L277 |
Ah ok thanks. Gonna ping @chjj here to see if this is a viable solution. |
I'd prefer not to skip it (I think that may break other things). I'm trying to find some information on this now. It looks like |
I still get the S2K error even after removing all subkeys, creating a new DSA Sign subkey and then re-exporting the secret key, still gives a "Unknown S2K function" error. |
The current master branch of bcrypto has the fix, but I unfortunately don't have a test vector. I might have to dig around the gnupg repo a bit. |
@chjj I updated to your latest bcrypto code, it does get rid of the S2K function error, but now I am getting this error:
|
I have my PGP key moved to my yubikey. However I have the backup of my secret key.
When I use that key to get the airdrop, hs-airdrop gave an error:
After some quick search, I use
cat secring.gpg | gpg --list-packets | grep S2K
to check my key info, it gave:And after patching the code, I found out the S2K algo number is 101
Any help please?
The text was updated successfully, but these errors were encountered: