From 37385fcd836bcc086b56b8dc7089d5038c203f13 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 15 Sep 2012 06:01:11 +0200 Subject: 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. --- src/protocol_ec25519_fhmqvc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/protocol_ec25519_fhmqvc.c') 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) { -- cgit v1.2.3