diff options
author | dtucker <dtucker> | 2007-06-05 08:30:18 +0000 |
---|---|---|
committer | dtucker <dtucker> | 2007-06-05 08:30:18 +0000 |
commit | 06339f33c40e21a16c81ee4f757cfadf1e6b9524 (patch) | |
tree | 721b299d910c7fe152aa4ee4a6cf4c80cdfb1ef0 /kex.h | |
parent | e72989d262f2de754b2406a65e4ec6c10c3e2a89 (diff) | |
download | openssh-06339f33c40e21a16c81ee4f757cfadf1e6b9524.tar.gz |
- djm@cvs.openbsd.org 2007/06/05 06:52:37
[kex.c monitor_wrap.c packet.c mac.h kex.h mac.c]
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 'kex.h')
-rw-r--r-- | kex.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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. @@ -28,6 +28,7 @@ #include <signal.h> #include <openssl/evp.h> +#include <openssl/hmac.h> #define KEX_DH1 "diffie-hellman-group1-sha1" #define KEX_DH14 "diffie-hellman-group14-sha1" @@ -90,6 +91,7 @@ struct Mac { u_int mac_len; u_char *key; u_int key_len; + HMAC_CTX ctx; }; struct Comp { int type; |