I cannot get the SHA-256 hasher to produce correct results using the sha256_ctx_mgr* API #14
Labels
No labels
announcement
bug
duplicate
enhancement
help wanted
invalid
Next release
question
sighting
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-intel/isa-l_crypto#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is true when I have to compute the SHA256 hash in multiple steps. Here is the pseudo-code for what I am doing:
Important exception and notes: The hash is correct if I submit a single chunk with the flag HASH_ENTIRE, regardless of the size of the chunk. Unfortunately, if I break up the data and submit it in multiple chunks (HASH_FIRST, HASH_UPDATE..., HASH_LAST), using the methodology in the steps above, the hash produced is incorrect and in no way resembles the correct expected hash as indicated by for example the sha256sum utility.
Please look at my steps above and tell me what I am doing wrong.
From your steps described I don't see anything incorrect. If you look at the test sha256_mb_rand_update_test.c it does a similar thing by submitting buffers in pieces. Can you boil down into a small test case code?