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.c | |
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.c')
-rw-r--r-- | kex.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kex.c,v 1.78 2007/05/30 05:58:13 djm Exp $ */ | 1 | /* $OpenBSD: kex.c,v 1.79 2007/06/05 06:52:37 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -279,7 +279,7 @@ choose_mac(Mac *mac, char *client, char *server) | |||
279 | if (name == NULL) | 279 | if (name == NULL) |
280 | fatal("no matching mac found: client %s server %s", | 280 | fatal("no matching mac found: client %s server %s", |
281 | client, server); | 281 | client, server); |
282 | if (mac_init(mac, name) < 0) | 282 | if (mac_setup(mac, name) < 0) |
283 | fatal("unsupported mac %s", name); | 283 | fatal("unsupported mac %s", name); |
284 | /* truncate the key */ | 284 | /* truncate the key */ |
285 | if (datafellows & SSH_BUG_HMAC) | 285 | if (datafellows & SSH_BUG_HMAC) |