summaryrefslogtreecommitdiffstats
path: root/src/fastd.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-09-16 05:22:38 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-09-16 05:30:10 +0200
commit7305c533516df296124d6b2415482d2febb7328a (patch)
tree538a6fde082c7d421456b663fb343a9efc86a69d /src/fastd.c
parent094ecaf3b7de251494c313df692e056451a9ba19 (diff)
downloadfastd-7305c533516df296124d6b2415482d2febb7328a.tar
fastd-7305c533516df296124d6b2415482d2febb7328a.zip
Fix alignment for NaCl's core2 assembler implementation of AES128-CTR
Diffstat (limited to 'src/fastd.c')
-rw-r--r--src/fastd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fastd.c b/src/fastd.c
index f1df118..f9d8403 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -269,7 +269,7 @@ static size_t methods_min_encrypt_head_space(fastd_context *ctx) {
ret = s;
}
- return alignto(ret, 8);
+ return alignto(ret, 16);
}
static size_t methods_min_decrypt_head_space(fastd_context *ctx) {
@@ -285,7 +285,8 @@ static size_t methods_min_decrypt_head_space(fastd_context *ctx) {
ret = s;
}
- return alignto(ret, 8);
+ /* ugly hack to get alignment right for aes128-gcm, which needs data aligned to 16 and has a 24 byte header */
+ return alignto(ret, 16) + 8;
}
static size_t methods_min_encrypt_tail_space(fastd_context *ctx) {