summaryrefslogtreecommitdiff
path: root/umac32.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2013-04-16 14:54:20 +0200
committerNiels Möller <nisse@lysator.liu.se>2013-04-16 14:54:20 +0200
commite1646357a32fc37f98c9c54e6cdabee12dd50119 (patch)
tree53242e2a1af717fa91d4a5cf8e53c924888e638e /umac32.c
parent448502d686b1da11b44734da195e288c733e3e54 (diff)
downloadnettle-e1646357a32fc37f98c9c54e6cdabee12dd50119.tar.gz
Eliminated l1_out from umac context structs, store at end of l2_state instead.
Diffstat (limited to 'umac32.c')
-rw-r--r--umac32.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/umac32.c b/umac32.c
index ce859c15..c50dfc6b 100644
--- a/umac32.c
+++ b/umac32.c
@@ -66,8 +66,7 @@ umac32_set_nonce (struct umac32_ctx *ctx,
uint64_t __umac32_y \
= _umac_nh (ctx->l1_key, UMAC_BLOCK_SIZE, block) \
+ 8*UMAC_BLOCK_SIZE ; \
- _umac_l2 (ctx->l2_key, ctx->l2_state, 1, ctx->count++, \
- ctx->l1_out, &__umac32_y); \
+ _umac_l2 (ctx->l2_key, ctx->l2_state, 1, ctx->count++, &__umac32_y); \
} while (0)
void
@@ -96,8 +95,7 @@ umac32_digest (struct umac32_ctx *ctx,
y = _umac_nh (ctx->l1_key, ctx->index + pad, ctx->block)
+ 8 * ctx->index;
- _umac_l2 (ctx->l2_key, ctx->l2_state, 1, ctx->count++,
- ctx->l1_out, &y);
+ _umac_l2 (ctx->l2_key, ctx->l2_state, 1, ctx->count++, &y);
}
assert (ctx->count > 0);
if ( !(ctx->nonce_low & _UMAC_NONCE_CACHED))
@@ -122,7 +120,7 @@ umac32_digest (struct umac32_ctx *ctx,
INCREMENT (i, ctx->nonce);
}
- _umac_l2_final (ctx->l2_key, ctx->l2_state, 1, ctx->count, ctx->l1_out);
+ _umac_l2_final (ctx->l2_key, ctx->l2_state, 1, ctx->count);
pad ^= ctx->l3_key2[0] ^ _umac_l3 (ctx->l3_key1, ctx->l2_state);
memcpy (digest, &pad, length);