Hi Folks,
This issue likely only impacts a small percentage of the user base, but I would
like to understand what changed to cause this error to occur. I also noticed a
similar problem in Issue 1954 - but that appears to be from a Gnome user.
I'm a Gentoo Hardened guy, but I run plenty of other OSes on native HDDs
or under KVM, which is how I discovered this issue:
Enigmail/pinentry-qt/qt4/gtk (pinentry-X, below) fails on Fedora 22 with
KDE when using lengthy passphrases.
The exact text of the pinentry-X failure error is: Passphrase too long (try 2 of 3)
If you re-enter the correct passphrase again (try 2), the user is never
given try 3, and the encryption/sending of the message fails.
I've been using Enigmail for years and manage many email accounts. I
prefer to use very lengthy passphrases to protect each of my GnuPG
Keys. I define a lengthy passphrase as one which exceeds 100
characters, or ~600+ Bits.
Since I need to manage many long and complex passphrases, I use KeePass2
and its Auto-Type feature.
So here is what I know:
- Lengthy passphrases work flawlessly on Gentoo Hardened with KDE and
Enigmail 1.8.2 pulled from TBird's Add-Ons, since Enigmail is not
available in the Hardened repos.
As you can see on Hardened, I've got pinentry-qt4 set:
eselect pinentry list
Available pinentry binary implementations:
[1] pinentry-gtk-2 [2] pinentry-qt4 * [3] pinentry-curses
- Lengthy passphrases work flawlessly on Debian 8 (Jessie) with KDE
and Enigmail 1.7.2 installed from the Deb repos. IIRC, Deb 8 calls
pinentry-qt by default.
- Standard length passphrases (and I know that passphrases less than 200 Bits)
work flawlessly on Fedora 22 with KDE and Enigmail 1.8.2 installed from the Fed
22 repos. On Fed 22, GnuPG 2.1.5 and 1.4.19 are installed by default.
The pinentry-qt4 version is 0.9.2.
- Lengthy passphrases fail on Fed 22 with KDE and Enigmail 1.8.2
installed from the Fed 22 repos. This failure occurs under pinentry-qt,
pinentry-qt4, or pinentry-gtk.
- I know gnupg Key passphrases have no practical length limitation.
IIRC, I've read that a gunpg passphrase can exceed several exabytes
in length!
- On Fed 22, I've got a very simple config setup:
My gpg.conf has exactly 2 uncommented lines: one for the default
keyserver, and the other for my default key.
My gpg-agent.conf is very similar to my Deb and Gentoo files:
default-cache-ttl 600
max-cache-ttl 6000
When left to default on Fed 22, pinentry-qt is called, and fails.
However, if you add:
pinentry-program /usr/bin/pinentry-qt4
to gpg-agent.conf, the same failure occurs (and also with gtk).
Using 'no-grab' on Fed 22 also generates it own set of very bad security
copypasta problems, even though no-grab works well on Deb and Gentoo. However,
that is a separate issue. Just using a right-click Keepass Auto-type,
with no-grab disabled is sufficient on Fed 22.
- I have already made the Enigmail dev aware of this aware of this issue,
and his input was:
'Thanks for the heads up. However what you report is clearly an issue
with GnuPG / gpg-agent and pinentry. Enigmail has no role in this game
other than telling GnuPG to perform a particular action (and possibly
with a particular key). Enigmail does not get to see the passphrase at
all; querying of the passphrase is done by gpg-agent, and that would be
the culprit for the bug.'
In summary, I wanted to bring this lengthy passphrase failure issue to
your attention as it will impact some percentage of your user base
(although probably a small percentage). However, those impacted are
also more likely to be among gnupg's power users.
I don't know what changed to cause this problem, but it seems unlikely
to have anything to do with Enigmail or Pinentry since I know the current
versions of those programs handle lengthy passphrases perfectly on other OSes.
If you need more information from me, or have things you want me to test,
just let me know.
Thank You for all the work you do to keep us safe!