diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-09-15 06:01:11 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-09-15 06:01:11 +0200 |
commit | 37385fcd836bcc086b56b8dc7089d5038c203f13 (patch) | |
tree | e4baf6ea1c24ebb8fbc93f02526acb56d186c606 /src/protocol_ec25519_fhmqvc.c | |
parent | 430a8557d4421f41fbf834909f7598cfc64e3311 (diff) | |
download | fastd-37385fcd836bcc086b56b8dc7089d5038c203f13.tar fastd-37385fcd836bcc086b56b8dc7089d5038c203f13.zip |
Rework some parts of the AES128-GCM method
These changes improve the performance of the AES128-GCM method by ~10% on my
Intel CPU when compiled with -O2.
Furthermore, the AES and the GHASH parts are separated now, allowing to switch
to other implementations of the algorithms more easily.
Diffstat (limited to 'src/protocol_ec25519_fhmqvc.c')
-rw-r--r-- | src/protocol_ec25519_fhmqvc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocol_ec25519_fhmqvc.c b/src/protocol_ec25519_fhmqvc.c index b27f4d6..964c21d 100644 --- a/src/protocol_ec25519_fhmqvc.c +++ b/src/protocol_ec25519_fhmqvc.c @@ -726,7 +726,7 @@ static void protocol_send(fastd_context *ctx, fastd_peer *peer, fastd_buffer buf } static void send_empty(fastd_context *ctx, fastd_peer *peer, protocol_session *session) { - session_send(ctx, peer, fastd_buffer_alloc(0, session->method->min_encrypt_head_space(ctx), 0), session); + session_send(ctx, peer, fastd_buffer_alloc(0, ALIGN(session->method->min_encrypt_head_space(ctx), 8), session->method->min_encrypt_tail_space(ctx)), session); } static void protocol_init_peer_state(fastd_context *ctx, fastd_peer *peer) { |