Make HMAC CPU formats use SIMD and OpenMP fully
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
I was surprised to find that our HMAC CPU formats use scalar hashing code in set_key even when building with SIMD. This also puts such code out of OpenMP parallel sections. We should probably replace this with equivalent functionality inside crypt_all, reached when new_keys is set (we already have some code only reached on new_keys in there, but we could move more code to there).
No wonder there's such a big difference between Many vs. Only one salt speeds for these formats. These changes should improve the Only one salt speed (as well as actual cracking with few different salts).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the HMAC CPU format implementations and compare the scalar setup in set_key with the existing new_keys path in crypt_all. Trace how these functions interact with SIMD builds and OpenMP sections; done means equivalent setup runs through crypt_all when new_keys is set and improves the Only one salt path without changing cracking behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cryptography, performance, security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100