Page MenuHome GnuPG

windows passphrase not recognised on unix if it is very long
Closed, ResolvedPublic

Description

Release: 1.4.0

Environment

windows 2k and gnupg 1.4.0a binary downloaded from gnupg.org
gentoo linux, gnugpg 1.4

Description

Files encrypted on windows can't be decrypted on linux if
passphrase is very long, say >= 300 chars.

gpg will say: decryption failed: bad key

How To Repeat

Generate a very long passphrase (say > 300 chars) on your
windows machine and encrypt a file thus:
gpg -o file.enc -c file.input
Paste passphrase with the mouse

Transfer file.enc and passphrase to linux machine and run:
gpg -o file.out -d file.enc
paste the same passphrase with the mouse.

Fix

short passwords?
Not a viable solution if one wants stronger encryption.

Event Timeline

Sure that you did not paste a LF or other ctrl character on one box and not on the other? LF stops ternminates the input. I just checked the code and there is no limit on the input length.

From: "Slavtcho Nikolov" <snikolov@cisco.com>
To: <bugs@trithemius.gnupg.org>, <gnupg-hackers@gnupg.org>,

<gnats-admin@trithemius.gnupg.org>

Cc:
Subject: RE: gnupg/418
Date: Mon, 14 Feb 2005 09:48:48 -0500

Bug 418 got thorough testing before I submitted it.
The passphrase contained nothing unusual, i.e.
plain ascii chars of the [a-z][A-Z][0-9] variety.
Short passwords which I manually typed in did not
result in a bad key error message, and decryption
was therefore successful with short passwords.
Finally, I'd like to point out that the long passphrase
did not contain a '\n' or "\r\n" terminatig char, instead
I hit the ENTER key after pasting it with the mouse.
Mouse pastes to other applications showed that the passhrase
was correctly copied to the clipboard.

No further reports. Probably a cut+patse problems. Note
that the encoding sometimes gets changed if you do it
between different applications.

I'll run some tests tomorrow. Thanks.

werner claimed this task.
werner added a subscriber: gnupg-hackers.