-
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
Backport 2.16: Reduce Stack usage of hkdf test function #2364
Merged
Patater
merged 6 commits into
Mbed-TLS:mbedtls-2.16
from
RonEld:Backport2.16_hkdf_test_stack_usage_reduction
Apr 8, 2019
Merged
Backport 2.16: Reduce Stack usage of hkdf test function #2364
Patater
merged 6 commits into
Mbed-TLS:mbedtls-2.16
from
RonEld:Backport2.16_hkdf_test_stack_usage_reduction
Apr 8, 2019
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
`test_hkdf` in the hkdf test suites consumed stack of ~6KB with 6 buffers of ~1KB each. This causes stack overflow on some platforms with smaller stack. The buffer sizes were reduced. By testing, the sizes can be reduced even further, as the largest seen size is 82 bytes(for okm).
Reduce the buffer size of okm to 128, to reduce stack usage.
Add ChangeLog entry describing the fix.
RonEld
added
bug
mbed TLS team
needs-review
Every commit must be reviewed by at least two team members,
component-crypto
Crypto primitives and low-level interfaces
labels
Jan 17, 2019
4 tasks
hanno-becker
previously approved these changes
Jan 28, 2019
Add explanation for why the size of `okm_string` buffer is twice as `okm` buffer.
1. Fix comment grammar. 2. Rename `okm_string` to `okm_hex`.
Add an additional byte for the `okm_hex` buffer, to assure it is null-terminated in case `okm` is 128 bytes long.
andresag01
approved these changes
Feb 13, 2019
@hanno-arm could you review the last commits since your previous review? or @AndrzejKurek could you review it? (Please coordinate to avoid duplicated work!) This second review is the last thing holding back this backport and its parent PR. Thanks! |
AndrzejKurek
approved these changes
Mar 1, 2019
RonEld
removed
the
needs-review
Every commit must be reviewed by at least two team members,
label
Mar 6, 2019
RonEld
changed the title
Backport2.16 hkdf test stack usage reduction
Backport 2.16: Reduce Stack usage of hkdf test function
Mar 11, 2019
Approved and passing all CI, so labelling as 'ready for merge'. |
simonbutcher
added
the
approved
Design and code approved - may be waiting for CI or backports
label
Apr 2, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
approved
Design and code approved - may be waiting for CI or backports
bug
component-crypto
Crypto primitives and low-level interfaces
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
Backport of #2192 to
mbedtls-2.16
Status
READY