comparison dss.h @ 586:b50f0107e505

Rename rsa_key to dropbear_rsa_key (and same for dss too) so we don't conflict with libtomcrypt.
author Matt Johnston <matt@ucc.asn.au>
date Wed, 21 Jul 2010 12:55:25 +0000
parents 0442c18da5c9
children 2b1bb792cd4d f336d232fc63
comparison
equal deleted inserted replaced
585:d194db6f9453 586:b50f0107e505
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 33 #define DSS_SIGNATURE_SIZE 4+SSH_SIGNKEY_DSS_LEN+4+2*SHA1_HASH_SIZE
34 34
35 struct DSS_key { 35 typedef struct {
36 36
37 mp_int* p; 37 mp_int* p;
38 mp_int* q; 38 mp_int* q;
39 mp_int* g; 39 mp_int* g;
40 mp_int* y; 40 mp_int* y;
41 /* x is the private part */ 41 /* x is the private part */
42 mp_int* x; 42 mp_int* x;
43 43
44 }; 44 } dropbear_dss_key;
45 45
46 typedef struct DSS_key dss_key; 46 void buf_put_dss_sign(buffer* buf, dropbear_dss_key *key, const unsigned char* data,
47
48 void buf_put_dss_sign(buffer* buf, dss_key *key, const unsigned char* data,
49 unsigned int len); 47 unsigned int len);
50 #ifdef DROPBEAR_SIGNKEY_VERIFY 48 #ifdef DROPBEAR_SIGNKEY_VERIFY
51 int buf_dss_verify(buffer* buf, dss_key *key, const unsigned char* data, 49 int buf_dss_verify(buffer* buf, dropbear_dss_key *key, const unsigned char* data,
52 unsigned int len); 50 unsigned int len);
53 #endif 51 #endif
54 int buf_get_dss_pub_key(buffer* buf, dss_key *key); 52 int buf_get_dss_pub_key(buffer* buf, dropbear_dss_key *key);
55 int buf_get_dss_priv_key(buffer* buf, dss_key *key); 53 int buf_get_dss_priv_key(buffer* buf, dropbear_dss_key *key);
56 void buf_put_dss_pub_key(buffer* buf, dss_key *key); 54 void buf_put_dss_pub_key(buffer* buf, dropbear_dss_key *key);
57 void buf_put_dss_priv_key(buffer* buf, dss_key *key); 55 void buf_put_dss_priv_key(buffer* buf, dropbear_dss_key *key);
58 void dss_key_free(dss_key *key); 56 void dss_key_free(dropbear_dss_key *key);
59 57
60 #endif /* DROPBEAR_DSS */ 58 #endif /* DROPBEAR_DSS */
61 59
62 #endif /* _DSS_H_ */ 60 #endif /* _DSS_H_ */