[GH-ISSUE #2922] SIMD enable on some formats building under BE #1845

Open
opened 2026-10-15 04:26:30 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @jfoug on GitHub (Nov 24, 2017).
Original GitHub issue: https://github.com/openwall/john/issues/2922

The prior BE porting project 'skipped' some formats. These simply have the SIMD disabled when building under a BE SIMD machine. This bug is to re-enable the SIMD logic so it works in these formats. NOTE, some of these are NOT trivial when it comes to SIMD usage, lol. Dynamic format is handled all in a separate bug #2892, but is 100% related to this one. But that beast is very ugly, and should be done with its own PR, since there will likely be hundreds of porting points in the code.

  • hdaa
  • sapb
  • sapg
  • saph (and utf8)
  • SunMD5
  • wpapsk
  • 7z (and utf8)
Originally created by @jfoug on GitHub (Nov 24, 2017). Original GitHub issue: https://github.com/openwall/john/issues/2922 The prior BE porting project 'skipped' some formats. These simply have the SIMD disabled when building under a BE SIMD machine. This bug is to re-enable the SIMD logic so it works in these formats. NOTE, some of these are NOT trivial when it comes to SIMD usage, lol. Dynamic format is handled all in a separate bug #2892, but is 100% related to this one. But that beast is very ugly, and should be done with its own PR, since there will likely be hundreds of porting points in the code. - [x] hdaa - [x] sapb - [x] sapg - [x] saph (and utf8) - [ ] SunMD5 - [x] wpapsk - [ ] 7z (and utf8)
Author
Owner

@jfoug commented on GitHub (Nov 28, 2017):

Got sapG done. NOTE, I see a LOT of performance improvement, on SIMD, doing sorted (by limb count) of the hashes within crypt_all (like done in cryptsha256 and others)

<!-- gh-comment-id:347690487 --> @jfoug commented on GitHub (Nov 28, 2017): Got sapG done. NOTE, I see a LOT of performance improvement, on SIMD, doing sorted (by limb count) of the hashes within crypt_all (like done in cryptsha256 and others)
Author
Owner

@jfoug commented on GitHub (Dec 14, 2017):

WPAPSK was fixed with simply removing the inline pbkdf2 shit, and using the proper header include.

<!-- gh-comment-id:351788191 --> @jfoug commented on GitHub (Dec 14, 2017): WPAPSK was fixed with simply removing the inline pbkdf2 shit, and using the proper header include.
Author
Owner

@jfoug commented on GitHub (Dec 15, 2017):

HDAA was a damn mess. I am creating a PR to redo the SIMD totally. That hash uses multiple SIMD limbs, of varying length. Also it was WAY over optimized (to do a lot of the raw2hex shit), and deref a LOT of stuff using 32 bit values. I think that format should be looked as as moving to the flat model, I think it would work as quick (OR QUICKER), and should have almost not BE porting code left in it.

An extra is it almost certainly will run faster. Right now, we spin through all hash items, plucking off the done ones as we go. BUT we could use hash re-arrangement logic (like is done in sha256crypt), get blocks of all the same limb count, then just SIMD burn through them.

BUT that will be for a later (rainy) day.

<!-- gh-comment-id:352095835 --> @jfoug commented on GitHub (Dec 15, 2017): HDAA was a damn mess. I am creating a PR to redo the SIMD totally. That hash uses multiple SIMD limbs, of varying length. Also it was WAY over optimized (to do a lot of the raw2hex shit), and deref a LOT of stuff using 32 bit values. I think that format should be looked as as moving to the flat model, I think it would work as quick (OR QUICKER), and should have almost not BE porting code left in it. An extra is it almost certainly will run faster. Right now, we spin through all hash items, plucking off the done ones as we go. BUT we could use hash re-arrangement logic (like is done in sha256crypt), get blocks of all the same limb count, then just SIMD burn through them. BUT that will be for a later (rainy) day.
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#1845
No description provided.