RustCrypto / RustCrypto/universal-hashes

polyval: AVX-512 support

Open
#320 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue help wanted
Dominant language
Rust
Stars
39
Forks
23
Avg merge
1h 57m
Merged PRs (30d)
2

Description

Following up from #184

We currently perform CLMUL with XMM registers, but we could use YMM with _mm256_clmulepi64_epi128, or ZMM with _mm512_clmulepi64_epi128. The latter would provide 1 CLMUL-per-block processing (amortized over 4 blocks processed in parallel).

It seems like these instructions are both available on the same families of CPUs, so it seems like if we add an additional backend, it should probably be AVX-512.

It could perhaps be cfg gated like in the aes crate, both to preserve MSRV and to give us time to decide if it's actually a good idea.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing CLMUL implementation and the related discussion in #184. Compare the XMM approach with the _mm256_clmulepi64_epi128 and _mm512_clmulepi64_epi128 instructions, and inspect how the aes crate uses cfg gating. Done means an AVX-512 backend is implemented with MSRV compatibility and its performance and suitability are evaluated.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cryptography, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.