Refactor HMAC selftest into MAC selftest

Werner Koch wk at
Thu Dec 17 08:42:15 CET 2020

On Wed, 16 Dec 2020 12:19, NIIBE Yutaka said:

> This patch does:
>    Add new member 'selftest' in gcry_mac_spec_ops_t.
>    Add an internal function _gcry_mac_selftest.
>    Rename run_hmac_selftests in fips.c to run_mac_selftests.
>    Remove the function _gcry_hmac_selftest in hmac-tests.c.

Okay with me.

FWIW: Actually it would be better if we could factor out the hmac code
from the md functions and divert hmac requests in gcry_md_* directly to
gcry_mac_* functions.  However, that is a too intrusive change for now
and thus we need to stick to the structure we have.



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <>

More information about the Gcrypt-devel mailing list