Home GnuPG

mac: add support for gcry_mac_ctl(GCRYCTL_SET_SBOX)

Description

mac: add support for gcry_mac_ctl(GCRYCTL_SET_SBOX)

* cipher/mac-internal.h (gcry_mac_spec_ops_t): add set_extra_info field
for providing additional settings.
* cipher/mac.c (_gcry_mac_ctl): support GCRYCTL_SET_SBOX call.
* cipher/mac-cmac.c (cmac_ops): set set_extra_info to NULL.
* cipher/mac-gmac.c (gmac_ops): the same.
* cipher/mac-hmac.c (hmac_ops): the same.
* cipher/mac-poly1305.c (poly1305mac_ops): the same.

New MAC GOST28147-IMIT needs info about S-Box to be used. This info can
be passed via a call to gcry_mac_ctl(GCRYCTL_SET_SBOX, ...).

  • Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>

Details

Provenance
lumagAuthored on Mar 21 2020, 8:33 PM
jukiviliCommitted on Apr 19 2020, 8:57 PM
Parents
rC469e2fefb64e: mpi: Use mpi_invm_pow2 for N=2^k.
Branches
Unknown
Tags
Unknown