diff options
author | Niels Möller <nisse@lysator.liu.se> | 2013-04-11 15:10:43 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2013-04-11 15:10:43 +0200 |
commit | 5938db8f02065cd62cc0d6fcb8d2c6cce48fb5eb (patch) | |
tree | 8caf15abace55dd223dcb4b7346e07e8f77eadbd /umac64.c | |
parent | 34aef19b0f571e24b575a92d0262df7fe755bf6b (diff) | |
download | nettle-5938db8f02065cd62cc0d6fcb8d2c6cce48fb5eb.tar.gz |
Minor reorg of umac l3 hashing.
Diffstat (limited to 'umac64.c')
-rw-r--r-- | umac64.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 */ |