Commit 3e19fd21 authored by Davide Galassi's avatar Davide Galassi

Merge branch 'feature/incremental_cmac' into 'master'

CMAM fix on pointer management

See merge request !10
parents 096782dd b8f39caf
Pipeline #46366677 passed with stages
in 1 minute and 48 seconds
......@@ -93,11 +93,11 @@ void cry_cmac_update(cry_cmac_ctx *ctx, const unsigned char *data, size_t len)
memset(ctx->mac, 0, 16);
for (i = 0; i < (n - 1); i++) {
xor_128(block, ctx->mac, &data[16*i]);
ctx->ciph_itf->encrypt(&ctx->ciph_ctx, ctx->mac, block, 16);
ctx->ciph_itf->encrypt(ctx->ciph_ctx, ctx->mac, block, 16);
}
xor_128(block, ctx->mac, last);
ctx->ciph_itf->encrypt(&ctx->ciph_ctx, ctx->mac, block, 16);
ctx->ciph_itf->encrypt(ctx->ciph_ctx, ctx->mac, block, 16);
}
void cry_cmac_digest(cry_cmac_ctx *ctx, unsigned char *mac)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment