openwall / openwall/john

Feature Request: Support for truncated hashes in DYNAMIC modes

Open
#4,065 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

It would be useful to have a standard function to call when creating a custom DYNAMIC mode that would allow truncating generated hashes, either before being further processed, or compared against the final target hash-list supplied by the user.

Reasons:

  1. This would be useful to generate 'vanity hashes', such as finding a hash that starts with '123456'.
  2. This would also be useful to quickly target malformed and weird/custom hash formats as they are encountered. An example of this was the original LinkedIn password dump where many of the Sha1 hashes had the first couple of bytes be 0. Note, in my head it would be up to the user to format the target hash list, (for example cutting off the leading 0's in the LinkedIn list), before running JtR against them. The DYNAMIC enhancement would just in this instance only check a reduced Sha1 hash against the target values.

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 reading the existing DYNAMIC mode entry points and how generated hashes are processed and compared with the user-supplied target hash list. Done means custom DYNAMIC modes can request truncation before further processing or final comparison, supporting vanity hashes and malformed or custom hash formats.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cryptography, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.