diff options
author | Darren Tucker <dtucker@zip.com.au> | 2007-06-05 18:30:18 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2007-06-05 18:30:18 +1000 |
commit | 5f3d5be52f02d2d149cc11ec4a511d022444d2b1 (patch) | |
tree | de550fe7966f77cc548a1d4029ceaef4774cce4c /kex.h | |
parent | 7b21cb5bdc6d0e587f646397b6c6f6ef87505e0b (diff) |
- 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 @@ | |||
1 | /* $OpenBSD: kex.h,v 1.44 2006/08/03 03:34:42 deraadt Exp $ */ | 1 | /* $OpenBSD: kex.h,v 1.45 2007/06/05 06:52:37 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. |
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <signal.h> | 29 | #include <signal.h> |
30 | #include <openssl/evp.h> | 30 | #include <openssl/evp.h> |
31 | #include <openssl/hmac.h> | ||
31 | 32 | ||
32 | #define KEX_DH1 "diffie-hellman-group1-sha1" | 33 | #define KEX_DH1 "diffie-hellman-group1-sha1" |
33 | #define KEX_DH14 "diffie-hellman-group14-sha1" | 34 | #define KEX_DH14 "diffie-hellman-group14-sha1" |
@@ -90,6 +91,7 @@ struct Mac { | |||
90 | u_int mac_len; | 91 | u_int mac_len; |
91 | u_char *key; | 92 | u_char *key; |
92 | u_int key_len; | 93 | u_int key_len; |
94 | HMAC_CTX ctx; | ||
93 | }; | 95 | }; |
94 | struct Comp { | 96 | struct Comp { |
95 | int type; | 97 | int type; |