summaryrefslogtreecommitdiffstats
path: root/src/methods/generic_poly1305
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-03-10 18:04:14 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-03-10 18:04:14 +0100
commit45da9c9f296215a4d9ff77db0e6d48bda105ddee (patch)
treecdf816d309a228d7f3f47370b9f6776b514816d1 /src/methods/generic_poly1305
parent519972c9c18a103a7689844150c75e939c642115 (diff)
downloadfastd-45da9c9f296215a4d9ff77db0e6d48bda105ddee.tar
fastd-45da9c9f296215a4d9ff77db0e6d48bda105ddee.zip
Remove aligned data_t type again
Diffstat (limited to 'src/methods/generic_poly1305')
-rw-r--r--src/methods/generic_poly1305/generic_poly1305.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/methods/generic_poly1305/generic_poly1305.c b/src/methods/generic_poly1305/generic_poly1305.c
index b65f35b..318e640 100644
--- a/src/methods/generic_poly1305/generic_poly1305.c
+++ b/src/methods/generic_poly1305/generic_poly1305.c
@@ -126,14 +126,14 @@ static bool method_encrypt(fastd_context_t *ctx, fastd_peer_t *peer UNUSED, fast
if (tail_len)
memset(in.data+in.len, 0, tail_len);
- data_t nonce[session->method->cipher_info->iv_length];
+ uint8_t nonce[session->method->cipher_info->iv_length] __attribute__((aligned(8)));
fastd_method_expand_nonce(nonce, session->common.send_nonce, sizeof(nonce));
int n_blocks = block_count(in.len, sizeof(fastd_block128_t));
fastd_block128_t *inblocks = in.data;
fastd_block128_t *outblocks = out->data;
- data_t tag[TAGBYTES];
+ uint8_t tag[TAGBYTES] __attribute__((aligned(8)));
bool ok = session->cipher->crypt(session->cipher_state, outblocks, inblocks, n_blocks*sizeof(fastd_block128_t), nonce);
@@ -171,10 +171,10 @@ static bool method_decrypt(fastd_context_t *ctx, fastd_peer_t *peer, fastd_metho
if (flags)
return false;
- data_t nonce[session->method->cipher_info->iv_length];
+ uint8_t nonce[session->method->cipher_info->iv_length] __attribute__((aligned(8)));
fastd_method_expand_nonce(nonce, in_nonce, sizeof(nonce));
- data_t tag[TAGBYTES];
+ uint8_t tag[TAGBYTES] __attribute__((aligned(8)));
fastd_buffer_push_head_to(ctx, &in, tag, TAGBYTES);
fastd_buffer_pull_head_zero(ctx, &in, KEYBYTES);