1 #ifndef DROPBEAR_ECDSA_H_
2 #define DROPBEAR_ECDSA_H_
10 /* Prefer the larger size - it's fast anyway */
11 #if defined(DROPBEAR_ECC_521)
12 #define ECDSA_DEFAULT_SIZE 521
13 #elif defined(DROPBEAR_ECC_384)
14 #define ECDSA_DEFAULT_SIZE 384
15 #elif defined(DROPBEAR_ECC_256)
16 #define ECDSA_DEFAULT_SIZE 256
18 #define ECDSA_DEFAULT_SIZE 0
21 ecc_key
*gen_ecdsa_priv_key(unsigned int bit_size
);
22 ecc_key
*buf_get_ecdsa_pub_key(buffer
* buf
);
23 ecc_key
*buf_get_ecdsa_priv_key(buffer
*buf
);
24 void buf_put_ecdsa_pub_key(buffer
*buf
, ecc_key
*key
);
25 void buf_put_ecdsa_priv_key(buffer
*buf
, ecc_key
*key
);
26 enum signkey_type
ecdsa_signkey_type(ecc_key
* key
);
28 void buf_put_ecdsa_sign(buffer
*buf
, ecc_key
*key
, buffer
*data_buf
);
29 int buf_ecdsa_verify(buffer
*buf
, ecc_key
*key
, buffer
*data_buf
);
30 /* Returns 1 on success */
31 int signkey_is_ecdsa(enum signkey_type type
);
35 #endif /* DROPBEAR_ECDSA_H_ */