Mercurial > dropbear
comparison ecdsa.c @ 794:d386defb5376 ecc
more ecdsa signkey work, not correct
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 28 Apr 2013 23:17:43 +0800 |
parents | 70625eed40c9 |
children | 7f604f9b3756 |
comparison
equal
deleted
inserted
replaced
793:70625eed40c9 | 794:d386defb5376 |
---|---|
1 #include "options.h" | |
1 #include "includes.h" | 2 #include "includes.h" |
2 #include "dbutil.h" | 3 #include "dbutil.h" |
3 #include "crypto_desc.h" | 4 #include "crypto_desc.h" |
4 #include "ecc.h" | 5 #include "ecc.h" |
5 #include "ecdsa.h" | 6 #include "ecdsa.h" |
6 | 7 |
7 #ifdef DROPBEAR_ECDSA | 8 #ifdef DROPBEAR_ECDSA |
8 | 9 |
9 ecc_key *gen_ecdsa_priv_key(unsigned int bit_size) { | 10 ecc_key *gen_ecdsa_priv_key(unsigned int bit_size) { |
10 const ltc_ecc_set_type *dp = NULL; // curve domain parameters | 11 const ltc_ecc_set_type *dp = NULL; // curve domain parameters |
11 // TODO: use raw bytes for the dp rather than the hex strings in libtomcrypt's ecc.c | |
12 switch (bit_size) { | 12 switch (bit_size) { |
13 #ifdef DROPBEAR_ECC_256 | 13 #ifdef DROPBEAR_ECC_256 |
14 case 256: | 14 case 256: |
15 dp = ecc_curve_nistp256.dp; | 15 dp = ecc_curve_nistp256.dp; |
16 break; | 16 break; |