Re: Symmetric encryption: why not use private keys?
Date: 5 Sep 2004 09:11:42 -0700
Suzanne Skinner <firstname.lastname@example.org> wrote in message news:<email@example.com>...
> I'm referring to GPG's behavior when the -c option (as opposed to -e) is used
> to select traditional symmetric encryption. In this case, the only option for
> key generation seems to be to hash a user-entered passphrase. I'd prefer it to
> do something similar to what it does for -e: generate a symmetric key with
> good entropy, store it in the secret keyring and protect it with a passphrase.
> This way dictionary attacks wouldn't be possible unless the attacker got
> access to the keyring.
if you want gnupg to generate a random passphrase for you to use for
then there is an effective, simple [although inelegant ;-) ]
 use the option of 'show-session-key' in gnupg
 encrypt the message first to any keypair that you have
 decrypt the message in gnupg
 use the randomly generated session key that gnupg displays for
you, as your passphrase for the symmetric encryption
(1t will be 32 characters long if you use idea, or cast,
48 characters if you use 3-des
and 64 characters if you use twofish or aes-256)
it doesn't matter which one you use, since the session key will be
truncated anyway, to whatever length of passphrase you consider
i imagine that 12 to 16 characters is more than sufficient,
but invite the crypto experts to give their opinions on the
and if the gnupg randomly generated session key, is 'random enough',
(and also, btw, if this is a reasonable way to use computers to
generate random strings [with the understanding that it is limited to
the hexadecimal characters]).
(it is, in any case, 'as random' as the gnupg public key encryption
that you prefer)