diff options
author | Daniel Schadt <kingdread@gmx.de> | 2025-04-10 19:34:07 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2025-04-10 19:34:07 +0200 |
commit | d77f4adf04f2878853d0919f908d1b110f3c94f2 (patch) | |
tree | 81d9ab0f9c1ba1bfb9ebe74d8f20362e47bad82b /Cargo.lock | |
parent | 2d2525f28aadcb149e085dbcc5fa421109457c54 (diff) | |
download | zears-d77f4adf04f2878853d0919f908d1b110f3c94f2.tar.gz zears-d77f4adf04f2878853d0919f908d1b110f3c94f2.tar.bz2 zears-d77f4adf04f2878853d0919f908d1b110f3c94f2.zip |
implement aes4 and aes10 with native instructions
Even though aes::hazmat::cipher_round uses aes-ni instructions under the
hood, simply loading the data (and the keys!) takes a significant amount
of time. Sadly, there's no way that aes exposes that lets you re-use the
"loaded" keys.
By implementing aes4/aes10 directly with _mm_aesenc, we can keep the
keys properly aligned.
We still keep the software backend as fallback, using the software
implementation of the aes crate.
This gives a ~70% speedup.
Diffstat (limited to 'Cargo.lock')
-rw-r--r-- | Cargo.lock | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -723,6 +723,7 @@ dependencies = [ "aes", "blake2", "constant_time_eq", + "cpufeatures", "criterion", "hex", ] |