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

aes: initial implementation of most aes instructions #1072

Merged
merged 7 commits into from Oct 13, 2023

Conversation

Vineg
Copy link
Contributor

@Vineg Vineg commented Oct 12, 2023

Hi!

Regarding issue #45

I've adapted AES encryption/decryption instructions using algorithm from this project https://github.com/dhuertas/AES
The code is straight forward with a very basic optimization using a lookup table for the most time consuming function.
The only modification I did to the original implementation is throwing away 90% of unused lookup table data, leaving only 2 KB of the initial 60 KB.

removed trailing whitespaces
commented unused variables
changed const variable to define
Copy link
Collaborator

@mr-c mr-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for this!

Will you be adding optimized implementations for non-x86 systems as well?

simde/x86/aes.h Outdated Show resolved Hide resolved
simde/x86/aes.h Outdated Show resolved Hide resolved
simde/x86/aes.h Outdated Show resolved Hide resolved
simde/x86/aes.h Outdated Show resolved Hide resolved
simde/x86/aes.h Outdated Show resolved Hide resolved
simde/x86/aes.h Show resolved Hide resolved
simde/x86/aes.h Show resolved Hide resolved
simde/x86/aes.h Show resolved Hide resolved
@mr-c
Copy link
Collaborator

mr-c commented Oct 12, 2023

Please also rebase upon https://github.com/simd-everywhere/simde/tree/master to get the latest changes. Having no file conflicts is necessary for the CI to run.

@mr-c
Copy link
Collaborator

mr-c commented Oct 12, 2023

simde/x86/aes.h Outdated Show resolved Hide resolved
removed semicolon from define
@mr-c
Copy link
Collaborator

mr-c commented Oct 12, 2023

Whoops, I should have said simde_x_, not _simde_ as the prefix

simde/x86/aes.h Outdated Show resolved Hide resolved
simde/x86/aes.h Outdated Show resolved Hide resolved
Co-authored-by: Michael R. Crusoe <1330696+mr-c@users.noreply.github.com>
test/x86/aes.c Outdated Show resolved Hide resolved
@Vineg
Copy link
Contributor Author

Vineg commented Oct 12, 2023

Michael, Thanks for review!

I am not going to add optimizations for other platforms. It is very interesting, but I don't currently have free time for it :)

@mr-c mr-c merged commit 8632391 into simd-everywhere:master Oct 13, 2023
79 of 81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants