intel / intel/isa-l

Get incorrect results by using the Multi-Hash-SHA1 API

Open
#191 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
1.1k
Forks
346
PR merge metrics
No merged PRs in 30d

Description

I refer to mh_sha1_test.c for calling Multi-Hash-SHA1 API

Here is the pseudo-code multi-hash API sequence:
1. Call mh_sha1_init() on a mh_sha1_ctx object to initialize a hash context for use with the context manager.
2. Call mh_sha1_update() to update hashes with input data(64k).
3. Call mh_sha1_finalize()finalize the message **digests** for multi-hash sha1.
Here is the openssl hash API sequence:
Call open-ssl SHA1() with the 64k input data to get the **digest**.

Error Result
Comparing the above two of digests, the results are inconsistent.

Expected Result
Get the correct result, which is consistent with the open-ssl SHA1() API

I checked the return value of above three API (mh_sha1_init() / mh_sha1_update() / mh_sha1_finalize()),
they are all return MH_SHA1_CTX_ERROR_NONE.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.