Making it simple

Brian M. Carlson
Sat May 11 07:59:01 2002

Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, May 10, 2002 at 06:07:49PM -0400, David Shaw wrote:
> On Fri, May 10, 2002 at 02:35:58PM -0700, Steve Butler wrote:
> > Finally looked the preferences on all the public keys from the folks wi=
> > whom we exchange data.  Most of them did not have any preference for HA=
> > and COMPRESS methods.  What will gpg use?
> No preference for hash means "SHA1".  No preference for compress means
> "ZIP, Uncompressed".
> Hash doesn't matter much, since nobody uses the hash preference yet.

Hash is supposed to be used if you're say, sending a signed+encrypted email
to somebody, you can choose a hash the recipient can use. The items listed =
preferences are supposed to be treated as if they were the only ones the
target implementation supports.
> > And, those two folks having RSA keys have no preferences whatsoever!  W=
> > is the default for this case?
> It depends if they have v3 (PGP2-style) or v4 self-sigs.  If the
> self-sig is v4, they have the same default preferences as any v4 key:
> 3DES for cipher, SHA1 for hash, and ZIP+Uncompressed for compression.
> If they have a v3 self-sig, they have no preferences at all, but
> generally this is interpreted as IDEA for cipher, MD5 for hash and ZIP
> for compression.

That is, if the v3 sig is on a v3 key. If the v3 sig is on a v4 key, a
compliant implementation MUST use 3DES, SHA1, and ZIP+Uncompressed if there
are no preferences.
> At least this is GnuPG's behavior.  PGP seems to ignore the compress
> preference completely and uses ZIP for everything.

Which is technically permitted, because the specification says that an
implementation may use any method to choose an algorithm in the intersectio=
That is, it's ok as long as the preference is not just Uncompressed.

> > I've set our preferences to be:
> >      Cipher: CAST5, AES, AES192, AES256, 3DES
> >      Hash: SHA1, RIPEMD160, MD5
> >      Compression: ZLIB, ZIP
> >=20
> > PGP 7.0.1 on a Unix box had problems when our preference list was empty=
.  As
> > an interim measure I had set our preferences at CAST5, 3DES, SHA1,
> > RIPEMD160, ZIP, ZLIB until earlier today when it was expanded since one
> > client was sending to us using AES (even though it wasn't in our list).
> This client is violating the standard.  Ah well.  It doesn't actually
> hurt you since you can decrypt AES (though GnuPG will warn you that
> someone is using a cipher that isn't in your preferences).
> > Is there a utility that I can use to quickly cycle down through all the
> > encrypted files we have received and report back the Cipher, Hash, and
> > Compression actually used?
> You might be able to script something with gpg --list-packets, but the
> problem is that the data you need is usually inside the encrypted
> block.  You have to decrypt the message to see them.

pgpdump is nice, too.

Brian M. Carlson
OpenPGP: 0x351336B2DCA1913A

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Ubi libertas, ibi patria.