comparison ecdsa.c @ 846:b298bb438625 keyondemand

refactor key generation, make it generate as required. Needs UI in server command line options
author Matt Johnston <matt@ucc.asn.au>
date Thu, 07 Nov 2013 00:18:52 +0800
parents 7dcb46da72d9
children 7540c0822374
comparison
equal deleted inserted replaced
845:774ad9b112ef 846:b298bb438625
5 #include "ecc.h" 5 #include "ecc.h"
6 #include "ecdsa.h" 6 #include "ecdsa.h"
7 #include "signkey.h" 7 #include "signkey.h"
8 8
9 #ifdef DROPBEAR_ECDSA 9 #ifdef DROPBEAR_ECDSA
10
11 int signkey_is_ecdsa(enum signkey_type type)
12 {
13 return type == DROPBEAR_SIGNKEY_ECDSA_NISTP256
14 || type == DROPBEAR_SIGNKEY_ECDSA_NISTP384
15 || type == DROPBEAR_SIGNKEY_ECDSA_NISTP521;
16 }
10 17
11 enum signkey_type ecdsa_signkey_type(ecc_key * key) { 18 enum signkey_type ecdsa_signkey_type(ecc_key * key) {
12 #ifdef DROPBEAR_ECC_256 19 #ifdef DROPBEAR_ECC_256
13 if (key->dp == ecc_curve_nistp256.dp) { 20 if (key->dp == ecc_curve_nistp256.dp) {
14 return DROPBEAR_SIGNKEY_ECDSA_NISTP256; 21 return DROPBEAR_SIGNKEY_ECDSA_NISTP256;