-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
crypto/aes: add dedicated asm version of AES, AES-GCM for ppc64 #18499
Comments
#18076 (AES for ppc64le) is related. |
This patch makes use of ppc64 VMX instructions to accelerate AES computation. There is a speed boost of over 5 times using these instructions. old ns/op new ns/op delta BenchmarkEncrypt-96 167 33.4 -80% BenchmarkDecrypt-96 173 32.7 -81.1% BenchmarkExpand-96 962 140 -85.45 old MB/s new MB/s speedup BenchmarkEncrypt-96 95.62 479.49 5.01x BenchmarkDecrypt-96 92.61 489.98 5.29x Fixes golang#18499
This patch makes use of ppc64 VMX instructions to accelerate AES computation. There is a speed boost of over 5 times using these instructions. old ns/op new ns/op delta BenchmarkEncrypt-96 167 33.4 -80% BenchmarkDecrypt-96 173 32.7 -81.1% BenchmarkExpand-96 962 140 -85.45 old MB/s new MB/s speedup BenchmarkEncrypt-96 95.62 479.49 5.01x BenchmarkDecrypt-96 92.61 489.98 5.29x Updates golang#18499
Change https://go.dev/cl/404395 mentions this issue: |
This does not enable GCM or CBC variants for ppc64, they require more work to support bi-endian. Updates #18499 Change-Id: Ic2bbe81c60107abc0a4803d8b9a833213286b1d0 Reviewed-on: https://go-review.googlesource.com/c/go/+/404395 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Paul Murphy <murp@ibm.com> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Filippo Valsorda <valsorda@google.com>
Change https://go.dev/cl/404795 mentions this issue: |
Change https://go.dev/cl/405134 mentions this issue: |
This adds the code to allow the gcm assembler code to work on big endian ppc64. Updates #18499 Change-Id: Iab1ffc9b8af38a0605a91f2621dd9f4a9397b945 Reviewed-on: https://go-review.googlesource.com/c/go/+/404795 Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Paul Murphy <murp@ibm.com> Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This reworks how we load/store vector registers using the new bi-endian P9 instruction emulation macros. This also removes quite a bit of asm used to align and reorder vector registers. This is also a slight improvement on P9 ppc64le/linux: name old speed new speed delta AESCBCEncrypt1K 936MB/s ± 0% 943MB/s ± 0% +0.80% AESCBCDecrypt1K 1.28GB/s ± 0% 1.37GB/s ± 0% +6.76% Updates #18499 Change-Id: Ic5ff71d217d7302b6ae4e8d877c25004bfda5ecd Reviewed-on: https://go-review.googlesource.com/c/go/+/405134 Run-TryBot: Paul Murphy <murp@ibm.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
We have added BE support to all PPC64 AES asm routines for the upcoming 1.19 release. I think this is complete now. |
Add a dedicated asm version of AES, AES-GCM for ppc64 - utilizing AES instructions (introduced in Power ISA 2.07) when available.
It should be noted that an asm accelerated version of this algorithm, utilizing AES-NI when available, exists for amd64.
The text was updated successfully, but these errors were encountered: