openwall / openwall/john

dynamic: compute min_keys_per_crypt on a per format basis

Open
#3,557 1 comment 0 reactions 1 assignee View on GitHub

@jfoug is already working on this.

Since Dec 23, 2018.

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

Description

The min_keys_per_crypt right now is global for all of dynamic. This change is a proposed change to the internal dynamic structure, to provide mechanism where each format will be able to set a 'proper' MIN_KEYS value. The min_keys should be the SIMD_xx * PARA_xx * (MD5_X2+1) value for the format.

so:

 md5($pass.$salt.md5($salt))    proper MIN_KEYS would be SIMD_COEF_32*SIMD_PARA_MD5*(MD5_X2+1)
 sha512($pass.$salt)    proper MIN_KEYS would be SIMD_COEF_64*SIMD_PARA_SHA512*(MD5_X2+1)

It will get more difficult for cases this like:
  SHA512($pass.sha256(md5($salt).sha1($pass)))
In this case, it will be (I think)
     LCM(  (SIMD_COEF_32*SIMD_PARA_MD5*(MD5_X2+1)),
           (SIMD_COEF_32*SIMD_PARA_SHA1*(MD5_X2+1)),
           (SIMD_COEF_32*SIMD_PARA_SHA256*(MD5_X2+1)),
           (SIMD_COEF_64*SIMD_PARA_SHA512*(MD5_X2+1)))

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.