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

Backport 2.16: Reduce Stack usage of hkdf test function #2364

Conversation

RonEld
Copy link
Contributor

@RonEld RonEld commented Jan 17, 2019

Description

Backport of #2192 to mbedtls-2.16

Status

READY

Ron Eldor added 3 commits January 17, 2019 21:31
`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 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
hanno-becker
hanno-becker previously approved these changes Jan 28, 2019
Ron Eldor added 2 commits January 28, 2019 15:05
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.
@mpg
Copy link
Contributor

mpg commented Mar 1, 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!

@RonEld RonEld removed the needs-review Every commit must be reviewed by at least two team members, label Mar 6, 2019
@RonEld RonEld changed the title Backport2.16 hkdf test stack usage reduction Backport 2.16: Reduce Stack usage of hkdf test function Mar 11, 2019
@simonbutcher
Copy link
Contributor

Approved and passing all CI, so labelling as 'ready for merge'.

@simonbutcher simonbutcher added the approved Design and code approved - may be waiting for CI or backports label Apr 2, 2019
@Patater Patater merged commit da04b3b into Mbed-TLS:mbedtls-2.16 Apr 8, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants