CMAC timings

Hal Murray hmurray at megapathdsl.net
Wed Jun 17 11:26:53 UTC 2020


Thanks.

levitte at openssl.org said:
> Quick forst answer, EVP_MAC_CTX is a typedef of struct evp_mac_ctx_st, which
> you find in crypto/evp/evp_local.h.  It's quite small (smaller than
> EVP_MD_CTX and EVP_PKEY_CTX): 

How much space does the crypto stuff take?  The idea is to do all of the setup 
calculations ahead of time.  I expect there are some tables in there.

> Regarding preloaded cipher and key, that tells me that the actual computation
> of a MAC is quick enough, that most of the slowdown is parameter overhead.
> That was expected. 

There are 2 sorts of overhead.  One is turning the key into a table, or 
something like that.  The other is collecting the parameters and turning them 
into something that can be processed.  Using strings as keys in the params 
tables seems like an invitation for not-fast.  It's probably not significant 
if it is being used from deep inside SSL processing but the total processing 
time for an NTP packet is ballpark of 10 microseconds so difference on that 
scale become interesting.


-- 
These are my opinions.  I hate spam.





More information about the openssl-users mailing list