ElGamal: key length vs performance
Robert J. Hansen
rjh at sixdemonbag.org
Sun Apr 2 00:08:29 CEST 2006
feitao wrote:
> As I understand, by default, GunPG uses ElGamal to encrypt/decrypt files,
> and the recommended key length is 1024 bit. Is there any information on how
> encryption/decryption time changes with the key length? Thanks a lot,
This one can best be answered with a giant "it depends".
GnuPG is a hybrid cryptosystem. It uses both symmetric and asymmetric
cryptography to encrypt your file. The asymmetric component is going to
be dog slow, but the good news is that only a few bytes of data are
encrypted with it. The rest of your file is decrypted using symmetric
crypto, which is really quite fast.
For small files, the asymmetric component will take up most of the time
and it makes sense to ask how encryption/decryption times vary with key
lengths. For large files, the symmetric component will dominate, and it
won't make sense to ask how encryption/decryption times vary with key
lengths.
The best general advice I can give you is "this isn't something you need
to worry about". Even with a 4kbit key on an old Pentium-II, the
asymmetric operations are fairly brisk. It's quite usable.
More information about the Gnupg-users
mailing list