Hi Neal,
First, thanks for your follow-up. I believe you have understood the problem I
described correctly.
All this information was generated while using Fedora 22.
Per your requests:
I needed to change echo | gpg -s >/dev/null to echo | gpg -su KeyID >/dev/null
to force the use of a Key with a long passphrase.
The result of that test is a success, and in this case I was using a passphrase
which is greater than 700 Bits. Direct copypasta (not Auto-Type) from Keepass
into the terminal, works.
Furthermore, I know gpg is working correctly with long passphrases because, as a
generic example, I can sign and encrypt a file with KeyID#23 for user KeyID#37
and then, decrypt that file with KeyID#37. Therefore, a command like this also
succeeds:
gpg -seu KeyID#23 -r KeyID#37 foo.txt
Both KeyIDs are protected by long passphrases.
Now, moving onto gpg2. As above, I needed to modify echo | gpg2 -s >/dev/null to
echo | gpg2 -su KeyID >/dev/null to force the use of a Key with a long passphrase.
The command, echo | gpg2 -su KeyID >/dev/null, fails on Fedora 22 using pinentry-qt4
in the exact way I originally described. When the command is entered, the pinentry
pop-up, passphrase entry window is generated on your display.
In this case, you must use Keepass's right-click, Auto-Type option/command
(copypasta fails) for the pertinent Key. When Auto-Type completes typing
the 700+ Bit passphrase, tabs (once), and then 'hits' Enter, the error generated in
the pop-up window is:
Passphrase too long (try 2 of 3)
If you try to use Auto-Type a second time, the pop-up disappears, but nothing
happens (a 'visually silent' fail, if you will).
However, following each of these Auto-Type entry failures, the command line
now shows something pinentry does not:
gpg: signing failed: No passphrase given
gpg: signing failed: No passphrase given
This is quite an interesting error message, given that I watched the passphrase
being Auto-Typed, and entered, twice. Again, I've been using Auto-Type for years.
Neal, you also asked for these bits. On my Fedora 22 box, I have:
gpg --version: gpg (GnuPG) 1.4.19
gpg2 --version: gpg (GnuPG) 2.1.5 + libgcrypt 1.6.3
pinentry --version: pinentry-qt4 (pinentry) 0.9.2
Hopefully, this helps you narrow down where, and how, this failure is occurring.
As always, let me know if you need something else.
P.S. I'll fire an email to you with my Public Key in case you have any minor,
or quick, requests. However, of course, I'll need to change OSes first, because
I cannot encrypt any emails with Keys protected by long passphrases on Fed 22! ;-)