RustCrypto / RustCrypto/sponges
keccak: AVX2/AVX512 optimizations
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 56
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
I was looking through XKCP (eXtended Keccak Code Package, https://github.com/XKCP/XKCP) at what optimized implementations they have available.
I noticed they did have intrinsics-based implementations available for AVX2, but they compute e.g. Keccak-p1600 with 2, 4, or 8-way parallelism:
There also appears to be a non-parallel intrinsics implementation for AVX-512:
However, the non-parallel implementation for AVX2 is ASM-only:
See also the ARMv8 FEAT_SHA3 extensions: #93.
I'm not sure if this is because an intrinsics-based implementation doesn't make sense due to the need for a precisely designed register schedule, or because someone hasn't done the work yet to implement it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the referenced XKCP implementations: KeccakP-1600-times4-AVX2.c, KeccakP-1600-AVX512.c, and KeccakP-1600-AVX2.s. Compare them with the repository’s current Keccak implementation, then establish whether AVX2 and AVX512 support is practical; done requires a resolved implementation direction and corresponding optimization work or documented rationale.
Written by the indexing model from the issue text.
Assessment
- Domain
- cryptography, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100