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

ECP: Add Unit Tests for secp256k1 #7427

Conversation

minosgalanakis
Copy link
Contributor

@minosgalanakis minosgalanakis commented Apr 11, 2023

Description

Resolves #7258

Gatekeeper checklist

  • changelog not required. Extending testing coverage, does not affect library's behaviour
  • backport not required. This is worked required by a newly developped interface
  • tests provided,.

@minosgalanakis minosgalanakis added enhancement needs-review Every commit must be reviewed by at least two team members, needs-ci Needs to pass CI tests needs-preceding-pr Requires another PR to be merged first needs-reviewer This PR needs someone to pick it up for review size-s Estimated task size: small (~2d) component-test Test framework and CI scripts labels Apr 11, 2023
@yanesca
Copy link
Contributor

yanesca commented Apr 17, 2023

@minosgalanakis this is a deliverable for this quarter, it should have a priority-high label, could you please add it?

@minosgalanakis minosgalanakis added the priority-high High priority - will be reviewed soon label Apr 17, 2023
@minosgalanakis minosgalanakis force-pushed the ecp/7258_ecp_mod_p256K1_add_test_cases branch from 94db26c to f2568ca Compare April 18, 2023 13:15
@minosgalanakis
Copy link
Contributor Author

As before it is based on PR #7425 . Please review only last 3 commits if need to.

It will rebased after #7425 has been merged.

@minosgalanakis minosgalanakis force-pushed the ecp/7258_ecp_mod_p256K1_add_test_cases branch from f2568ca to 410a061 Compare April 21, 2023 10:54
@minosgalanakis minosgalanakis removed the needs-preceding-pr Requires another PR to be merged first label Apr 21, 2023
@minosgalanakis
Copy link
Contributor Author

PR Rebased on latest development. Ready to review

Copy link
Member

@paul-elliott-arm paul-elliott-arm left a comment

Choose a reason for hiding this comment

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

1 thing jumped out. Everything else looks ok, but need to do a slightly deeper pass.

@@ -4618,6 +4618,8 @@ int mbedtls_ecp_mod_p224k1(mbedtls_mpi *);
#endif
#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED)
static int ecp_mod_p256k1(mbedtls_mpi *);
MBEDTLS_STATIC_TESTABLE
int ecp_mod_p256k1(mbedtls_mpi *);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be:

Suggested change
int ecp_mod_p256k1(mbedtls_mpi *);
int mbedtls_ecp_mod_p256k1(mbedtls_mpi *);

@minosgalanakis minosgalanakis force-pushed the ecp/7258_ecp_mod_p256K1_add_test_cases branch from 410a061 to afca0d5 Compare April 24, 2023 11:16
@daverodgman daverodgman removed the needs-ci Needs to pass CI tests label Apr 24, 2023
Copy link
Contributor

@gabor-mezei-arm gabor-mezei-arm left a comment

Choose a reason for hiding this comment

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

Only a minor non-blocking issue found otherwise looks good to me.

@gabor-mezei-arm gabor-mezei-arm removed the needs-reviewer This PR needs someone to pick it up for review label Apr 25, 2023
This patch introduces basic unit-testing for the `ecp_mod_p256k1()`.

The method is exposed through the ecp_invasive interface, and
the standard testing data is being provided by the python framework.

Signed-off-by: Minos Galanakis <[email protected]>
Copy link
Contributor

@gabor-mezei-arm gabor-mezei-arm left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@paul-elliott-arm paul-elliott-arm left a comment

Choose a reason for hiding this comment

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

LGTM

@paul-elliott-arm paul-elliott-arm added approved Design and code approved - may be waiting for CI or backports needs-ci Needs to pass CI tests labels Apr 25, 2023
@minosgalanakis minosgalanakis removed the needs-ci Needs to pass CI tests label Apr 25, 2023
@yanesca yanesca merged commit 91a6183 into Mbed-TLS:development Apr 26, 2023
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 component-test Test framework and CI scripts enhancement needs-review Every commit must be reviewed by at least two team members, priority-high High priority - will be reviewed soon size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add unit tests for ecp_mod_p256k1()
5 participants