summaryrefslogtreecommitdiff
path: root/umac64.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2013-04-11 15:10:43 +0200
committerNiels Möller <nisse@lysator.liu.se>2013-04-11 15:10:43 +0200
commit5938db8f02065cd62cc0d6fcb8d2c6cce48fb5eb (patch)
tree8caf15abace55dd223dcb4b7346e07e8f77eadbd /umac64.c
parent34aef19b0f571e24b575a92d0262df7fe755bf6b (diff)
downloadnettle-5938db8f02065cd62cc0d6fcb8d2c6cce48fb5eb.tar.gz
Minor reorg of umac l3 hashing.
Diffstat (limited to 'umac64.c')
-rw-r--r--umac64.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/umac64.c b/umac64.c
index 015cefd0..6f8132de 100644
--- a/umac64.c
+++ b/umac64.c
@@ -125,9 +125,10 @@ umac64_digest (struct umac64_ctx *ctx,
}
_umac_l2_final (ctx->l2_key, ctx->l2_state, 2, ctx->count, ctx->l1_out);
- tag[0] = pad[0] ^ _umac_l3 (ctx->l3_key1, ctx->l3_key2[0], ctx->l2_state);
- tag[1] = pad[1] ^ _umac_l3 (ctx->l3_key1 + 8, ctx->l3_key2[1],
- ctx->l2_state + 2);
+ tag[0] = pad[0] ^ ctx->l3_key2[0] ^ _umac_l3 (ctx->l3_key1,
+ ctx->l2_state);
+ tag[1] = pad[1] ^ ctx->l3_key2[1] ^ _umac_l3 (ctx->l3_key1 + 8,
+ ctx->l2_state + 2);
memcpy (digest, tag, length);
/* Reinitialize */