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

Split bignum tests and re-do in python framework #6274

Closed
tom-cosgrove-arm opened this issue Sep 12, 2022 · 2 comments · Fixed by #6399
Closed

Split bignum tests and re-do in python framework #6274

tom-cosgrove-arm opened this issue Sep 12, 2022 · 2 comments · Fixed by #6399
Assignees
Labels
component-crypto Crypto primitives and low-level interfaces enhancement size-m Estimated task size: medium (~1w)

Comments

@tom-cosgrove-arm
Copy link
Contributor

tom-cosgrove-arm commented Sep 12, 2022

A couple of significant changes need to be made to the bignum tests:

  • The tests for bignum functions should be split into test cases by module (e.g. bignum_core, bignum_mod_raw, etc).
  • Whenever possible, test cases should be generated automatically.

We have a PR for Python code to generate the test cases. Once it is merged, the split can be performed, and the test cases for at least the following bignum functions should be revisited:

  • mbedtls_mpi_core_add_if()
  • mbedtls_mpi_core_sub()
  • mbedtls_mpi_core_mla()
  • mbedtls_mpi_core_montmul()
@tom-cosgrove-arm tom-cosgrove-arm added component-crypto Crypto primitives and low-level interfaces enhancement labels Sep 12, 2022
@tom-cosgrove-arm tom-cosgrove-arm changed the title Re-do bignum tests in python framework Split bignum tests and re-do in python framework Sep 13, 2022
@tom-cosgrove-arm tom-cosgrove-arm added the size-m Estimated task size: medium (~1w) label Sep 13, 2022
@yanesca
Copy link
Contributor

yanesca commented Sep 26, 2022

#6083 might be merged with some reservations regarding the test cases. The hope is that having automated test case generation in python will make them easier to review.

Either way, as part of this task, the test cases for #6083 need to be reviewed with full scrutiny, like they were newly added here.

Never mind, Gilles raised a separate issue for this (#6371).

@yanesca
Copy link
Contributor

yanesca commented Sep 29, 2022

These tests were generated and the scripts and the approach can be found in these commit messages: 0cc7865 2a65b85 659c84a f334d96

The tests might have changed at later commits, but the generating principles and steps are a good starting point.

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 enhancement size-m Estimated task size: medium (~1w)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants