Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aesv8-gcm-armv8: De-interleave aes_gcm_{enc,dec}_kernel
Context: On AArch64 platforms without EOR3 (e.g. Graviton2), AWS-LC leverages the assembly kernels aes_gcm_enc_kernel and aes_gcm_dec_kernel for fast AES-GCM computations. These kernels are highly interleaved in consideration of instruction latencies, which drastically improves performance even on out of order cores like Graviton2. However, the interleaving also impedes an intuitive understanding of what is happening, and thereby hardens modification and verification efforts. To facilitate auditability and verification, this commit adds a separate source file which contains partially deinterleaved versions of the non-EOR3 AES-GCM assembly kernels. The interleaving is 'partial' in the sense that, within a control flow block, instructions are freely reordered, but not across control flow boundaries. In particular, software pipelining is still present in the de-interleaved versions. There is further potential for clarifying the de-interleaved code, for example by (a) the use of macros, or (b) de-interleaving across loop boundaries. Potential changes along those lines are left for future commits. The de-interleaved versions are provided in a separate file aesv8-gcm-armv8-deinterleaved.pl.
- Loading branch information