forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
crypto: add dispatcher and implement hardware acceleration for Echo512 and Shavite512, improve benchmark stability #6852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
830928c
bench: set minimum epoch iterations to improve `pow_hash` stability
kwvg c4e7a40
fix: suppress unaligned memory UBSan warnings if supported by arch
kwvg 7e8607e
refactor: remove large footprint Echo512 impl, switch to C++
kwvg 386742b
refactor: remove large footprint Shavite512 impl, switch to C++
kwvg 20fc998
refactor: move software AES round to header
kwvg d6d3518
crypto: replace hardcoded AES transform tables with constexpr tables
kwvg cba39c5
const: use function pointer to allow for switching implementation
kwvg 1f2eb21
crypto: implement naive AES-NI backend for simple rounds
kwvg 31a6732
crypto: implement AES-NI backend for Echo512's `FullStateRound()`
kwvg da38871
crypto: implement SSSE3 backend for Echo512's `MixColumns()`
kwvg 71d6ef9
crypto: implement SSSE3 backend for Echo512's `ShiftRows()`
kwvg 250dcce
crypto: combine Echo512's Shift and Mix operations
kwvg e1bbec4
crypto: avoid extra load/store in Echo512's `ShiftAndMix()`
kwvg f2ececc
crypto: implement AES-NI backend for Shavite512's `CompressElement()`
kwvg 76bd236
crypto: implement naive ARM AES backend for simple rounds
kwvg 959c9ee
crypto: implement ARM AES backend for Echo512's `FullStateRound()`
kwvg 963215b
crypto: implement ARM AES backend for Shavite512's `CompressElement()`
kwvg fa68c70
crypto: implement ARM NEON backend for Echo512's `ShiftAndMix()`
kwvg 31f93ad
crypto: unroll Echo512's `FullStateRound()`
kwvg d131fcc
crypto: implement Shavite512's full `Compress()` routine
kwvg 005967b
crypto: drop naive AES backends
kwvg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
🧩 Analysis chain
Compound preprocessor definition needs attention.
The X86 AES-NI module defines both ENABLE_SSE41 and ENABLE_X86_AESNI, indicating a dependency on SSE4.1 for the AES-NI implementation. This is architecturally correct as AES-NI requires SSE4.1, but ensure this dependency is documented.
🏁 Script executed:
Length of output: 227
🏁 Script executed:
Length of output: 7068
Document SSE4.1 dependency for AES-NI support
Configure.ac correctly checks for SSE4.1 intrinsics before enabling AES-NI (AX_CHECK_COMPILE_FLAG for -msse4.1 then AES-NI check with -msse4.1 -maes), but I found no mention of this requirement in INSTALL or README. Add a note that building with AES-NI support requires SSE4.1 (compiler and hardware support).
🤖 Prompt for AI Agents