openwall / openwall/john

Convert pbkdf2_*.h into proper functions and add *_ZEROS logic where possible

Open
#873 1 comment 0 reactions 0 assignees View on GitHub

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.

  1. create a proper .h file that defines the available functions
  2. create a .c file that has all these functions as globals.
  3. 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.
  4. modify any external .c files including this, where the function name would change. (such as pbkdf1, or the _efs variants)
  5. add any 'missing' pbkdf1_* functions to the hashes.
  6. Add any additional crypts (such as BF)
  7. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.