Re: nettle-meta interface for MACs

2019-07-17 Thread Daiki Ueno
ni...@lysator.liu.se (Niels Möller) writes: > It's also not directly usable with umac, which takes a nonce (and auto > increment in umac*_digest). Should the generic interface try to > accomodate macs that require a nonce? In terms of the meta interface, I guess we could add a set_nonce function

Re: nettle-meta interface for MACs

2019-07-17 Thread Niels Möller
Daiki Ueno writes: > This is, however, not usable for HMAC, because Nettle build uses > -Wcast-function-type and the set_key member has an incompatible type > with hmac_*_set_key, which requires a key length argument as HMAC allows > arbitrary key length up to the hash block size. It's also not

nettle-meta interface for MACs

2019-07-15 Thread Daiki Ueno
Hello, In testutils.h, there is a nettle-meta definition for MACs, similar to hashes and ciphers: /* FIXME: When interface stabilizes, move to nettle-meta.h */ struct nettle_mac { const char *name; /* Size of the context struct */ unsigned context_size; /* Size of digests */