Skip to content

Fix on target test issues #278

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

Merged
merged 7 commits into from
Oct 3, 2019

Conversation

RonEld
Copy link
Contributor

@RonEld RonEld commented Sep 24, 2019

Backport PR Mbed-TLS/mbedtls#2230 to mbed-crypto repository and add a commit from #162 to have the on target tests build and run

Ron Eldor added 6 commits September 24, 2019 11:21
Reduce the stack usage of the `test_suite_pk` by reducing the
size of the buffers used in the tests, to a reasonable big enough size.
Reduce the stack usage of the `test_suite_rsa` by reducing the
size of the buffers used in the tests, to a reasonable big enough size,
and change the data size to decrypt in the data file.
Reduce the stack usage of the `test_suite_pkcs1_v21` by reducing the
size of the buffers used in the tests, to a reasonable big enough size,
and change the size sent to the API to sizeof output.
Increase the test suite timeouit from 180 seconds, to 800 seconds,
since some tests consume more time, even if all tests are skipped.
Reduce the stack usage of the `test_suite_pkcs1_v15` by reducing the
size of the buffers used in the tests, to a reasonable big enough size.
The uint32 is given as a bigendian stream, in the tests, however,
the char buffer that collected the stream read it as is,
without converting it. Add a temporary buffer, to call `greentea_getc()`
8 times, and then put it in the correct endianity for input to `unhexify()`.
@RonEld
Copy link
Contributor Author

RonEld commented Sep 24, 2019

I believe CI failure will be fixed with Mbed-TLS/mbedtls#2858

Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me. One place we could add const, that's all.

};
assert( unhexify( &value, c ) != 8 );
return( (uint32_t)value );
uint8_t c_be[8] = { greentea_getc(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we need to drop const from c_be here? Could we put it back?

Copy link
Contributor

@dgreen-arm dgreen-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me, other than Patater's question

@Patater Patater added needs: backports Needs backports to Mbed TLS branches needs: work The pull request needs rework before it can be merged. labels Sep 25, 2019
Add const type that was accidently removed.
@RonEld RonEld added needs: review The pull request is ready for review. This generally means that it has no known issues. and removed needs: work The pull request needs rework before it can be merged. labels Sep 25, 2019
@RonEld
Copy link
Contributor Author

RonEld commented Sep 25, 2019

@Patater @dgreen-arm I have added the 'const' type. Please review

@Patater Patater added enhancement New feature or request needs: ci Needs a passing full CI run and removed needs: review The pull request is ready for review. This generally means that it has no known issues. labels Sep 25, 2019
@RonEld
Copy link
Contributor Author

RonEld commented Sep 25, 2019

Backported to the Mbed TLS repo in : Mbed-TLS/mbedtls#2864 and Mbed-TLS/mbedtls#2866 ( stack reduction changes only, as On Target Tests not available in mbedtls-2.7)

@Patater Patater removed needs: backports Needs backports to Mbed TLS branches needs: ci Needs a passing full CI run labels Oct 3, 2019
@Patater Patater merged commit e4209c0 into ARMmbed:development Oct 3, 2019
gilles-peskine-arm added a commit to Mbed-TLS/mbedtls that referenced this pull request Oct 8, 2019
Update crypto submodule:

* ARMmbed/mbed-crypto#277: Improve speed of PBKDF2 by caching the digest state of the passphras
* ARMmbed/mbed-crypto#269: Add PSA API versioning
* ARMmbed/mbed-crypto#278: Fix on target test issues
* ARMmbed/mbed-crypto#286: Fix defgroup syntax for API version section
* ARMmbed/mbed-crypto#75: ASN.1 tests without x509
@Patater Patater mentioned this pull request Oct 28, 2019
gilles-peskine-arm added a commit to gilles-peskine-arm/mbed-crypto that referenced this pull request Nov 15, 2019
* ARMmbed#277: Improve speed of PBKDF2 by caching the digest state of the passphrase
* ARMmbed#269: Add PSA API versioning
* ARMmbed#278: Fix on target test issues
* ARMmbed#286: Fix defgroup syntax for API version section
* ARMmbed#75: ASN.1 tests without x509
Patater pushed a commit that referenced this pull request Jan 15, 2020
…iming-side-channel

ECDSA timing side channel due to non-constant-time integer comparison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants