Decryption with OpenPGP card fails

Werner Koch wk at gnupg.org
Sun Apr 29 11:22:35 CEST 2012


On Sat, 28 Apr 2012 12:06, edmond at systemli.org said:
> Hello, I am facing problems decrypting data with my OpenPGP v2 card.
> Signing however is working just fine. I have collected the following
> output. The PIN retry counter looks a bit weird, could that be the problem?

The "3 0 3" are just fine.  The 0 is for backward compatibility with 1.x
cards.

> $ gpg2 --decrypt foo.txt.asc
> gpg: encrypted with 4096-bit RSA key, ID 89D322C9, created 2012-03-18
>       "Edmond <edmond at systemli.org>"
> gpg: public key decryption failed: General error

I assume that your gpg-agent and scdaemon are also from 2.0.19.  That
should indeed work.  To debug this you should enable debugging for
scdaemon by putting the lines

  debug 1024
  log-file /foo/mylog.log

into ~/.gnupg/scdaemon.conf

This will show what gpg-agent sends to scdameon.  If it does not sent
anything, you can do the same for gpg-agent.conf.  Still nothing?  Add a
line 

  debug 2048

to scdaemon.conf and you will see all the data passing to and from the
card.  This also shows the PIN and other information from the card; thus
you better edit the file before posting.


Salam-Shalom,

   Werner


-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-users mailing list