[GH-ISSUE #1219] Add AVX2/AVX512 to Blake (perhaps changing to "our" pseudo-intrinsics) #763

Open
opened 2026-10-14 03:22:57 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @magnumripper on GitHub (Apr 23, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1219

This might become a GSoC task.

Originally created by @magnumripper on GitHub (Apr 23, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1219 This might become a GSoC task.
Author
Owner

@solardiz commented on GitHub (May 26, 2024):

We'll probably get an updated Blake2 implementation along with #2738, so this task would be wiring the format to use that.

<!-- gh-comment-id:2131890095 --> @solardiz commented on GitHub (May 26, 2024): We'll probably get an updated Blake2 implementation along with #2738, so this task would be wiring the format to use that.
Author
Owner

@solardiz commented on GitHub (Nov 5, 2024):

We'll probably get an updated Blake2 implementation along with https://github.com/openwall/john/issues/2738

No, we did not. That only gave us AVX512F-enabled BlaMka (which is specific to Argon2), not BLAKE2. Besides, for the separate BLAKE2 format(s), we want not a little use of wider vectors to compute one hash slightly faster, but rather parallel computation of multiple hashes. So we'd need our own implementation.

Separately or additionally (just to have in mind when we do anything on this, or to choose not to):

Right now we seem to only have a format for BLAKE2b. We could want to also have one for BLAKE2s.

We also seem to have in our tree scalar code for the older BLAKE-256, which we use only in the Monero format. This original BLAKE could also be its own format(s) (for other flavors of it too), and with SIMD.

Similarly, we could have BLAKE3 formats, also with SIMD.

However, there appears to be no demand for any of this. I don't recall why exactly @kholia added the existing raw-blake2 format - maybe we saw these BLAKE2b hashes in a contest (committed on January 1, 2013, so the contest must have been in 2012)? Without a specific reason, it may be unreasonable to put much more time into any raw-BLAKE* formats.

<!-- gh-comment-id:2455992088 --> @solardiz commented on GitHub (Nov 5, 2024): > We'll probably get an updated Blake2 implementation along with https://github.com/openwall/john/issues/2738 No, we did not. That only gave us AVX512F-enabled BlaMka (which is specific to Argon2), not BLAKE2. Besides, for the separate BLAKE2 format(s), we want not a little use of wider vectors to compute one hash slightly faster, but rather parallel computation of multiple hashes. So we'd need our own implementation. Separately or additionally (just to have in mind when we do anything on this, or to choose not to): Right now we seem to only have a format for BLAKE2b. We could want to also have one for BLAKE2s. We also seem to have in our tree scalar code for the older BLAKE-256, which we use only in the Monero format. This original BLAKE could also be its own format(s) (for other flavors of it too), and with SIMD. Similarly, we could have BLAKE3 formats, also with SIMD. However, there appears to be no demand for any of this. I don't recall why exactly @kholia added the existing `raw-blake2` format - maybe we saw these BLAKE2b hashes in a contest (committed on January 1, 2013, so the contest must have been in 2012)? Without a specific reason, it may be unreasonable to put much more time into any `raw-BLAKE*` formats.
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#763
No description provided.