Uh oh!
There was an error while loading. Please reload this page.
Conversation
a1e14b5 to
b393f8bCompare| /// AES key expansion | ||
| #[inline] | ||
| pub fn expand_key<const N: usize>(key: &[u8; 16]) -> [[u8; 16]; N] { |
There was a problem hiding this comment.
Note: the implementation is using const generics. It's only using 1.51+ compatible features so far, and it's an internal implementation details, so I figured why not.
For comparison, the corresponding AES-NI implementation contains a lot of code duplication.
tarcieri
commented
May 14, 2021
Tests are confirmed passing on an Apple M1 |
0a8b89f to
15c5f1bCompareSome preliminary benchmarks on a M1 Mac Mini:
|
88f2a98 to
3eb1e34Compare465cca1 to
fc260d0Compareb3ec618 to
e5bcf77Comparetarcieri
commented
May 15, 2021
Removing WIP. I'd call this complete except for pipelining. It implements the following:
I will look at pipelining, with an eye on what improves performance on the M1 (since that's the most powerful ARMv8 I have access to). In the meantime I would love it if anyone could benchmark it on other 64-bit ARMv8 platforms. I'll leave this PR open for awhile to invite review. |
0e53607 to
9f81b5cComparetarcieri
commented
May 17, 2021
Implemented pipelining which operates 8-blocks-at-a-time. Saw some pretty nice performance gains on the Apple M1 (reaching nearly 10GB/sec on AES-128!) |
Adds a new nightly-only backend which uses ARMv8 Cryptography Extensions gated under the newly introduced `armv8` crate feature. Support is provided for AES-128, AES-192, and AES-256, with runtime CPU feature detection on Linux and macOS targets. These extensions are supported on both 32-bit and 64-bit ARM targets, however the current implementation is gated on `aarch64` (as that's the only architecture it's been tested on so far). However, it could be easily extended to 32-bit ARMv8 targets as well.
tarcieri
commented
May 17, 2021
Going to go ahead and land this. At this point I'd say it's the best tested of all of the backends. |
Adds a new backend which uses ARMv8 Cryptography Extensions. These are currently unstable so support is gated under a newly added
armv8crate feature.These extensions are supported on both 32-bit and 64-bit ARM targets, however the current implementation is gated on
aarch64(as that's the only architecture it's been tested on so far).Closes#10.