Mailing List Archive

Incompatible passphrase encoding in gpg/gpg-agent?
I have recently received a bugreport about pinentry-qt not handling the "§"
character correctly. After some testing it turns out that gpg, if used
without gpg-agent seems to encode passphrases differently than the agents do.

Testcase: Run gpg without agent active, use passwd to change a key passphrase
to "test§test". Save. Then run gpg-agent (any pinentry variant will do) and
try to change the passphrase again with gpg. Gpg won't accept the passphrase
string delivered by gpg-agent. Unset the GPG_AGENT_INFO env var and change
passphrase in gpg without agent - works.

This is with gpg from GnuPG 1.4.0, gpg-agent from GnuPG 1.9.14 and pinentry
0.7.1.

--
,_, | Michael Nottebrock | lofi@freebsd.org
(/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org
\u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org
Re: Incompatible passphrase encoding in gpg/gpg-agent? [ In reply to ]
On Wed, Mar 30, 2005 at 05:35:27PM +0200, Michael Nottebrock wrote:
> I have recently received a bugreport about pinentry-qt not handling the "§"
> character correctly. After some testing it turns out that gpg, if used
> without gpg-agent seems to encode passphrases differently than the agents do.

That probably is a locale and encoding issue.
Of course the pinentries should use the current locale and if they
run on X11 they are influenced by those settings, too.

In order to debug this, you could try with several locales
and also try to see if xev and on the terminal,
the same key symbols will be created.

> Testcase: Run gpg without agent active, use passwd to change a key passphrase
> to "test§test". Save. Then run gpg-agent (any pinentry variant will do) and
> try to change the passphrase again with gpg. Gpg won't accept the passphrase
> string delivered by gpg-agent. Unset the GPG_AGENT_INFO env var and change
> passphrase in gpg without agent - works.
>
> This is with gpg from GnuPG 1.4.0, gpg-agent from GnuPG 1.9.14 and pinentry
> 0.7.1.
Re: Incompatible passphrase encoding in gpg/gpg-agent? [ In reply to ]
Bernhard Reiter sagte:
> On Wed, Mar 30, 2005 at 05:35:27PM +0200, Michael Nottebrock wrote:
>> I have recently received a bugreport about pinentry-qt not handling the
>> "§"
>> character correctly. After some testing it turns out that gpg, if used
>> without gpg-agent seems to encode passphrases differently than the
>> agents do.
>
> That probably is a locale and encoding issue.
> Of course the pinentries should use the current locale and if they
> run on X11 they are influenced by those settings, too.

The mailing list has been rejecting mails last week and then I forgot about
the issue, sorry for the delay.

I've tested this with gpg and the pinentries running in the same
x11-session with the same locale and encoding (de_DE.ISO8859-15, I believe
that charset is called @euro in glibc-land). It should be easily reproducable.

--
,_, | Michael Nottebrock | lofi@freebsd.org
(/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org
\u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org
Re: Incompatible passphrase encoding in gpg/gpg-agent? [ In reply to ]
On Sun, Apr 10, 2005 at 01:51:05PM +0200, Michael Nottebrock wrote:
> Bernhard Reiter sagte:
> > On Wed, Mar 30, 2005 at 05:35:27PM +0200, Michael Nottebrock wrote:
> >> I have recently received a bugreport about pinentry-qt not handling the
> >> "§"
> >> character correctly. After some testing it turns out that gpg, if used
> >> without gpg-agent seems to encode passphrases differently than the
> >> agents do.
> >
> > That probably is a locale and encoding issue.
> > Of course the pinentries should use the current locale and if they
> > run on X11 they are influenced by those settings, too.

> I've tested this with gpg and the pinentries running in the same
> x11-session with the same locale and encoding (de_DE.ISO8859-15, I believe
> that charset is called @euro in glibc-land). It should be easily reproducable.

Werner: Where would you like the bug report for this issue?