-
Notifications
You must be signed in to change notification settings - Fork 833
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 RISC-V 64-bit ASM: ECB/CBC/CTR/GCM/CCM #7569
Conversation
retest this please |
@SparkiDev I've got a few RISC-V targets here now, so I will try this on actual HW. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./configure --enable-all --enable-riscv-asm
wolfcrypt/src/aes.c: In function '_AesXtsHelper':
wolfcrypt/src/aes.c:12631:16: error: implicit declaration of function '_AesEcbEncrypt'; did you mean 'wc_AesEcbEncrypt'? [-Werror=implicit-function-declaration]
12631 | return _AesEcbEncrypt(aes, out, out, totalSz);
| ^~~~~~~~~~~~~~
| wc_AesEcbEncrypt
wolfcrypt/src/aes.c:12631:16: error: nested extern declaration of '_AesEcbEncrypt' [-Werror=nested-externs]
wolfcrypt/src/aes.c:12634:16: error: implicit declaration of function '_AesEcbDecrypt'; did you mean 'wc_AesEcbDecrypt'? [-Werror=implicit-function-declaration]
12634 | return _AesEcbDecrypt(aes, out, out, totalSz);
| ^~~~~~~~~~~~~~
| wc_AesEcbDecrypt
wolfcrypt/src/aes.c:12634:16: error: nested extern declaration of '_AesEcbDecrypt' [-Werror=nested-externs]
HiFive Unleashed at 1.4GHz
On master
|
@SparkiDev says AES XTS is not yet support with RISC-V ASM. Note: I tried to use |
@SparkiDev is this RISC-V ASM PR ready for merge? I can’t tell if you are planning to push anything else to it. |
Add implementations of AES for ECB/CBC/CTR/GCM/CCM for RISC-V using assembly. Assembly with standard/scalar cryptography/vector cryptographt instructions.
Fixed --enable-all to work. |
retest this please |
Updated benchmarks: HiFive Unleashed at 1.4GHz
|
AES RISC-V 64-bit ASM: ECB/CBC/CTR/GCM/CCM
@dgarske - question on the benchmarks fix data size vs fixed time: In the
vs
Then for comparison your ran this for both:
The output on
The output on
Why the difference in fixed data size vs fixed time? Additionally, perhaps just nit-picky, but curious: it appears there was also difference in
vs
It appears that In any case - that's an astonishing performance boost by @SparkiDev :) |
The size of data processed is the number of 1048576 byte (=1MB) buffers encrypted/decrypted. I have no idea why the number of bits in SP changed though. |
Description
Add implementations of AES for ECB/CBC/CTR/GCM/CCM for RISC-V using assembly.
Assembly with standard/scalar cryptography/vector cryptographt instructions.
Testing
./configure --enable-all --enable-riscv-asm
Checklist