summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/kex.h
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2007-06-05 06:52:38 +0000
committerDamien Miller <djm@cvs.openbsd.org>2007-06-05 06:52:38 +0000
commit18ea03300bf87ecf324f5a4fee9047441bbedd76 (patch)
treeb4ac81bd81e9365aabf10cd980d4be7059d70fd4 /usr.bin/ssh/kex.h
parent57ad15a57f4291b6559376688db9e350380af27f (diff)
Preserve MAC ctx between packets, saving 2xhash calls per-packet.
Yields around a 12-16% end-to-end speedup for arcfour256/hmac-md5 patch from markus@ tested dtucker@ and myself, ok markus@ and me (I'm committing at his request)
Diffstat (limited to 'usr.bin/ssh/kex.h')
-rw-r--r--usr.bin/ssh/kex.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/kex.h b/usr.bin/ssh/kex.h
index acf2121d5be..0843315e003 100644
--- a/usr.bin/ssh/kex.h
+++ b/usr.bin/ssh/kex.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.h,v 1.44 2006/08/03 03:34:42 deraadt Exp $ */
+/* $OpenBSD: kex.h,v 1.45 2007/06/05 06:52:37 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -27,6 +27,7 @@
#define KEX_H
#include <openssl/evp.h>
+#include <openssl/hmac.h>
#define KEX_DH1 "diffie-hellman-group1-sha1"
#define KEX_DH14 "diffie-hellman-group14-sha1"
@@ -89,6 +90,7 @@ struct Mac {
u_int mac_len;
u_char *key;
u_int key_len;
+ HMAC_CTX ctx;
};
struct Comp {
int type;