Silly error in loading Default Settings - reset port but not protocol
[u/mdw/putty] / ssh.h
CommitLineData
37508af4 1#include <string.h>
2
bea1ef5f 3#define SSH_CIPHER_IDEA 1
4#define SSH_CIPHER_3DES 3
5#define SSH_CIPHER_BLOWFISH 6
6
374330e2 7struct RSAKey {
8 int bits;
9 int bytes;
10 void *modulus;
11 void *exponent;
12};
13
14int makekey(unsigned char *data, struct RSAKey *result,
15 unsigned char **keystr);
16void rsaencrypt(unsigned char *data, int length, struct RSAKey *key);
17int rsastr_len(struct RSAKey *key);
18void rsastr_fmt(char *str, struct RSAKey *key);
19
20typedef unsigned int word32;
21typedef unsigned int uint32;
22
23unsigned long crc32(const unsigned char *s, unsigned int len);
24
25struct MD5Context {
26 uint32 buf[4];
27 uint32 bits[2];
28 unsigned char in[64];
29};
30
31void MD5Init(struct MD5Context *context);
32void MD5Update(struct MD5Context *context, unsigned char const *buf,
33 unsigned len);
34void MD5Final(unsigned char digest[16], struct MD5Context *context);
35
36struct ssh_cipher {
37 void (*sesskey)(unsigned char *key);
38 void (*encrypt)(unsigned char *blk, int len);
39 void (*decrypt)(unsigned char *blk, int len);
40};
41
42void SHATransform(word32 *digest, word32 *data);
43
44int random_byte(void);
45void random_add_noise(void *noise, int length);