comparison dss.h @ 839:33207ed1174b

Merge in ECC
author Matt Johnston <matt@ucc.asn.au>
date Mon, 21 Oct 2013 22:57:21 +0800
parents d386defb5376
children deed0571cacc
comparison
equal deleted inserted replaced
834:e378da7eae5d 839:33207ed1174b
28 #include "includes.h" 28 #include "includes.h"
29 #include "buffer.h" 29 #include "buffer.h"
30 30
31 #ifdef DROPBEAR_DSS 31 #ifdef DROPBEAR_DSS
32 32
33 #define DSS_SIGNATURE_SIZE 4+SSH_SIGNKEY_DSS_LEN+4+2*SHA1_HASH_SIZE
34
35 typedef struct { 33 typedef struct {
36 34
37 mp_int* p; 35 mp_int* p;
38 mp_int* q; 36 mp_int* q;
39 mp_int* g; 37 mp_int* g;
41 /* x is the private part */ 39 /* x is the private part */
42 mp_int* x; 40 mp_int* x;
43 41
44 } dropbear_dss_key; 42 } dropbear_dss_key;
45 43
46 void buf_put_dss_sign(buffer* buf, dropbear_dss_key *key, const unsigned char* data, 44 void buf_put_dss_sign(buffer* buf, dropbear_dss_key *key, buffer *data_buf);
47 unsigned int len);
48 #ifdef DROPBEAR_SIGNKEY_VERIFY 45 #ifdef DROPBEAR_SIGNKEY_VERIFY
49 int buf_dss_verify(buffer* buf, dropbear_dss_key *key, const unsigned char* data, 46 int buf_dss_verify(buffer* buf, dropbear_dss_key *key, buffer *data_buf);
50 unsigned int len);
51 #endif 47 #endif
52 int buf_get_dss_pub_key(buffer* buf, dropbear_dss_key *key); 48 int buf_get_dss_pub_key(buffer* buf, dropbear_dss_key *key);
53 int buf_get_dss_priv_key(buffer* buf, dropbear_dss_key *key); 49 int buf_get_dss_priv_key(buffer* buf, dropbear_dss_key *key);
54 void buf_put_dss_pub_key(buffer* buf, dropbear_dss_key *key); 50 void buf_put_dss_pub_key(buffer* buf, dropbear_dss_key *key);
55 void buf_put_dss_priv_key(buffer* buf, dropbear_dss_key *key); 51 void buf_put_dss_priv_key(buffer* buf, dropbear_dss_key *key);