Skip to content
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

libressl: add assembly for aarch64, ppc*, extra assembly for arm #23655

Merged
merged 1 commit into from
Jul 24, 2020

Conversation

q66
Copy link
Contributor

@q66 q66 commented Jul 19, 2020

This yields significant speedups (20x) in some things (AES/ghash) on platforms with hardware crypto support (e.g. POWER8 and newer, and most aarch64) as well as enhances performance of assorted alogrithms by using optimized assembly implementations instead of portable fallbacks. E.g. on aarch64 https://gist.githubusercontent.com/q66/c75a46fc7d0c27eff21cc9d70639bf95/raw/dde1f60e304ef8f4a4049d41388d9c25e63b4a1e/gistfile1.txt

As it is now, libressl only supports asm for x86(_64) and to a limited degree, 32-bit ARM. The extra support was added by my project: https://github.com/q66/libressl-portable-asm

Everything was tested, test suite passes on all platforms, and benchmarks were run on relevant hardware, confirming the speedups.

I still think we should move back to OpenSSL, since there are many reasons to do so (even disregarding performance) and the performance is still better on it (as there are various algos that don't have optimized implementations under libressl at all) but this could be a decent stopgap solution, enabling at least basic things (like hardware AES on non-x86 systems).

Tested:

  • ppc64le
  • ppc64
  • ppc
  • armv7l
  • aarch64

Benchmarked:

  • ppc64le
  • ppc64
  • ppc
  • armv7l
  • aarch64

@void-linux/pkg-committers

@q66 q66 force-pushed the lssl-asm branch 3 times, most recently from 41e6e86 to 4758ad6 Compare July 19, 2020 23:29
@ahesford
Copy link
Member

I have no opinion on the switch to OpenSSL, but reducing the cost to deferring that decision is an attractive option.

This yields significant speedups (20x) on platforms with hardware
crypto support (e.g. POWER8 and newer, and most aarch64) as well
as enhances performance of assorted alogrithms by using optimized
assembly implementations instead of portable fallbacks.

As it is now, libressl only supports asm for x86(_64) and to a
limited degree, 32-bit ARM.

Everything was tested, test suite passes on all platforms, and
benchmarks were run on relevant hardware, confirming the speedups.
@q66 q66 changed the title [RFC] libressl: add assembly for aarch64, ppc*, extra assembly for arm libressl: add assembly for aarch64, ppc*, extra assembly for arm Jul 23, 2020
@q66 q66 merged commit 842d41c into void-linux:master Jul 24, 2020
@q66 q66 deleted the lssl-asm branch September 20, 2020 01:59
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants