Add an ecdsa_genkey() function
diff --git a/library/ecdsa.c b/library/ecdsa.c
index cf5355c..6746233 100644
--- a/library/ecdsa.c
+++ b/library/ecdsa.c
@@ -274,6 +274,17 @@
}
/*
+ * Generate key pair
+ */
+int ecdsa_genkey( ecdsa_context *ctx, ecp_group_id gid,
+ int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
+{
+ return( ecp_use_known_dp( &ctx->grp, gid ) ||
+ ecp_gen_keypair( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) );
+}
+
+
+/*
* Initialize context
*/
void ecdsa_init( ecdsa_context *ctx )