summaryrefslogtreecommitdiff
path: root/kex.h
diff options
context:
space:
mode:
authordjm <djm>2013-11-08 01:16:50 +0000
committerdjm <djm>2013-11-08 01:16:50 +0000
commit002e7373dbfc9a4d37fcff973ad3b4caa0936ace (patch)
treeba81743f1fd728299757abd478efe40f6e95e1ed /kex.h
parente75a88d4996edb1063d72dfe99077e5ed1a69247 (diff)
downloadopenssh-002e7373dbfc9a4d37fcff973ad3b4caa0936ace.tar.gz
- dtucker@cvs.openbsd.org 2013/11/07 11:58:27
[cipher.c cipher.h kex.c kex.h mac.c mac.h servconf.c ssh.c] Output the effective values of Ciphers, MACs and KexAlgorithms when the default has not been overridden. ok markus@
Diffstat (limited to 'kex.h')
-rw-r--r--kex.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/kex.h b/kex.h
index 9f1e1adb..800a6923 100644
--- a/kex.h
+++ b/kex.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.h,v 1.56 2013/07/19 07:37:48 markus Exp $ */
+/* $OpenBSD: kex.h,v 1.58 2013/11/07 11:58:27 dtucker Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -43,6 +43,7 @@
#define KEX_ECDH_SHA2_NISTP256 "ecdh-sha2-nistp256"
#define KEX_ECDH_SHA2_NISTP384 "ecdh-sha2-nistp384"
#define KEX_ECDH_SHA2_NISTP521 "ecdh-sha2-nistp521"
+#define KEX_CURVE25519_SHA256 "curve25519-sha256@libssh.org"
#define COMP_NONE 0
#define COMP_ZLIB 1
@@ -74,6 +75,7 @@ enum kex_exchange {
KEX_DH_GEX_SHA1,
KEX_DH_GEX_SHA256,
KEX_ECDH_SHA2,
+ KEX_C25519_SHA256,
KEX_MAX
};
@@ -144,7 +146,7 @@ struct Kex {
};
int kex_names_valid(const char *);
-char *kex_alg_list(void);
+char *kex_alg_list(char);
Kex *kex_setup(char *[PROPOSAL_MAX]);
void kex_finish(Kex *);
@@ -161,6 +163,8 @@ void kexgex_client(Kex *);
void kexgex_server(Kex *);
void kexecdh_client(Kex *);
void kexecdh_server(Kex *);
+void kexc25519_client(Kex *);
+void kexc25519_server(Kex *);
void
kex_dh_hash(char *, char *, char *, int, char *, int, u_char *, int,
@@ -175,6 +179,19 @@ kex_ecdh_hash(const EVP_MD *, const EC_GROUP *, char *, char *, char *, int,
char *, int, u_char *, int, const EC_POINT *, const EC_POINT *,
const BIGNUM *, u_char **, u_int *);
#endif
+void
+kex_c25519_hash(const EVP_MD *, char *, char *, char *, int,
+ char *, int, u_char *, int, const u_char *, const u_char *,
+ const BIGNUM *, u_char **, u_int *);
+
+#define CURVE25519_SIZE 32
+void kexc25519_keygen(u_char[CURVE25519_SIZE], u_char[CURVE25519_SIZE])
+ __attribute__((__bounded__(__minbytes__, 1, CURVE25519_SIZE)))
+ __attribute__((__bounded__(__minbytes__, 2, CURVE25519_SIZE)));
+BIGNUM *kexc25519_shared_key(const u_char[CURVE25519_SIZE],
+ const u_char[CURVE25519_SIZE])
+ __attribute__((__bounded__(__minbytes__, 1, CURVE25519_SIZE)))
+ __attribute__((__bounded__(__minbytes__, 2, CURVE25519_SIZE)));
void
derive_ssh1_session_id(BIGNUM *, BIGNUM *, u_int8_t[8], u_int8_t[16]);