Mercurial > dropbear
comparison rsa.h @ 1342:8747c2b19152
merge 2017.75
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 18 May 2017 22:59:38 +0800 |
parents | 750ec4ec4cbe |
children | 06d52bcb8094 |
comparison
equal
deleted
inserted
replaced
1341:ab35a9ccc2eb | 1342:8747c2b19152 |
---|---|
26 #define DROPBEAR_RSA_H_ | 26 #define DROPBEAR_RSA_H_ |
27 | 27 |
28 #include "includes.h" | 28 #include "includes.h" |
29 #include "buffer.h" | 29 #include "buffer.h" |
30 | 30 |
31 #ifdef DROPBEAR_RSA | 31 #if DROPBEAR_RSA |
32 | 32 |
33 #define RSA_SIGNATURE_SIZE (4+7+4+40) | 33 #define RSA_SIGNATURE_SIZE (4+7+4+40) |
34 | 34 |
35 typedef struct { | 35 typedef struct { |
36 | 36 |
42 mp_int* q; | 42 mp_int* q; |
43 | 43 |
44 } dropbear_rsa_key; | 44 } dropbear_rsa_key; |
45 | 45 |
46 void buf_put_rsa_sign(buffer* buf, dropbear_rsa_key *key, buffer *data_buf); | 46 void buf_put_rsa_sign(buffer* buf, dropbear_rsa_key *key, buffer *data_buf); |
47 #ifdef DROPBEAR_SIGNKEY_VERIFY | 47 #if DROPBEAR_SIGNKEY_VERIFY |
48 int buf_rsa_verify(buffer * buf, dropbear_rsa_key *key, buffer *data_buf); | 48 int buf_rsa_verify(buffer * buf, dropbear_rsa_key *key, buffer *data_buf); |
49 #endif | 49 #endif |
50 int buf_get_rsa_pub_key(buffer* buf, dropbear_rsa_key *key); | 50 int buf_get_rsa_pub_key(buffer* buf, dropbear_rsa_key *key); |
51 int buf_get_rsa_priv_key(buffer* buf, dropbear_rsa_key *key); | 51 int buf_get_rsa_priv_key(buffer* buf, dropbear_rsa_key *key); |
52 void buf_put_rsa_pub_key(buffer* buf, dropbear_rsa_key *key); | 52 void buf_put_rsa_pub_key(buffer* buf, dropbear_rsa_key *key); |