Another passphrase related question...

David Shaw dshaw at
Fri Oct 27 15:12:40 CEST 2006

On Fri, Oct 27, 2006 at 08:19:36AM -0400, Chris Walters wrote:
> Hi All,
> I actually have a couple of questions regarding passphrases - speaking
> mainly of symmetric encryption (e.g. gpg -c).
> The first question regards the maximum length of a passphrase - I would
> like to know what it is in GnuPG.  I know there is a practical limit to
> what someone could type, but I am looking more for the limit within the
> program.

GPG only has a limited amount of secure (i.e. unswappable) memory, and
that's where passphrases and keys are handled.  The effective limit
for a passphrase is a few thousand characters.

> The second one is, how does GnuPG handle "non-printable" characters,
> other than new line characters?  What I mean by this is basically
> anything you cannot directly type with a normal keyboard (upper ASCII
> and the lower ASCII characters).

If you can type it, GPG will use it.  The only two characters that
aren't usable are null and \n.  Be careful, though.  It's really easy
to get into a situation where you can type something on one
machine/keyboard/os combo that you can't type on another.  If you
ever need to replace a machine, you could lock yourself out.


More information about the Gnupg-users mailing list