Hi,
вс, 9 июн. 2019 г. в 15:04, Dmitry Eremin-Solenikov dbaryshkov@gmail.com:
пт, 7 июн. 2019 г. в 00:27, Niels Möller nisse@lysator.liu.se:
Dmitry Eremin-Solenikov dbaryshkov@gmail.com writes:
I'm still playing around HMAC/digest refactoring, but I'm not happy with the way code looks in my tree.
Below patch is a faitly simple way to do it. It adds internal functions with a state_size argument, uses that when saving and restoring state, and switches hmac_md5 to a new smaller context struct.
I have pushed my current state to https://gitlab.com/GostCrypt/nettle/tree/hmac-2
MD5 and HMAC-MD5 were converted to demonstrate my proposal.
The key change is the split of md5_ctx into md5_state and block_ctx and later reusal of common block_ctx in all operations. Unfortunately this changes nettle_hash interface.
I have pushed https://gitlab.com/GostCrypt/nettle/tree/hmac-3. I have fixed nettle_hash interface by introducing nettle_bctx_hash structure. Also I have converted all present HMAC algorithms.