Hello,
пт, 19 июл. 2019 г. в 16:38, Daiki Ueno ueno@gnu.org:
From: Daiki Ueno dueno@redhat.com
As discussed in: https://lists.lysator.liu.se/pipermail/nettle-bugs/2019/007662.html
This moves `struct nettle_mac` to nettle-meta.h and provide the meta interface for all defined MAC algorithms.
Great!
Each meta interface shall provide the following 4 functions:
nettle_set_key_func *set_key; nettle_set_key_func *set_nonce; nettle_hash_update_func *update; nettle_hash_digest_func *digest;
where set_nonce is only used by UMAC, and expects that the nonce has always the same length as AES_BLOCK_SIZE. For CMAC and HMAC, a no-op set_nonce function is defined.
Will it be usefull to support length + data as arguments of set_nonce function? Especially if we try to add AES-GMAC a first level citizen.
Also it might look good to define (internal) mac_set_nonce_null() function and use it from the HMAC/CMAC meta interface.