openwall / openwall/john

PEM formats iteration count reporting

Open
#4,836 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Our pem and pem-opencl formats sometimes report double the actual PBKDF2 iteration count, considering (if I understand correctly) also the derived key length. I find this unexpected and confusing. Do we do this in any other formats? I don't recall seeing this before. If we don't, then this is also inconsistent. We might want to drop this adjustment of the reported iteration count, always reporting it as-is. (Incidentally, such adjustment would fit in with magnum's recently suggested addition of "overall cost" reporting - but we don't have that yet, and if/when we add that it'd be a separate figure.)

Introduced by @kholia in b749fabccc56a17c22a8060b153b38b1646a06e9.

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

Inspect the implementations of the pem and pem-opencl formats and the change introduced by commit b749fabccc56a17c22a8060b153b38b1646a06e9. Compare their reported PBKDF2 iteration counts with other formats, then verify that reporting uses the actual count consistently without incorporating derived key length.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cryptography, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.