comparison ecdsa.h @ 844:68facbc41273

merge again
author Matt Johnston <matt@ucc.asn.au>
date Fri, 01 Nov 2013 00:19:25 +0800
parents 4365e12c68e6
children 774ad9b112ef
comparison
equal deleted inserted replaced
834:e378da7eae5d 844:68facbc41273
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 #if defined(DROPBEAR_ECC_256)
11 #define ECDSA_DEFAULT_SIZE 256
12 #elif defined(DROPBEAR_ECC_384)
13 #define ECDSA_DEFAULT_SIZE 384
14 #elif defined(DROPBEAR_ECC_521)
15 #define ECDSA_DEFAULT_SIZE 521
16 #else
17 #define ECDSA_DEFAULT_SIZE 0
18 #endif
19
20 ecc_key *gen_ecdsa_priv_key(unsigned int bit_size);
21 ecc_key *buf_get_ecdsa_pub_key(buffer* buf);
22 ecc_key *buf_get_ecdsa_priv_key(buffer *buf);
23 void buf_put_ecdsa_pub_key(buffer *buf, ecc_key *key);
24 void buf_put_ecdsa_priv_key(buffer *buf, ecc_key *key);
25 enum signkey_type ecdsa_signkey_type(ecc_key * key);
26
27 void buf_put_ecdsa_sign(buffer *buf, ecc_key *key, buffer *data_buf);
28 int buf_ecdsa_verify(buffer *buf, ecc_key *key, buffer *data_buf);
29
30 #endif
31
32 #endif // _ECDSA_H_