[GH-ISSUE #996] Add minimum length to format struct #596

Closed
opened 2026-10-14 03:14:44 +07:00 by bsakaguchi · 8 comments
Owner

Originally created by @magnumripper on GitHub (Jan 4, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/996

Originally assigned to: @magnumripper on GitHub.

Now that J1 is released we could do some struct changes that was deferred. One is adding plaintext_min_length to the format struct. Then we can get rid of the kludges in john.c that currently exist for WPAPSK and WoW.

BFEgg may need this set to 1, see #989

Originally created by @magnumripper on GitHub (Jan 4, 2015). Original GitHub issue: https://github.com/openwall/john/issues/996 Originally assigned to: @magnumripper on GitHub. Now that J1 is released we could do some struct changes that was deferred. One is adding plaintext_min_length to the format struct. Then we can get rid of the kludges in john.c that currently exist for WPAPSK and WoW. BFEgg may need this set to 1, see #989
bsakaguchi 2026-10-14 03:14:44 +07:00
Author
Owner

@frank-dittrich commented on GitHub (Jan 4, 2015):

Do we put the output of the min. length next to the max length output in llist=format-(all-)details, or do we put it close to the end, to reduce the risk of breaking some scripts users might have created?

<!-- gh-comment-id:68641578 --> @frank-dittrich commented on GitHub (Jan 4, 2015): Do we put the output of the min. length next to the max length output in llist=format-(all-)details, or do we put it close to the end, to reduce the risk of breaking some scripts users might have created?
Author
Owner

@jfoug commented on GitHub (Jan 4, 2015):

Could we 'borrow' some bits from Plaintext length, simply converting it into a union ?

Or do it with << and `>>``

<!-- gh-comment-id:68642810 --> @jfoug commented on GitHub (Jan 4, 2015): Could we 'borrow' some bits from Plaintext length, simply converting it into a union ? Or do it with `<<` and `>>``
Author
Owner

@jfoug commented on GitHub (Jan 4, 2015):

Once we add this, undo the hack for #989 (736c18d) along with hack logic for WoW and WPAPSK

<!-- gh-comment-id:68643103 --> @jfoug commented on GitHub (Jan 4, 2015): Once we add this, undo the hack for #989 (736c18d) along with hack logic for WoW and WPAPSK
Author
Owner

@magnumripper commented on GitHub (Jan 5, 2015):

Could we 'borrow' some bits from Plaintext length, simply converting it into a union ?

That would mean a whole lot more changes in core code... what's the upside?

Or do it with << and `>>``

I can't spot the difference?

<!-- gh-comment-id:68660106 --> @magnumripper commented on GitHub (Jan 5, 2015): > Could we 'borrow' some bits from Plaintext length, simply converting it into a union ? That would mean a whole lot more changes in core code... what's the upside? > Or do it with `<<` and `>>`` I can't spot the difference?
Author
Owner

@magnumripper commented on GitHub (Jan 6, 2015):

This is done. Regression testing now.

<!-- gh-comment-id:68898576 --> @magnumripper commented on GitHub (Jan 6, 2015): This is done. Regression testing now.
Author
Owner

@magnumripper commented on GitHub (Jan 6, 2015):

Fixed in a916df7. Before you ask, yes I considered adding #if FMT_MAIN_VERSION but opted not to. We do not have branches right now that make it worthwhile.

<!-- gh-comment-id:68939594 --> @magnumripper commented on GitHub (Jan 6, 2015): Fixed in a916df7. Before you ask, yes I considered adding `#if FMT_MAIN_VERSION` but opted not to. We do not have branches right now that make it worthwhile.
Author
Owner

@frank-dittrich commented on GitHub (Jan 6, 2015):

Should we cleanup all the existing #if FMT_MAIN_VERSION tests, may be after a j2 release?
Or mabe just the very old comparisons?

<!-- gh-comment-id:68944915 --> @frank-dittrich commented on GitHub (Jan 6, 2015): Should we cleanup all the existing `#if FMT_MAIN_VERSION` tests, may be after a j2 release? Or mabe just the very old comparisons?
Author
Owner

@magnumripper commented on GitHub (Jan 7, 2015):

I'm not sure. Parts of me did want to add ifdef's for this patch too.

Considering Solar's comments before J1 I doubt there will be a J2 any time soon. I will presume it might take a year or two. That's why I did not post-pone these fixes anymore.

<!-- gh-comment-id:68958239 --> @magnumripper commented on GitHub (Jan 7, 2015): I'm not sure. Parts of me did want to add ifdef's for this patch too. Considering Solar's comments before J1 I doubt there will be a J2 any time soon. I will presume it might take a year or two. That's why I did not post-pone these fixes anymore.
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#596
No description provided.