openwall / openwall/john

Use a modern fast hash

Open
#4,350 15 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement RFC / discussion
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

We might want to get a modern fast hash function like t1ha into the tree and use it throughout the codebase, including in "unique". The current 2-characters-at-a-time hash function that we use in a few places including "unique" is probably not the fastest we can have with decent properties on modern CPUs. https://github.com/erthink/t1ha

Stretch goal: use a keyed hash with a key randomly generated at startup to make JtR immune to hashDoS. Would probably have slight performance impact at least on reading the key from a global variable each time a hash is computed?

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 locating the current 2-characters-at-a-time hash implementation and its uses, including "unique". Review the linked t1ha project and assess how it fits the supported CPUs and build targets. Done means a modern fast hash is used throughout the identified code paths; the keyed hash is only a stretch goal.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
performance
Issue type
Feature
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.