key sizes: maximum size and shrinking

Werner Koch wk at gnupg.org
Fri Aug 10 14:15:36 CEST 2007


On Thu,  9 Aug 2007 22:42, nico-linux-gnupg at schottelius.org said:

> I did some tests (dirty notes attached) and it looks like the whole
> packet is about 5KiB (which is pretty much):
>
>    4096-bit dsa-elgamal public key, binary: 1680 Bytes

Why at all are you using such insane large key sizes?  What is your
threat model?

If it is important to have small key sizes you better use RSA or or
agree on standard parameters for DSA and Elgamal keys (well, that is not
defined by OpenPGP).

> -  Is there a maximum size for an exported, non-armored public key?
>    => if yes, we could use that as a base and pad the rest

The only variants in the size of the keyblock are the user IDs and the
signatures.  The size of the key is a function of the key size and the
algorithm).  If you restrict yourself to a certain length of the user ID
you will have an upper bound of the keyblocks size.

> -  Are there any good (possibly gnupg / gpgme included) methods to shrink
>    the size of the exported public key?

No, you can't.  Except for what I mentioned above.

> -  Or would you recommened using gzip/bzip2/lzma additionally?
>    As far as I've tested it, gzip and bzip2 are just adding header
>    overhead, so I assume gnupg already does some compression itself.

Not for the key, it does not make sense.

Please check the protocol you are going to use.  It seems that there are
some flaws.  OpenPGP is not in general suited for online communication.



Salam-Shalom,

   Werner





More information about the Gnupg-users mailing list