Re: [RFC PATCH 0/6] Introduce combined AES-GCM assembly for POWER9+

2021-04-05 Thread Christopher M. Riedl
On Mon Apr 5, 2021 at 2:39 AM CDT, Niels Möller wrote: > "Christopher M. Riedl" writes: > > > An implementation combining AES+GCM _can potentially_ yield significant > > performance boosts by allowing for increased instruction parallelism, > > avoiding > > C-function call overhead, more

Re: [S390x] Optimize AES modes

2021-04-05 Thread Maamoun TK
On Thu, Apr 1, 2021 at 12:01 AM Maamoun TK wrote: > I'll modify the patch of basic AES-128 optimized functions to be built on > top of the splitted aes functions. > Done! It works as a file-override basis. The patch also passes the testsuite and yields expected benchmark numbers. regards,

Re: Add AES Key Wrap (RFC 3394) in Nettle

2021-04-05 Thread Nicolas Mora
Hello, I've added test cases to verify that unwrap fail if the input values are incorrect [1]. I reuse all the unwrap test cases, changed one ciphertext byte and expect the unwrap function to return 0. Le 2021-03-29 à 13 h 32, Niels Möller a écrit : That's one possibility, but I think it

Re: [RFC PATCH 0/6] Introduce combined AES-GCM assembly for POWER9+

2021-04-05 Thread Niels Möller
"Christopher M. Riedl" writes: > An implementation combining AES+GCM _can potentially_ yield significant > performance boosts by allowing for increased instruction parallelism, avoiding > C-function call overhead, more flexibility in assembly fine-tuning, etc. This > series provides such an

[RFC PATCH 0/6] Introduce combined AES-GCM assembly for POWER9+

2021-04-05 Thread Christopher M. Riedl
Hi! This series introduces a mechanism to support arch specific, combined AES+GCM {en,de}cryption functions. These functions are stubbed by default and will fall-back to the separate hash and crypt functions if no arch override exists. The arch override can be provided either at build time via

[RFC PATCH 5/6] ppc: Add gcm_aes_decrypt() asm for ISA 3.0 (P9)

2021-04-05 Thread Christopher M. Riedl
This implementation is based on the existing, per-algorithm optimized powerpc64/p8/aes-encrypt-internal.asm and powerpc64/p8/gcm-hash.asm implementations by Niels Möller and Mamone Tarsha. See the previous gcm_aes_encrypt() commit for details about major changes. Signed-off-by: Christopher M.

[RFC PATCH 1/6] gcm: Introduce gcm_aes_{de,en}crypt()

2021-04-05 Thread Christopher M. Riedl
Currently the AES-GCM crypt and hash parts are performed in two separate functions. Each can be replaced with an arch-specific optimized assembly routine. This makes it difficult to introduce an arch-specific routine implementing the combination of both parts in a single function. Rework the

[RFC PATCH 4/6] ppc: Add gcm_aes_encrypt() asm for ISA 3.0 (P9)

2021-04-05 Thread Christopher M. Riedl
This implementation is based on the existing, per-algorithm optimized powerpc64/p8/aes-encrypt-internal.asm and powerpc64/p8/gcm-hash.asm implementations by Niels Möller and Mamone Tarsha. Significant changes: - Combine AES + GCM into a single function call which does up-to 8x unrolled AES

[RFC PATCH 6/6] ppc: Enable gcm_aes_{de,en}crypt() FAT

2021-04-05 Thread Christopher M. Riedl
Enable runtime override via FAT for gcm_aes_{de,en}crypt() on ppc ISA 3.0 (P9 and beyond) platforms. Signed-off-by: Christopher M. Riedl --- fat-ppc.c | 33 +++ fat-setup.h | 6 + gcm-internal.h| 14

[RFC PATCH 2/6] ppc: Fix variable name for --enable-power-altivec

2021-04-05 Thread Christopher M. Riedl
The AC_ARG_ENABLE(...) macro for --enable-power-altivec is called with enable_altivec=no as the default when the commandline option is not given to configure. However, the variable $enable_power_altivec is actually checked - not $enable_altivec. This doesn't matter in practice since

[RFC PATCH 3/6] ppc: Add FAT feature and config option for ISA 3.0

2021-04-05 Thread Christopher M. Riedl
Signed-off-by: Christopher M. Riedl --- configure.ac | 9 - fat-ppc.c| 12 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 253735a7..a0df0cc8 100644 --- a/configure.ac +++ b/configure.ac @@ -101,6 +101,10 @@