summaryrefslogtreecommitdiff
path: root/dsa-keygen.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2013-11-24 21:21:01 +0100
committerNiels Möller <nisse@lysator.liu.se>2013-11-24 21:21:01 +0100
commitade5dd2baceb451592f785cfb9108dab8683bdd6 (patch)
tree165fcbbebb87acaabcda65ecf12e4f78cf9f8f16 /dsa-keygen.c
parent282130823631361da2053086f68e5fd88cbd485a (diff)
downloadnettle-ade5dd2baceb451592f785cfb9108dab8683bdd6.tar.gz
dsa: Allow arbitrary digest sizes. Support 224-bit q.
Diffstat (limited to 'dsa-keygen.c')
-rw-r--r--dsa-keygen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dsa-keygen.c b/dsa-keygen.c
index 1b84e497..0a9cf406 100644
--- a/dsa-keygen.c
+++ b/dsa-keygen.c
@@ -36,7 +36,7 @@
#include "nettle-internal.h"
-/* Valid sizes, according to FIPS 186-3 are (1024, 160), (2048. 224),
+/* Valid sizes, according to FIPS 186-3 are (1024, 160), (2048, 224),
(2048, 256), (3072, 256). Currenty, we use only q_bits of 160 or
256. */
int
@@ -56,6 +56,7 @@ dsa_generate_keypair(struct dsa_public_key *pub,
if (p_bits < DSA_SHA1_MIN_P_BITS)
return 0;
break;
+ case 224:
case 256:
if (p_bits < DSA_SHA256_MIN_P_BITS)
return 0;