Mercurial > dropbear
view ecdsa.c @ 1183:d10468395a49
release.sh reminds how to sign
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 25 Nov 2015 23:30:56 +0800 |
parents | aaf576b27a10 |
children | 2bb4c662d1c2 |
line wrap: on
line source
#include "options.h" #include "includes.h" #include "dbutil.h" #include "crypto_desc.h" #include "ecc.h" #include "ecdsa.h" #include "signkey.h" #ifdef DROPBEAR_ECDSA int signkey_is_ecdsa(enum signkey_type type) { return type == DROPBEAR_SIGNKEY_ECDSA_NISTP256 || type == DROPBEAR_SIGNKEY_ECDSA_NISTP384 || type == DROPBEAR_SIGNKEY_ECDSA_NISTP521; } enum signkey_type ecdsa_signkey_type(ecc_key * key) { #ifdef DROPBEAR_ECC_256 if (key->dp == ecc_curve_nistp256.dp) { return DROPBEAR_SIGNKEY_ECDSA_NISTP256; } #endif #ifdef DROPBEAR_ECC_384 if (key->dp == ecc_curve_nistp384.dp) { return DROPBEAR_SIGNKEY_ECDSA_NISTP384; } #endif #ifdef DROPBEAR_ECC_521 if (key->dp == ecc_curve_nistp521.dp) {