diff --git a/crypto/cmac/cmac.c b/crypto/cmac/cmac.c index 064b67d07..88a323da9 100644 --- a/crypto/cmac/cmac.c +++ b/crypto/cmac/cmac.c @@ -151,6 +151,8 @@ int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen, return 0; if (!M_EVP_EncryptInit_ex(&ctx->cctx, NULL, NULL, NULL, zero_iv)) return 0; + memset(ctx->tbl, 0, bl); + ctx->nlast_block = 0; return 1; } /* Initialiase context */