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

sha + chacha: Move AArch64/X86-64 dispatching to C. #1625

Merged
merged 4 commits into from
Jul 29, 2024

Conversation

justsmth
Copy link
Contributor

@justsmth justsmth commented Jun 6, 2024

Upstream Commits:

Take a step towards removing all dispatching logic from assembly for AArch64 and X86-64.

Change-Id: I1c965012e81837ff228c810d54e730c525cad54f
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/64208
Reviewed-by: Bob Beck bbe@google.com
Commit-Queue: David Benjamin davidben@google.com
Reviewed-by: David Benjamin davidben@google.com

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@codecov-commenter
Copy link

codecov-commenter commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 66.33663% with 34 lines in your changes missing coverage. Please review.

Project coverage is 78.34%. Comparing base (916b3d1) to head (9f17d95).

Files Patch % Lines
crypto/fipsmodule/sha/sha_test.cc 40.90% 5 Missing and 8 partials ⚠️
crypto/fipsmodule/sha/sha1.c 40.00% 9 Missing ⚠️
crypto/fipsmodule/sha/sha256.c 50.00% 6 Missing ⚠️
crypto/chacha/chacha.c 55.55% 4 Missing ⚠️
crypto/fipsmodule/sha/sha512.c 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1625      +/-   ##
==========================================
- Coverage   78.35%   78.34%   -0.02%     
==========================================
  Files         573      575       +2     
  Lines       96123    96213      +90     
  Branches    13780    13807      +27     
==========================================
+ Hits        75318    75378      +60     
- Misses      20200    20221      +21     
- Partials      605      614       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@justsmth justsmth force-pushed the upstream-sha-asm branch 4 times, most recently from f0882e2 to 9cad985 Compare June 7, 2024 21:58
@justsmth justsmth requested review from torben-hansen and nebeid June 7, 2024 21:58
@justsmth justsmth force-pushed the upstream-sha-asm branch 5 times, most recently from 4ed6b05 to 5baec02 Compare June 14, 2024 12:29
@justsmth justsmth changed the title [DRAFT] sha: Move AArch64/X86-64 dispatching to C. sha: Move AArch64/X86-64 dispatching to C. Jun 14, 2024
@justsmth justsmth marked this pull request as ready for review June 14, 2024 17:05
@justsmth justsmth requested a review from a team as a code owner June 14, 2024 17:05
@justsmth justsmth force-pushed the upstream-sha-asm branch 2 times, most recently from 14ab57e to 732f161 Compare June 18, 2024 16:54
@justsmth justsmth force-pushed the upstream-sha-asm branch 2 times, most recently from df91ba2 to 01d588f Compare June 20, 2024 11:54
crypto/fipsmodule/cpucap/internal.h Show resolved Hide resolved
crypto/fipsmodule/cpucap/internal.h Outdated Show resolved Hide resolved
crypto/fipsmodule/sha/asm/sha1-x86_64.pl Show resolved Hide resolved
crypto/fipsmodule/sha/asm/sha1-x86_64.pl Show resolved Hide resolved
crypto/fipsmodule/sha/asm/sha1-x86_64.pl Show resolved Hide resolved
crypto/fipsmodule/sha/asm/sha512-x86_64.pl Show resolved Hide resolved
crypto/fipsmodule/sha/asm/sha512-x86_64.pl Show resolved Hide resolved
crypto/fipsmodule/sha/sha1.c Show resolved Hide resolved
crypto/fipsmodule/sha/sha1.c Outdated Show resolved Hide resolved
crypto/fipsmodule/sha/sha_test.cc Show resolved Hide resolved
@justsmth justsmth force-pushed the upstream-sha-asm branch 3 times, most recently from 666dc7e to 6294daa Compare June 20, 2024 22:20
nebeid
nebeid previously approved these changes Jun 21, 2024
@justsmth justsmth marked this pull request as draft June 21, 2024 16:31
@justsmth
Copy link
Contributor Author

PR for reverting a commit that this depends on: #1656

@nebeid
Copy link
Contributor

nebeid commented Jun 25, 2024

This PR can include the skipped commit google/boringssl@f5e0c8f (in upstream merge 2024-06-24). The commit including conflict resolution is in the attached file.
chacha-move-dispatch-bsslf5e0c8f.patch
We can add to the commits or the PR description that changes to crypto/internal.h upstream are made in crypto/fipsmodule/cpucap/internal.h in aws-lc.

@justsmth justsmth changed the title sha: Move AArch64/X86-64 dispatching to C. [DRAFT] sha: Move AArch64/X86-64 dispatching to C. Jul 11, 2024
@justsmth justsmth force-pushed the upstream-sha-asm branch 4 times, most recently from 1c70eac to 698d953 Compare July 12, 2024 17:14
@justsmth justsmth changed the title [DRAFT] sha: Move AArch64/X86-64 dispatching to C. sha: Move AArch64/X86-64 dispatching to C. Jul 12, 2024
@justsmth justsmth marked this pull request as ready for review July 12, 2024 19:30
@justsmth justsmth requested review from nebeid and dkostic July 19, 2024 19:11
nebeid
nebeid previously approved these changes Jul 19, 2024
@justsmth justsmth changed the title sha: Move AArch64/X86-64 dispatching to C. sha + chacha: Move AArch64/X86-64 dispatching to C. Jul 19, 2024
briansmith and others added 4 commits July 29, 2024 07:51
Take a step towards removing all dispatching logic from assembly
for AArch64 and X86-64.

Change-Id: I1c965012e81837ff228c810d54e730c525cad54f
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/64208
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
The x86-64 and x86 code both have 4x and 1x SSSE3 code paths. Only
the x86-64 version is modified here.

(For 32-bit x86, it looks like it would be much harder to separate
the 1x and 4x code paths into separate functions and there's
little motivation to do so. So it is likely that 32-bit x86 would
define |CHACHA20_ASM_SSSE3| without |CHACHA20_ASM_SSSE3_4X|.)

Bug: 673
Change-Id: I48a3fb8a2c6eb05a33c5ef20efff7ed000e51d71
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/64467
Reviewed-by: Bob Beck <bbe@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
@justsmth justsmth enabled auto-merge July 29, 2024 19:47
@justsmth justsmth merged commit b5a6227 into aws:main Jul 29, 2024
104 of 106 checks passed
@justsmth justsmth deleted the upstream-sha-asm branch July 29, 2024 20:03
skmcgrail added a commit that referenced this pull request Aug 1, 2024
## What's Changed
* Added options to x509 tool by @ecdeye in
#1696
* Add support to detect Neoverse V2 cores by @andrewhop in
#1706
* Move OCSP functions for Ruby out of internal.h by @samuel40791765 in
#1704
* Add aes-256-xts to EVP_get_cipherbyname by @torben-hansen in
#1707
* Match using CMAKE_SYSTEM_PROCESSOR_LOWER by @justsmth in
#1709
* Update MySQL to 9.0.0 by @skmcgrail in
#1685
* [EC] Unify scalar multiplication for P-256/384/521 by @dkostic in
#1693
* Adds const qualifier to ciphertext parameter in EVP_PKEY_decapsulate
by @maddeleine in #1713
* Upstream merge 2024 06 24 by @nebeid in
#1661
* NIST SP 800-108r1-upd1: KDF Counter Implementation by @skmcgrail in
#1644
* Upstream merge 2024 07 09 by @nebeid in
#1694
* Design for support of HMAC precomputed keys by @fabrice102 in
#1574
* Fix for select point from table in ec_nistp scalar_mul by @dkostic in
#1719
* X509toolcomparison by @ecdeye in
#1714
* AWS-LC s2n-bignum update 2024-07-22 by @dkostic in
#1718
* Add OpenVPN to CI by @smittals2 in
#1705
* Lower required Go version, add CI test for specific version by
@andrewhop in #1717
* ec2-test-framework enhancements and graviton 4 testing by
@samuel40791765 in #1715
* sha + chacha: Move AArch64/X86-64 dispatching to C. by @justsmth in
#1625
* Show number of pruned ec2 instances in dashboard by @samuel40791765 in
#1728
* rsa and md5 tools by @ecdeye in
#1722
* FIPS 203 IPD update: ML-KEM-IPD-768 and ML-KEM-IPD-1024 by @jakemas in
#1724
* bump mysql CI to 9.0.1 by @samuel40791765 in
#1727
* Support utility OCSP request functions by @samuel40791765 in
#1708
* add support for OCSP_SINGLERESP functions by @samuel40791765 in
#1703
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants