Initial checkin: beta 0.43
[u/mdw/putty] / ssh.h
CommitLineData
374330e2 1struct RSAKey {
2 int bits;
3 int bytes;
4 void *modulus;
5 void *exponent;
6};
7
8int makekey(unsigned char *data, struct RSAKey *result,
9 unsigned char **keystr);
10void rsaencrypt(unsigned char *data, int length, struct RSAKey *key);
11int rsastr_len(struct RSAKey *key);
12void rsastr_fmt(char *str, struct RSAKey *key);
13
14typedef unsigned int word32;
15typedef unsigned int uint32;
16
17unsigned long crc32(const unsigned char *s, unsigned int len);
18
19struct MD5Context {
20 uint32 buf[4];
21 uint32 bits[2];
22 unsigned char in[64];
23};
24
25void MD5Init(struct MD5Context *context);
26void MD5Update(struct MD5Context *context, unsigned char const *buf,
27 unsigned len);
28void MD5Final(unsigned char digest[16], struct MD5Context *context);
29
30struct ssh_cipher {
31 void (*sesskey)(unsigned char *key);
32 void (*encrypt)(unsigned char *blk, int len);
33 void (*decrypt)(unsigned char *blk, int len);
34};
35
36void SHATransform(word32 *digest, word32 *data);
37
38int random_byte(void);
39void random_add_noise(void *noise, int length);