[GH-ISSUE #1835] Some mask-mode formats don't handle "-test -mask" properly yet #1216

Closed
opened 2026-10-14 03:39:36 +07:00 by bsakaguchi · 11 comments
Owner

Originally created by @magnumripper on GitHub (Oct 15, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1835

Originally assigned to: @magnumripper, @sayan1an on GitHub.

At least DEScrypt and LM formats does not benchmark properly using -test -mask. I had a look but haven't been able to fix it (when I tried they started crashing).

I'm planning to change the MD4/5 and SHA1 formats to use shared auto-tune, hopefully they are no harder than NT or mscash which are already done and works just fine with mask benchmark.

Originally created by @magnumripper on GitHub (Oct 15, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1835 Originally assigned to: @magnumripper, @sayan1an on GitHub. At least DEScrypt and LM formats does not benchmark properly using `-test -mask`. I had a look but haven't been able to fix it (when I tried they started crashing). I'm planning to change the MD4/5 and SHA1 formats to use shared auto-tune, hopefully they are no harder than NT or mscash which are already done and works just fine with mask benchmark.
bsakaguchi 2026-10-14 03:39:36 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@magnumripper commented on GitHub (Oct 15, 2015):

@Sayantan2048 I am experimenting with a shared function that can build a struct db_main *fake_db from any format's test vectors. Would that not be a good thing for these formats? I reckon it would remove much special handling in the code?

<!-- gh-comment-id:148522811 --> @magnumripper commented on GitHub (Oct 15, 2015): @Sayantan2048 I am experimenting with a shared function that can build a `struct db_main *fake_db` from any format's test vectors. Would that not be a good thing for these formats? I reckon it would remove much special handling in the code?
Author
Owner

@magnumripper commented on GitHub (Oct 15, 2015):

See fake_db.diff for an early version. Seems to work fine but I have yet to try using it.

<!-- gh-comment-id:148524538 --> @magnumripper commented on GitHub (Oct 15, 2015): See [fake_db.diff](https://gist.github.com/magnumripper/48d96088ea84ce76bc79) for an early version. Seems to work fine but I have yet to try using it.
Author
Owner

@sayan1an commented on GitHub (Oct 18, 2015):

Yeah fake db would be awesome. It means I can eliminate test specific code. Regarding test mask - how are things handled during self-test when the session is for actual cracking with user specified mask? Is the default mask overruled with user specified mask ?

Also, I would be little less active for the next few days as it is festival season in my country. :)

<!-- gh-comment-id:148987302 --> @sayan1an commented on GitHub (Oct 18, 2015): Yeah fake db would be awesome. It means I can eliminate test specific code. Regarding test mask - how are things handled during self-test when the session is for actual cracking with user specified mask? Is the default mask overruled with user specified mask ? Also, I would be little less active for the next few days as it is festival season in my country. :)
Author
Owner

@magnumripper commented on GitHub (Oct 18, 2015):

Actual cracking is not affected by latest changes. And self-test currently never involves mask-mode anyway, only benchmark does.

The default mask from john.conf is used unless you specify one.

<!-- gh-comment-id:149004125 --> @magnumripper commented on GitHub (Oct 18, 2015): Actual cracking is not affected by latest changes. And self-test currently never involves mask-mode anyway, only benchmark does. The default mask from john.conf is used unless you specify one.
Author
Owner

@magnumripper commented on GitHub (Oct 18, 2015):

That function is added in df94976. We might have to tweak it but it seems to produce a valid db.

<!-- gh-comment-id:149004247 --> @magnumripper commented on GitHub (Oct 18, 2015): That function is added in df94976. We might have to tweak it but it seems to produce a valid db.
Author
Owner

@magnumripper commented on GitHub (Oct 18, 2015):

We probably also have to change most/all crypt_all(count, NULL) in format tests and benchmarks, to crypt_all(count, db->salts).

<!-- gh-comment-id:149054174 --> @magnumripper commented on GitHub (Oct 18, 2015): We probably also have to change most/all `crypt_all(count, NULL)` in format tests and benchmarks, to `crypt_all(count, db->salts)`.
Author
Owner

@magnumripper commented on GitHub (Oct 21, 2015):

http://www.openwall.com/lists/john-dev/2015/10/18/1

<!-- gh-comment-id:149956884 --> @magnumripper commented on GitHub (Oct 21, 2015): http://www.openwall.com/lists/john-dev/2015/10/18/1
Author
Owner

@magnumripper commented on GitHub (Oct 21, 2015):

Experiment topic branches, both seem to work fine (at least with nt-opencl)

Branch fakedb_core implement it in core, but only nt-opencl is modified (stripped from special code) accordingly. Other formats work fine too though, they just never use their special code.

Branch fakedb_format uses this in nt-opencl only. This still needed some core support so I doubt it's better in any way.

<!-- gh-comment-id:150018490 --> @magnumripper commented on GitHub (Oct 21, 2015): Experiment topic branches, both seem to work fine (at least with nt-opencl) Branch [fakedb_core](https://github.com/magnumripper/JohnTheRipper/commits/fakedb_core) implement it in core, but only nt-opencl is modified (stripped from special code) accordingly. Other formats work fine too though, they just never use their special code. Branch [fakedb_format](https://github.com/magnumripper/JohnTheRipper/commits/fakedb_format) uses this in nt-opencl only. This still needed some core support so I doubt it's better in any way.
Author
Owner

@magnumripper commented on GitHub (Oct 26, 2015):

Current (rebased and tweaked) fakedb_core branch fails real crack with nt-opencl for some reason. I'm investigating. Disregarding that problem I think this is the way ahead.

<!-- gh-comment-id:151303094 --> @magnumripper commented on GitHub (Oct 26, 2015): Current (rebased and tweaked) fakedb_core branch fails real crack with nt-opencl for some reason. I'm investigating. Disregarding that problem I think this is the way ahead.
Author
Owner

@magnumripper commented on GitHub (Oct 29, 2015):

Latest fakedb_core code (#1853) works fine. Special code for self-test dropped for NT and mscash. Maybe we should merge it but I'm still considering the alternatives.

<!-- gh-comment-id:152317397 --> @magnumripper commented on GitHub (Oct 29, 2015): Latest fakedb_core code (#1853) works fine. Special code for self-test dropped for NT and mscash. Maybe we should merge it but I'm still considering the alternatives.
Author
Owner

@magnumripper commented on GitHub (Dec 8, 2015):

@Sayantan2048 I merged the "fake db" branch now, I think we really need it. If you look at commits like e83f99f1 and 1c7b5dcdf you can see how much simpler it gets in the format.

<!-- gh-comment-id:162894285 --> @magnumripper commented on GitHub (Dec 8, 2015): @Sayantan2048 I merged the "fake db" branch now, I think we really need it. If you look at commits like e83f99f1 and 1c7b5dcdf you can see how much simpler it gets in the format.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1216
No description provided.