-
Notifications
You must be signed in to change notification settings - Fork 2.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
Performance Enhancements and Memory Footprint Reduction in mbedtls_internal_sha(256|512)_process_c() #9542
Open
manoel-serafim
wants to merge
10
commits into
Mbed-TLS:development
Choose a base branch
from
manoel-serafim:development
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+191
−55
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
manoel-serafim
force-pushed
the
development
branch
from
September 5, 2024 02:55
a95953d
to
cb155f4
Compare
manoel-serafim
force-pushed
the
development
branch
from
September 12, 2024 23:53
849738e
to
d42125f
Compare
Hello @gilles-peskine-arm ! As we discussed in the issue referenced in this PR, I've completed benchmarking these changes on both x86-64 and ARMv8 (With Clang and gcc). I would be happy to share the results— Is there any preferred method for receiving them? |
Please just post them to GitHub. |
manoel-serafim
force-pushed
the
development
branch
from
September 13, 2024 10:57
9a8dab0
to
9b02889
Compare
…e inside the first 16 intermediate hash calculations Signed-off-by: Manoel Serafim <[email protected]>
…f MBEDTLS_SHA256_SMALLER Signed-off-by: Manoel Serafim <[email protected]>
… K, now we directly add to i and use it as a general index as it should be used Signed-off-by: Manoel Serafim <[email protected]>
…on is unrroled for performance, however continues in a loop when MBEDTLS_SHA256_SMALLER is defined Signed-off-by: Manoel Serafim <[email protected]>
…rolling one loop Signed-off-by: Manoel Serafim <[email protected]>
Signed-off-by: Manoel Serafim <[email protected]>
… sha512 also Signed-off-by: Manoel Serafim <[email protected]>
Signed-off-by: Manoel Serafim <[email protected]>
Signed-off-by: Manoel Serafim <[email protected]>
Signed-off-by: Manoel Serafim <[email protected]>
manoel-serafim
force-pushed
the
development
branch
from
September 13, 2024 20:19
f594ca6
to
8817a17
Compare
gilles-peskine-arm
added
needs-review
Every commit must be reviewed by at least two team members,
component-crypto
Crypto primitives and low-level interfaces
needs-reviewer
This PR needs someone to pick it up for review
size-s
Estimated task size: small (~2d)
priority-medium
Medium priority - this can be reviewed as time permits
labels
Oct 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component-crypto
Crypto primitives and low-level interfaces
needs-review
Every commit must be reviewed by at least two team members,
needs-reviewer
This PR needs someone to pick it up for review
priority-medium
Medium priority - this can be reviewed as time permits
size-s
Estimated task size: small (~2d)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR regards to performance and memory footprint improvements inside the compression functions of sha512.c and sha256.c.
This PR solves #9467 in the sense that it merges the word schedule and intermediate digest state loops. It also makes the code defined under MBEDTLS_SHA512_SMALLER even smaller and recicles operations inside the intermediate digest state loops.
PR checklist