ecdsa is working

--HG--
branch : ecc
This commit is contained in:
Matt Johnston
2013-05-03 23:07:48 +08:00
parent 79660f2eb1
commit 95a21c8fd7
14 changed files with 205 additions and 95 deletions

View File

@@ -53,6 +53,7 @@
#include "gendss.h"
#include "ecdsa.h"
#include "crypto_desc.h"
#include "random.h"
static void printhelp(char * progname);
@@ -120,6 +121,9 @@ int main(int argc, char ** argv) {
unsigned int bits;
int printpub = 0;
crypto_init();
seedrandom();
/* get the commandline options */
for (i = 1; i < argc; i++) {
if (argv[i] == NULL) {
@@ -223,10 +227,6 @@ int main(int argc, char ** argv) {
/* don't want the file readable by others */
umask(077);
crypto_init();
seedrandom();
/* now we can generate the key */
key = new_sign_key();
@@ -245,6 +245,7 @@ int main(int argc, char ** argv) {
#ifdef DROPBEAR_ECDSA
case DROPBEAR_SIGNKEY_ECDSA_KEYGEN:
key->ecckey = gen_ecdsa_priv_key(bits);
keytype = ecdsa_signkey_type(key->ecckey);
break;
#endif
default: