OpenPGP Smartcard + signing email = two signatures?

John Clizbe John at
Fri Oct 11 22:40:00 CEST 2013

Pete Stephenson wrote:
> Hi all,
> I use Thunderbird, Enigmail, and GnuPG on Windows 7 (among others).
> I have my primary cert/sign key on one smartcard and two subkeys
> (signature + encryption) on another. I have the "force signature PIN"
> option enabled for both cards.
> Tonight I was using the card with the subkeys to sign an email message
> that I was sending. As expected I was prompted by pinentry to enter the
> card PIN and that the card had made N signatures before. I entered the
> PIN and immediately pinentry popped up again asking for me to re-enter
> the PIN and indicated that N+1 signatures had been made before,
> suggesting that it had made the previous signature. Again, I entered the
> PIN and the message was correctly signed and everything seems to work
> normally. There is only one signature on the message -- it seems that
> one of the signatures goes missing.
> I've noticed this happening intermittently over the past few months, but
> only when using Enigmail and Thunderbird -- if my memory serves me right
> it also happens intermittently when I use Ubuntu Linux on a different
> computer, Thunderbird, and Enigmail so it doesn't seem to be a
> Windows-specific problem.
> Although this has happened for a while, it's only happened
> intermittently and I can't reproduce it on demand (e.g. it happened to
> the first signed message I sent today, but not the second. It occurred
> when I tried signing this message.) Has anyone else observed this
> behavior? If so, is there an explanation?

Nothing nefarious going on, nor is it a bug. Take a look at the source of your
PGP/MIME signed email.

> This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
> --===============0134039850==
> Content-Type: multipart/signed; micalg=pgp-sha512;
>  protocol="application/pgp-signature";
>  boundary="hORQu9nh08cKrD0xFen8m9Kf4P5mAgQLH"
> This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
> --hORQu9nh08cKrD0xFen8m9Kf4P5mAgQLH
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
<signature attachment>
> --===============0134039850==

In order for Enigmail to generate the outside email header
(multipart/signed...), it has to know the digest that will be used later to
construct the signature part, in this case SHA-512, but all the message
processing happens in a single pass with the signature part at the end.

To do this, a small test message is signed and then examined for the digest
that was used. This is the first time you are asked for your PIN. The second
is when the message signature part is being generated.

We used to see this on the Enigmail list a lot as folks started using
gpg-agent instead of Enigmail's more limited internal passphrase caching.
With no PIN/passphrase caching in effect, I'd expect you to be asked twice on
PGP/MIME messages, but only once on inline OpenPGP.



John P. Clizbe                      Inet: John (a) Gingerbear DAWT net
SKS/Enigmail/PGP-EKP                  or: John ( @ ) Enigmail DAWT net
FSF Assoc #995 / FSFE Fellow #1797  hkp://  or
     mailto:pgp-public-keys at

Q:"Just how do the residents of Haiku, Hawai'i hold conversations?"
A:"An odd melody / island voices on the winds / surplus of vowels"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 520 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20131011/fb0dee73/attachment.sig>

More information about the Gnupg-users mailing list