openwall / openwall/john

MGF_INPUT_XX_BYTE and offset for dynamic formats?

Open
#4,534 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I'm encountering some hashes of which the output is cut / truncated, sometimes at an offset (so not the first but the last bytes are used). Questions:

  • Is it possible to add e.g. MGF_INPUT_8_BYTE , MGF_INPUT_10_BYTE, MGF_INPUT_15_BYTE to the dynamic formats, similar to the current MGF_INPUT_20_BYTE?
  • It it possible to add a mechanism to use an offset e.g. MGF_INPUT_16_BYTE && MSG_INPUT_OFFSET_4_BYTE to use a 16 byte hash and match it with the final dynamic crypt[4:19] instead of [0:15]?

Thanks!

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 dynamic-format implementation and the existing MGF_INPUT_20_BYTE handling. Trace how dynamic formats select and compare digest bytes, then determine how support for additional lengths and an offset would fit; done means both requested forms work with matching truncated or offset hashes and have coverage for those cases.

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
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.