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 /mac.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 'mac.h')
-rw-r--r-- | mac.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: mac.h,v 1.4 2006/03/25 22:22:43 djm Exp $ */ | 1 | /* $OpenBSD: mac.h,v 1.5 2007/06/05 06:52:37 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -24,5 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | int mac_valid(const char *); | 26 | int mac_valid(const char *); |
27 | int mac_init(Mac *, char *); | 27 | int mac_setup(Mac *, char *); |
28 | void mac_init(Mac *); | ||
28 | u_char *mac_compute(Mac *, u_int32_t, u_char *, int); | 29 | u_char *mac_compute(Mac *, u_int32_t, u_char *, int); |
30 | void mac_clear(Mac *); | ||