Convert pbkdf2_*.h into proper functions and add *_ZEROS logic where possible
Open
Nobody has claimed this yet.
enhancement
non-trivial
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Several issues here.
- create a proper .h file that defines the available functions
- create a .c file that has all these functions as globals.
- NOTE, there may be several versions for some hashes:
i.e. pbkdf2_hmac_sha256, pbkdf1_hmac_sha256, pbkdf2_hmac_sha256_efs would be available in the sha256 file.
These extra functions probably should be able to be done with #include of the code again, with a couple #defines. - modify any external .c files including this, where the function name would change. (such as pbkdf1, or the _efs variants)
- add any 'missing' pbkdf1_* functions to the hashes.
- Add any additional crypts (such as BF)
- add *ZEROS logic where we can. The *_ZEROS logic would be in the inner loop of the pbkdf2 run, where we KNOW a large part of the input data is null bytes.
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
Start by inventorying the existing pbkdf2_*.h files, their related hash files, and external .c files that include or call them. Map the existing PBKDF1, PBKDF2, _efs, and available crypt implementations before deciding the shared header and source boundaries. Done means global functions and declarations are organized, missing variants and applicable *_ZEROS paths are covered, and callers use the renamed functions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cryptography, security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100