openwall / openwall/john

Review global limit of PLAINTEXT_LENGTH for cache-line fitness

Open
#4,477 2 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

From some PR discussion (context is PLAINTEXT_LENGTH)
@solardiz: Maybe we should bump up that global limit to 127, requiring 130-byte buffers somewhere else, but exactly 128 bytes per key buffer in formats to fit caches better (when all tested passwords are short, we'd fully skip the cache lines corresponding to the second halves of those buffers, then).

Edit: I think we should also look into and reconsider why our maximum plaintext length is smaller than PLAINTEXT_BUFFER_SIZE by 3. I think it should be practical to avoid that. But let's discuss that separately from this PR.

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 tracing the definitions and uses of PLAINTEXT_LENGTH and PLAINTEXT_BUFFER_SIZE, then review the referenced PR discussion about cache-line fitness and buffer sizes. Done would require a settled decision on the global limit, the three-byte difference, and the resulting buffer requirements, followed by implementation and validation of the cache-related behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.