GMP versus TFM on an AMD64
 From: tomstdenis@xxxxxxxxx
 Date: 17 Mar 2006 21:30:17 0800
For all those who were trying to insult me about how much GMP was
faster...
:) ^_^ grin ^_^
This is on an Opteron 275 running the latest GMP and my newly crafted
GMP plugin for LTC (basically calls mpz_powm).
GMP:
RSA1024 encrypt_key took 121194 cycles
RSA1024 decrypt_key took 1845297 cycles
RSA1280 encrypt_key took 169824 cycles
RSA1280 decrypt_key took 3278677 cycles
RSA1536 encrypt_key took 229255 cycles
RSA1536 decrypt_key took 5317780 cycles
RSA1792 encrypt_key took 301444 cycles
RSA1792 decrypt_key took 8069089 cycles
RSA2048 encrypt_key took 384635 cycles
RSA2048 decrypt_key took 11513466 cycles
Compare to TFM:
RSA1024 encrypt_key took 178994 cycles
RSA1024 decrypt_key took 1376474 cycles
RSA1280 encrypt_key took 285829 cycles
RSA1280 decrypt_key took 2228425 cycles
RSA1536 encrypt_key took 337265 cycles
RSA1536 decrypt_key took 3488658 cycles
RSA1792 encrypt_key took 398694 cycles
RSA1792 decrypt_key took 5109385 cycles
RSA2048 encrypt_key took 464253 cycles
RSA2048 decrypt_key took 6981056 cycles
For the smaller sizes GMP does better mostly because I setup more kary
table than I should. But on the decrypt side TFM clearly wins.
I don't have ECC timings yet [I have ECC working though] as GMP seems
to lack a publicly exported reduction function. I'll craft one doing
whole number montgomery reduction. Right now I'm using mpz_mod and it
makes it between 2x and 3x slower than TFM. I won't list them since I
acknowledge that isn't a fair fight.
Roughly speaking both shared objects [for GMP and TFM] are about the
same size. Though GMP does some odder things TFM doesn't. That said
for crypto purposes I don't see the draw for GMP. It's clearly not
faster than TFM, at least on my AMD64 box.
Tom
.
 FollowUps:
 Re: GMP versus TFM on an AMD64
 From: Felix Rawlings
 Re: GMP versus TFM on an AMD64
 From: D. J. Bernstein
 Re: GMP versus TFM on an AMD64
 From: Felix Rawlings
 Re: GMP versus TFM on an AMD64
 From: tomstdenis
 Re: GMP versus TFM on an AMD64
 From: tomstdenis
 Re: GMP versus TFM on an AMD64
 From: D. J. Bernstein
 Re: GMP versus TFM on an AMD64
 From: tomstdenis
 Re: GMP versus TFM on an AMD64
 From: Felix Rawlings
 Re: GMP versus TFM on an AMD64
 Prev by Date: Re: Encryption provably free of trapdoors
 Next by Date: Re: Encryption provably free of trapdoors
 Previous by thread: libtom* back up
 Next by thread: Re: GMP versus TFM on an AMD64
 Index(es):
Relevant Pages
