Add DSA key generation.

Also refactor RSA key generation a bit.

Change-Id: I838ff58210f0a3be41f04c7e945e998751fca9f5
12 files changed