On Wed, 2018-07-25 at 07:31 +0200, Niels Möller wrote:
Dmitry Eremin-Solenikov dbaryshkov@gmail.com writes:
True. I'll look into adding HMAC functions to nettle-benchmark then. It would be interesting to compare performance.
That would be great. It's better to measure performance than to speculate about it.
It might be worth moving both index and block out of 'state' function and then updating compress/MD_* macros to accept separate 'compression state' and 'buffer state' structures. This might result in some code cleanups. I'll give this idea a thought.
That would be conceptually very nice. I suspect there might be some complications from the count field (counter of compressed blocks), which most hash function have, but, e.g., sha3 doesn't. On the other hand, hmac is designed to be used only with MD-style hash functions, so I'm not sure hmac-sha3 is of any use.
It would be an overkill to have hmac-sha3, first because it is slow, and secondly because it was designed to be a MAC as simple as SHA3(K, msg).
regards, Nikos