Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differences between MD5 and SHA1 hash digests Endianness #57

Open
jackyalbo opened this issue Oct 22, 2020 · 4 comments
Open

Differences between MD5 and SHA1 hash digests Endianness #57

jackyalbo opened this issue Oct 22, 2020 · 4 comments
Labels

Comments

@jackyalbo
Copy link

As part of using both MD5 and SHA1 hashes in our project it seems that there is a difference in the Endianness between them: it seems that digest words for SHA1 are big-endian, while MD5 ones are little-endian.
Is that really the case? and if so, why? as we want to use the same code for both it caused it to fail constantly for SHA1

@jackyalbo
Copy link
Author

jackyalbo commented Oct 22, 2020

@gbtucker
Copy link
Contributor

Yes, sorry for the inconsistency but you are correct. Looking at the code in ssl_napi.c, does hashing always go through the submit_and_flush() function? If so, you may not be getting the possible throughput improvement if you can maintain multiple outstanding jobs. I only looked at the Hasher class members though.

@guymguym
Copy link

Hey @gbtucker
You're right - we still use a single buffer in our code.
See here for context #45 (comment)

@gbtucker
Copy link
Contributor

Oh, didn't realize they were linked. Let me know if I can help with multi-flight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants