Mercurial > dropbear
comparison ecdsa.h @ 910:89555751c489 asm
merge up to 2013.63, improve ASM makefile rules a bit
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 27 Feb 2014 21:35:58 +0800 |
parents | c19acba28590 |
children | deed0571cacc |
comparison
equal
deleted
inserted
replaced
909:e4b75744acab | 910:89555751c489 |
---|---|
1 #ifndef _ECDSA_H_ | |
2 #define _ECDSA_H_ | |
3 | |
4 #include "includes.h" | |
5 #include "buffer.h" | |
6 #include "signkey.h" | |
7 | |
8 #ifdef DROPBEAR_ECDSA | |
9 | |
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 | |
17 #else | |
18 #define ECDSA_DEFAULT_SIZE 0 | |
19 #endif | |
20 | |
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); | |
27 | |
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); | |
32 | |
33 #endif | |
34 | |
35 #endif /* _ECDSA_H_ */ |