Mercurial > dropbear
diff rsa.h @ 641:2b1bb792cd4d dropbear-tfm
- Update tfm changes to current default tip
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 21 Nov 2011 19:52:28 +0800 |
parents | 76097ec1a29a b50f0107e505 |
children |
line wrap: on
line diff
--- a/rsa.h Mon Nov 21 19:19:57 2011 +0800 +++ b/rsa.h Mon Nov 21 19:52:28 2011 +0800 @@ -32,29 +32,28 @@ #define RSA_SIGNATURE_SIZE 4+7+4+40 -struct RSA_key { +typedef struct { fp_int* n; fp_int* e; + /* d, p, and q are private parts */ fp_int* d; fp_int* p; fp_int* q; -}; +} dropbear_rsa_key; -typedef struct RSA_key rsa_key; - -void buf_put_rsa_sign(buffer* buf, rsa_key *key, const unsigned char* data, +void buf_put_rsa_sign(buffer* buf, dropbear_rsa_key *key, const unsigned char* data, unsigned int len); #ifdef DROPBEAR_SIGNKEY_VERIFY -int buf_rsa_verify(buffer * buf, rsa_key *key, const unsigned char* data, +int buf_rsa_verify(buffer * buf, dropbear_rsa_key *key, const unsigned char* data, unsigned int len); #endif -int buf_get_rsa_pub_key(buffer* buf, rsa_key *key); -int buf_get_rsa_priv_key(buffer* buf, rsa_key *key); -void buf_put_rsa_pub_key(buffer* buf, rsa_key *key); -void buf_put_rsa_priv_key(buffer* buf, rsa_key *key); -void rsa_key_free(rsa_key *key); +int buf_get_rsa_pub_key(buffer* buf, dropbear_rsa_key *key); +int buf_get_rsa_priv_key(buffer* buf, dropbear_rsa_key *key); +void buf_put_rsa_pub_key(buffer* buf, dropbear_rsa_key *key); +void buf_put_rsa_priv_key(buffer* buf, dropbear_rsa_key *key); +void rsa_key_free(dropbear_rsa_key *key); #endif /* DROPBEAR_RSA */