version 1.66, 2015/01/15 09:40:00 |
version 1.67, 2015/01/19 19:52:16 |
|
|
|
|
#define KEX_INIT_SENT 0x0001 |
#define KEX_INIT_SENT 0x0001 |
|
|
typedef struct Kex Kex; |
typedef struct kex Kex; |
typedef struct Comp Comp; |
typedef struct sshcomp Comp; |
typedef struct sshmac Mac; |
typedef struct sshmac Mac; |
typedef struct Enc Enc; |
typedef struct sshenc Enc; |
typedef struct Newkeys Newkeys; |
typedef struct newkeys Newkeys; |
|
|
struct Enc { |
struct sshenc { |
char *name; |
char *name; |
const Cipher *cipher; |
const struct sshcipher *cipher; |
int enabled; |
int enabled; |
u_int key_len; |
u_int key_len; |
u_int iv_len; |
u_int iv_len; |
|
|
u_char *key; |
u_char *key; |
u_char *iv; |
u_char *iv; |
}; |
}; |
struct Comp { |
struct sshcomp { |
int type; |
u_int type; |
int enabled; |
int enabled; |
char *name; |
char *name; |
}; |
}; |
struct Newkeys { |
struct newkeys { |
Enc enc; |
struct sshenc enc; |
Mac mac; |
struct sshmac mac; |
Comp comp; |
struct sshcomp comp; |
}; |
}; |
struct Kex { |
struct kex { |
u_char *session_id; |
u_char *session_id; |
u_int session_id_len; |
size_t session_id_len; |
Newkeys *newkeys[MODE_MAX]; |
struct newkeys *newkeys[MODE_MAX]; |
u_int we_need; |
u_int we_need; |
u_int dh_need; |
u_int dh_need; |
int server; |
int server; |
|
|
int hostkey_type; |
int hostkey_type; |
int kex_type; |
int kex_type; |
int roaming; |
int roaming; |
Buffer my; |
struct sshbuf *my; |
Buffer peer; |
struct sshbuf *peer; |
sig_atomic_t done; |
sig_atomic_t done; |
int flags; |
int flags; |
int hash_alg; |
int hash_alg; |
|
|
|
|
Kex *kex_setup(char *[PROPOSAL_MAX]); |
Kex *kex_setup(char *[PROPOSAL_MAX]); |
void kex_finish(Kex *); |
void kex_finish(Kex *); |
|
void kex_free_newkeys(struct newkeys *); |
|
|
void kex_send_kexinit(Kex *); |
void kex_send_kexinit(Kex *); |
void kex_input_kexinit(int, u_int32_t, void *); |
void kex_input_kexinit(int, u_int32_t, void *); |
void kex_derive_keys(Kex *, u_char *, u_int, const u_char *, u_int); |
void kex_derive_keys(Kex *, u_char *, u_int, const u_char *, u_int); |
void kex_derive_keys_bn(Kex *, u_char *, u_int, const BIGNUM *); |
void kex_derive_keys_bn(Kex *, u_char *, u_int, const BIGNUM *); |
|
|
Newkeys *kex_get_newkeys(int); |
|
|
|
void kexdh_client(Kex *); |
void kexdh_client(Kex *); |
void kexdh_server(Kex *); |
void kexdh_server(Kex *); |