summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/kex.h
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2000-12-05 02:20:19 +0000
committergreen <green@FreeBSD.org>2000-12-05 02:20:19 +0000
commit2aecee364f2b1fa8b38c4d29600f05f33075cddf (patch)
treebf0881ca432b88e84b40b65bc72970ba5b2a3120 /crypto/openssh/kex.h
parent100d82038d69581b72d61ea79acb559a97322110 (diff)
downloadFreeBSD-src-2aecee364f2b1fa8b38c4d29600f05f33075cddf.zip
FreeBSD-src-2aecee364f2b1fa8b38c4d29600f05f33075cddf.tar.gz
Import of OpenSSH 2.3.0 (virgin OpenBSD source release).
Diffstat (limited to 'crypto/openssh/kex.h')
-rw-r--r--crypto/openssh/kex.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/crypto/openssh/kex.h b/crypto/openssh/kex.h
index 8c89687..2129581 100644
--- a/crypto/openssh/kex.h
+++ b/crypto/openssh/kex.h
@@ -24,8 +24,9 @@
#ifndef KEX_H
#define KEX_H
-#define KEX_DH1 "diffie-hellman-group1-sha1"
-#define KEX_DSS "ssh-dss"
+#define KEX_DH1 "diffie-hellman-group1-sha1"
+#define KEX_DHGEX "diffie-hellman-group-exchange-sha1"
+#define KEX_DSS "ssh-dss"
enum kex_init_proposals {
PROPOSAL_KEX_ALGS,
@@ -47,28 +48,30 @@ enum kex_modes {
MODE_MAX
};
+enum kex_exchange {
+ DH_GRP1_SHA1,
+ DH_GEX_SHA1
+};
+
typedef struct Kex Kex;
typedef struct Mac Mac;
typedef struct Comp Comp;
typedef struct Enc Enc;
struct Enc {
- int type;
+ char *name;
+ Cipher *cipher;
int enabled;
- int block_size;
unsigned char *key;
unsigned char *iv;
- int key_len;
- int iv_len;
- char *name;
};
struct Mac {
- EVP_MD *md;
+ char *name;
int enabled;
+ EVP_MD *md;
int mac_len;
unsigned char *key;
int key_len;
- char *name;
};
struct Comp {
int type;
@@ -83,6 +86,7 @@ struct Kex {
int server;
char *name;
char *hostkeyalg;
+ int kex_type;
};
Buffer *kex_init(char *myproposal[PROPOSAL_MAX]);
@@ -96,6 +100,8 @@ kex_choose_conf(char *cprop[PROPOSAL_MAX],
int kex_derive_keys(Kex *k, unsigned char *hash, BIGNUM *shared_secret);
void packet_set_kex(Kex *k);
int dh_pub_is_valid(DH *dh, BIGNUM *dh_pub);
+DH *dh_new_group_asc(const char *, const char *);
+DH *dh_new_group(BIGNUM *, BIGNUM *);
DH *dh_new_group1();
unsigned char *
@@ -109,4 +115,15 @@ kex_hash(
BIGNUM *server_dh_pub,
BIGNUM *shared_secret);
+unsigned char *
+kex_hash_gex(
+ char *client_version_string,
+ char *server_version_string,
+ char *ckexinit, int ckexinitlen,
+ char *skexinit, int skexinitlen,
+ char *serverhostkeyblob, int sbloblen,
+ int minbits, BIGNUM *prime, BIGNUM *gen,
+ BIGNUM *client_dh_pub,
+ BIGNUM *server_dh_pub,
+ BIGNUM *shared_secret);
#endif
OpenPOWER on IntegriCloud