Use VPERMB _mm512_permutexvar_epi8 for DES and/or Lotus
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
This is another recent instruction introduced in Intel Cannon Lake (9th gen, but not all) and above (consistently since Ice Lake, 10th gen) through the VBMI extension on top of AVX-512. It appears to perform a mapping that's just right for one DES S-box, 64 times in parallel. So a non-bitslice DES implementation using this instruction may outperform bitslice.
__m512i _mm512_permutexvar_epi8 (__m512i idx, __m512i a)
#include <immintrin.h>
Instruction: vpermb zmm, zmm, zmm
CPUID Flags: AVX512_VBMI
Description
Shuffle 8-bit integers in a across lanes using the corresponding index in idx, and store the results in dst.
Operation
FOR j := 0 to 63
i := j*8
id := idx[i+5:i]*8
dst[i+7:i] := a[id+7:id]
ENDFOR
dst[MAX:512] := 0
Contributor guide
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 locating the DES and Lotus implementations and their existing SIMD or bitslice paths. Read the linked Intel documentation for _mm512_permutexvar_epi8 and check the AVX512_VBMI requirements; the work is done when the proposed approach is evaluated for those cipher paths, including whether it improves performance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cryptography, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100