CMAC timings

Kurt Roeckx kurt at roeckx.be
Thu Jun 18 19:18:05 UTC 2020


On Thu, Jun 18, 2020 at 07:24:39PM +0200, Kurt Roeckx wrote:
> 
> Now that a large fraction of the cost has been found, I can look
> again to see where the biggest cost in 3.0 comes from now and if we
> can do something about it.

So a code path that I've noticed before when looking at the
profile is:
    /* TODO(3.0): Remove this eventually when no more legacy */
    if (ctx->op.sig.sigprovctx == NULL)
        return EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG,
                                 EVP_PKEY_CTRL_MD, 0, (void *)(md));

I think that is now actually causing most of the CPU usage.

This currently ends up doing an EVP_MAC_dup_ctx(), and I'm
currently not sure why, and what the effect is going to be
when sigprovctx != NULL. I think it might be better to wait until
someone fixes that before I look at that again.


Kurt



More information about the openssl-users mailing list