mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1712] keccak (sha3) do we have SIMD code? #1127
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#1127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jfoug on GitHub (Aug 27, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1712
Originally assigned to: @kholia on GitHub.
If not, then why do all of those raw formats list SIMD for the algorithm ?
@magnumripper commented on GitHub (Aug 27, 2015):
I thought they had their own SIMD (like Blake), supporting up to AVX (not AVX2), and not using our pseudo-intrinsics (so no Altivec/ARM NEON). But now that I look at Keccak files they seem to be totally lying about any and all SIMD support.
@jfoug commented on GitHub (Aug 27, 2015):
That is why I asked the question. It appears that there are only AVX/XOP define looking to make the strings listing that these are supported, but I saw NOTHING in code about SIMD usage.
Yes, it is lying to us, lol
@jfoug commented on GitHub (Aug 27, 2015):
Btw, I found this since I am adding SHA3 into dynamic. Without having SIMD, the code generated and put into dynamic_big_crypt.c is simpler
@magnumripper commented on GitHub (Aug 27, 2015):
See also #1216 (which was assuming there actually was some SIMD code in it)
@magnumripper commented on GitHub (Aug 27, 2015):
Note though that wherever @kholia got the code, I'm pretty sure there are SIMD versions too. So maybe we should fix this prior to you including it in dynamic?
@jfoug commented on GitHub (Aug 27, 2015):
It is easy to re-gen later, with SIMD. Well, possibly not, if it is not using our SIMD 'interface'. If it is a total stand alone interface, then it may have to be done outside of generated code.
@jfoug commented on GitHub (Aug 27, 2015):
With the recent changes to dyna, it really is only a few hours work to get a new hash installed. I am doing these:
SHA3-224
SHA3-256
SHA3-384
SHA3-512
KECCAK-256 (not sure these 2)
KECCAK-512 (are really useful)
I might look at SHAKE128 and SHAKE256 if they are applicable.
So far, the total change is a few lines in dynamic_big_crypt.cin (include and some defines), and 6 lines added to dynamic_big_crypt_generator.sh
@magnumripper commented on GitHub (Aug 28, 2015):
Dang, now that I'm so used to the Merkel Damgard buffer, how can I learn Keccak? Note to self: http://keccak.noekeon.org is a good page.
I wonder how Keccak will fit a GPU?
@magnumripper commented on GitHub (Aug 28, 2015):
SHA-3 is an instance of Keccak, right? Like "Keccak-f[1600]" or something like that. Is that it, or is it more to SHA-3?
@magnumripper commented on GitHub (Aug 28, 2015):
Apparently, PBKDF2-HMAC-SHA3 does not make sense. It will be just PBKDF2-SHA3.
@jfoug commented on GitHub (Aug 28, 2015):
This is the first non MD I have worked with either (other than encryption, des/aes, etc).
sha3 is simply keccak-512 but the block padding is a 6 vs a 1 (at least I think that is the only diff). I read up an hour or so on keccak last nite trying to figure shit out. I could not find ANY online calcs that would do SHA3 properly. They would always give me keccak-512 (or 256).
The only thing different about Keccak-512 and SHA3-512 is the call to keccak_init. One passes in a 1, one a 6.
Look at the top of dynamic_compiler. I have some macros. The init is quite a bit different than for a MD. For keccak, you pass in several other parameters that adjust the soak up and squeeze out rates (and sizes), and final bit sizes, etc. But things like the update are simply the same call for 'all' flavors.
Yes, I am not sure what we are doing on this one for SIMD. We may not be able to interleave the same way we do for MD's, I am not sure.