Home » Questions » Computers [ Ask a new question ]

What is better for GPG keys - RSA or DSA?

What is better for GPG keys - RSA or DSA?

ssh-keygen defaults to creating RSA keys, but gpg --gen-key prefers DSA/ElGamal.

Asked by: Guest | Views: 273
Total answers/comments: 3
Guest [Entry]

The GPG maintainers are thinking of changing the default to RSA (source: Dealing with weakness in SHA-1 [LWN.net]). So, it seems they think RSA is currently the better option (and they should know more about it than you or me).
Guest [Entry]

RSA. There were some weaknesses discovered in SHA-1, which is the hash used by DSA. Debian are migrating all their keys from DSA to RSA.
Guest [Entry]

"The fact is it probably doesn't matter much to you :) As part of preparing to generate a key-pair and as part of maintaining existing key-pairs - regardless of what asymmetric crypto you choose you should be :
1) checking current recommended key lengths
2) chose a base/modulo to optimize for signing, or verification - depending on what will be doen more often (keys to be used in issuing TLS/SSL server certificates should be optimized for verification since every web browser will check the signature... keys used to be used in signing software should be similarly optimized)
3) make sure you age your keys - been using the same key for ssh-auth for a few years, might be time to regen even if you chose a key size that is still reasonable for the application today.

Both RSA and DSA have been substantially evaluated; if you are using a realiable code base (RSAREF, RSA commercial, Mozilla/Netscape, Microsoft, OpenSSL, ...) then you probably don't care which cryptosystem you use so long as you use it correctly and utilize current best practices"