openwall / openwall/john

Add a FMT_FALSE companying FMT_NOT_EXACT

Open
#4,483 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

There are two types of formats that can emit several candidates for one same hash: One example is CRC32, where each crack is correct so they're not false positives - any of them is correct. An example of the other type is DMG (at least in older code) which could emit actual false candidates - they will not work for opening that DMG file!

Current code has only the false positive formats setting FMT_NOT_EXACT (after a while of scope-creep from its original idea, because the two situations really should be separated). If you want more candidates from CRC32, just add --keep-guessing option.

We could want to add a FMT_FALSE flag that allows us to separate them, and describe this better. We'd replace all current FMT_NOT_EXACT with FMT_FALSE, and then use FMT_NOT_EXACT for CRC32 and the likes.

FMT_NOT_EXACT currently prints warnings like "Note: This format may emit false positives, so it will keep trying even after finding a possible candidate." or (using --no-keep-guessing) "Note: This format may emit false positives, but we will stop after finding first".

Having both flags, those existing messages should be for FMT_FALSE instead, while the new FMT_NOT_EXACT would be more like "Note: This format has more than one correct password for each hash, (...)"

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

Search the format flag definitions and every use of FMT_NOT_EXACT, then trace the warning strings and the --keep-guessing behavior. Separate false-candidate handling from formats with multiple valid candidates, update the messages and flag uses accordingly, and verify both option behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cryptography, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.