Skip to content
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

X86-64 AES-ni support #45

Open
5 of 6 tasks
mjmacleod opened this issue Sep 10, 2019 · 6 comments
Open
5 of 6 tasks

X86-64 AES-ni support #45

mjmacleod opened this issue Sep 10, 2019 · 6 comments
Labels
help wanted We lack either the expertise or time for this. Basically, "patches welcome". instruction-set-support Implementing new SIMD ISA extensions portably

Comments

@mjmacleod
Copy link

mjmacleod commented Sep 10, 2019

It would be nice if simde implemented support for AES, especially AES round as this particular part of AES is also used in a lot of hash algorithms etc.

Many x86 based CPUs support this via AES-ni; and a lot of armv8 cores implement it via 'crypto extensions'. For arm cpus that don't have neon its possible to make use of other neon intrinsics.

I've submitted a PR to sse2neon that implements _mm_aesenc_si128 which is the most important instruction - it might be nice to have this as a starting point DLTcollab/sse2neon#6

  • _mm_aesenc_si128
  • _mm_aesdec_si128
  • _mm_aesdeclast_si128
  • _mm_aesenclast_si128
  • _mm_aesimc_si128
  • _mm_aeskeygenassist_si128

Reference: https://software.intel.com/sites/landingpage/IntrinsicsGuide/#othertechs=AES

@nemequ nemequ added the instruction-set-support Implementing new SIMD ISA extensions portably label Oct 3, 2019
@nemequ
Copy link
Member

nemequ commented Oct 4, 2019

Thanks for the notification. I'm definitely interested in this, just not sure when I'll get around to it. Patches welcome, of course ☺

@mr-c mr-c added the help wanted We lack either the expertise or time for this. Basically, "patches welcome". label Mar 1, 2020
@lidh15
Copy link

lidh15 commented Jun 22, 2023

are we going to work on this after 4 years?

@mr-c
Copy link
Collaborator

mr-c commented Jun 22, 2023

Hello @lidh15 . As this is an open source community project, anyone is welcome to work on this feature. If you want to participate, I would be happy to assist you or anyone.

@lidh15
Copy link

lidh15 commented Jun 25, 2023

Hello @lidh15 . As this is an open source community project, anyone is welcome to work on this feature. If you want to participate, I would be happy to assist you or anyone.

I'm not an expert on this but what I found was that we could simply pick those APIs @mjmacleod contributed to sse2neon out and include them, they worked errorless with simde during compilation.
But the program reported segfault in runtime, so I think this solution is not a best practice.

@Vineg
Copy link
Contributor

Vineg commented Oct 9, 2023

May be useful: there is aesenc implementation that looks simple https://github.com/veorq/aesenc-noNI
And I've adapted code from https://github.com/dhuertas/AES to implement _mm_aesenc_si128 and _mm_aesdec_si128 methods here https://github.com/Vineg/software-aes-instructions

@mr-c
Copy link
Collaborator

mr-c commented Oct 9, 2023

@Vineg can you send a PR?

@mr-c mr-c changed the title AES support X86-64 AES-ni support Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We lack either the expertise or time for this. Basically, "patches welcome". instruction-set-support Implementing new SIMD ISA extensions portably
Projects
None yet
Development

No branches or pull requests

5 participants