Its been accepted knowledge for several years now that in relation to performance only, DSA is faster for Key Generation and Signing and RSA is faster for Verification.
I was googling for numbers to back this up. I remember seing this info ages ago, but to no avail and I did the geek thing and wrote a quick little benchmark tool to calculate the times.
So here are the scores:
| Algorithm | Key Generation * 1(ms.) | Sign * 100 (ms.) | Verify*100(ms.) |
|---|---|---|---|
| RSA 512 | 544.61 | 915 | 160 |
| RSA 1024 | 1120.46 | 4188 | 263 |
| DSA 512 | 6.62 | 634 | 988 |
| DSA 1024 | 17.87 | 1775 | 3397 |
So basically key generation is incredibly faster for DSA, which makes sense if you understand the algorithms. Signing is also faster for DSA, but not by as large a factor. RSA’s great strength is verifying which is much faster than DSA.
Essentially this confirms what I had heard before. NeuClear supports both key types, but we recommend using RSA. For applications where signing performance is the most important such as in SSL web server applications, DSA would probably be the preferable. However NeuClear has to perform many verifications (in fact the whole framework is built on verified objects), thus RSA is better.
None of this discussion covers the relative security of the two algorithms. It is also naive two compare key sizes between algorithms. It is generally agreed in the crypto community that RSA is superior.
It would be interesting to do this excercise with Elliptic Curve Cryptography which can use DSA style keys.
BTW, this is all frightfully informal and for these purposes hardware spec etc arent really important, as all I want is a comparison on the same machine of algorithms.
However for the reference the benchmark was run from within IntelliJ IDEA on a JDK1.4.1 on Gentoo Linux running an AMD Athlon XP 1800 (I think).
The source code can be found here
This entry was posted in the following Categories: Crypto & Security
Two good links I have found to explain Cryptographic terminology and an RSA vs DSA faq are found in the following two links.
Crytpo terminology 101
http://www.onlamp.com/pub/a/bsd/2002/10/31/FreeBSD_Basics.html
RSA FAQ
http://www.rsasecurity.com/rsalabs/faq/3-4-1.html
I'd bet on one of the ECDSA, then RSA, then DSA. In that order best to worst for collision resistance.
"Generic Groups, Collision Resistance, and ECDSA
Daniel R. L. Brown, February 2002" - http://grouper.ieee.org/groups/1363/Research/contributions/genericGroupECDSA.ps
I'm a lil worried about SHA-1, perhaps SHA-512 would be safe for now...