intel/cryptography-primitives

Add common hash API wrapper

Opened this issue · 2 comments

Almost all hash libraries use the following API format. Please provide a wrapper.

void sha512_init(sha512ctx *ctx);
void sha512_update(sha512ctx *ctx, const void *data, size_t len);
void sha512_done(sha512ctx *ctx, uint8_t out[SHA512_HASH_LENGTH]);

So it would be very easy to swap out libraries, eg. one configuration doesn't need HW acceleration, just SW implementation.

Hi @mrx23dot ,
Thanks for the proposal! We'll consider it in the future.

Could you please provide a reference to the hash libraries that you are mentioning?