Musings about Coding, Business and other Geek Stuff Live and Direct from somewhere on the planet
November 12, 2003
RSA vs DSA Signatures - The Winner is...

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:

AlgorithmKey Generation * 1(ms.)Sign * 100 (ms.)Verify*100(ms.)
RSA 512544.61915160
RSA 10241120.464188263
DSA 5126.62634988
DSA 102417.8717753397

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

Posted by pelleb at November 12, 2003 01:48 PM
This entry was posted in the following Categories: Crypto & Security
Comments

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

Posted by: Greg Magnusson on January 21, 2004 06:53 PM

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...

Posted by: bugme not on August 24, 2004 01:41 AM
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?