keybase / client

Keybase Go Library, Client, Service, OS X, iOS, Android, Electron
BSD 3-Clause "New" or "Revised" License
8.91k stars 1.23k forks source link

ERROR ImportKey error: openpgp: unsupported feature: hash for S2K function: 0 #1815

Open burningtree opened 8 years ago

burningtree commented 8 years ago

I just playing with new v1.0 keybase client and I discovered that I cannot encrypt and sign messages using "keybase pgp" command.

NOTE: I have stored my PGP private key inside Yubikey token (smartcard). See https://www.esev.com/blog/post/2015-01-pgp-ssh-key-on-yubikey-neo/

The first symptoms are exactly the same as issue #1411 :

GPG tools sign without problems:

$ echo "hello" | gpg --sign --armour
-----BEGIN PGP MESSAGE-----
...

"keybase encrypt" is OK:

$ echo "hello" | keybase pgp encrypt
-----BEGIN PGP MESSAGE-----
Version: Keybase Go 1.0.9 (darwin)
Comment: https://keybase.io/download
...

and "keybase sign" is broken:

$ echo "hello" | keybase pgp sign
▶ ERROR No secret key available

BUT, when i tried solution from #1411, unfortunately it does not work...

keybase pgp select --only-import
#    Algo    Key Id             Created   UserId
=    ====    ======             =======   ======
...
2    3072R   98421DBD09302131             Jan Stránský <jan.stransky@arnal.cz>
...
Choose a key: 2
▶ ERROR ImportKey error: openpgp: unsupported feature: hash for S2K function: 0

What is wrong?


Additional info:

$ keybase --version
keybase version 1.0.9-0
$ gpg -K --fingerprint
-------------------------------------
sec#  3072R/09302131 2015-07-19 [expires: 2017-07-18]
      Key fingerprint = E230 092B DE79 B552 74C0  7697 9842 1DBD 0930 2131
...
ssb>  2048R/087E660B 2015-07-19
ssb>  2048R/B0B9B199 2015-07-19
ssb>  2048R/2BD3645D 2015-07-19
$ gpg --edit-key 09302131
gpg (GnuPG/MacGPG2) 2.0.28; Copyright (C) 2015 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Secret key is available.

pub  3072R/09302131  created: 2015-07-19  expires: 2017-07-18  usage: C   
                     trust: ultimate      validity: ultimate
sub  2048R/087E660B  created: 2015-07-19  expires: 2017-07-18  usage: E   
sub  2048R/B0B9B199  created: 2015-07-19  expires: 2017-07-18  usage: S   
sub  2048R/2BD3645D  created: 2015-07-19  expires: 2017-07-18  usage: A   
Hainish commented 8 years ago

:+1: I'm having the same problem, also with a Yubikey PGP smartcard.

alevy commented 8 years ago

I'm having the same problem with a gpg generated key (not a Yubikey)

EDIT: Looks like this is a duplicate of https://github.com/keybase/keybase-issues/issues/1885

jimt commented 8 years ago

I don't think it is a duplicate, because #1885 seems to reference hardware keys and it is happening without a hardware key trying to use my GnuPG key to login.

I wonder if it is because I have both /usr/bin/gpg (1.4.18) and /usr/bin/gpg2 (2.0.28) installed on my Ubuntu 15.10 machine.

maxtaco commented 8 years ago

@jimt can you send a keybase log send?

jimt commented 8 years ago

@maxtaco 28cc8757d09d0f1908e3bc1c

hughdavenport commented 8 years ago

Same prob here, log id is 56b299acf1c8fda9a780e61c

adlerweb commented 8 years ago

Do you have forcesig on or off? Haven't tested keybase gpg but noticed keybase stopped working completely after enabling forcesig. (3b2dec8bb9221d4e0ec2271c)