diff options
author | Niels Möller <nisse@lysator.liu.se> | 2013-04-16 07:59:40 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2013-04-16 07:59:40 +0200 |
commit | 1d4c756ce97c24cdfdea8369c1a3726ec3e18b66 (patch) | |
tree | 46e5c92986123d6903849d78dc1aaa6b2579a9f0 /umac64.c | |
parent | e4f490c940afc239268de2d0c9a8e8f6d786442c (diff) | |
download | nettle-1d4c756ce97c24cdfdea8369c1a3726ec3e18b66.tar.gz |
Fixed umac nonce increment.
Diffstat (limited to 'umac64.c')
-rw-r--r-- | umac64.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -118,10 +118,8 @@ umac64_digest (struct umac64_ctx *ctx, ctx->nonce_low = 0; ctx->nonce[i] += 2; - if (ctx->nonce[i] == 0) - while (i > 0) - if (++ctx->nonce[--i] == 0) - break; + if (ctx->nonce[i] == 0 && i > 0) + INCREMENT (i, ctx->nonce); } _umac_l2_final (ctx->l2_key, ctx->l2_state, 2, ctx->count, ctx->l1_out); |