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

Check remaning dependencies on ECP in PK module #7465

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

valeriosetti
Copy link
Contributor

@valeriosetti valeriosetti commented Apr 20, 2023

This is the 3rd step of #7460
Resolves #7460 (partially)
Requires #7463

Gatekeeper checklist

  • changelog not required - internal script
  • backport not required - internal script
  • tests not required - internal script

@valeriosetti
Copy link
Contributor Author

valeriosetti commented Apr 20, 2023

Reply to this comment
Good idea! I forgot about the syms.sh script, but here it should work quite good. I just started this PR with a proposal for an improvement of this script which can be helpful for what we are going to analyze here.

Using that script, here's what I found:

./docs/architecture/psa-migration/syms.sh full pk pkparse pkwrite
cat full-*-external | grep mbedtls_ecp | sort -u

mbedtls_ecp_check_privkey
mbedtls_ecp_check_pubkey
mbedtls_ecp_group_free
mbedtls_ecp_group_init
mbedtls_ecp_group_load
mbedtls_ecp_grp_id_list
mbedtls_ecp_keypair_free
mbedtls_ecp_point_free
mbedtls_ecp_point_read_binary
mbedtls_ecp_point_write_binary
mbedtls_ecp_restart_is_enabled
mbedtls_ecp_write_key

I opened the PR as draft just to give @mpg some ideas of what is still missing and should be addressed by this PR.

@valeriosetti valeriosetti self-assigned this Apr 20, 2023
@valeriosetti valeriosetti added needs-ci Needs to pass CI tests needs-preceding-pr Requires another PR to be merged first size-s Estimated task size: small (~2d) priority-high High priority - will be reviewed soon labels Apr 20, 2023
@valeriosetti
Copy link
Contributor Author

Here's my thoughts about these remaining dependencies:

@valeriosetti
Copy link
Contributor Author

Following my previous comment, here is the list of dependencies when MBEDTLS_ECP_RESTARTABLE and MBEDTLS_PK_PARSE_EC_EXTENDED are also disabled on top of the full configuration

mbedtls_ecp_check_privkey
mbedtls_ecp_check_pubkey
mbedtls_ecp_group_load
mbedtls_ecp_keypair_free
mbedtls_ecp_point_read_binary
mbedtls_ecp_point_write_binary
mbedtls_ecp_write_key

@valeriosetti valeriosetti marked this pull request as ready for review April 21, 2023 09:19
@valeriosetti valeriosetti added needs-review Every commit must be reviewed by at least two team members, and removed needs-ci Needs to pass CI tests labels Apr 21, 2023
@mpg
Copy link
Contributor

mpg commented Apr 21, 2023

./docs/architecture/psa-migration/syms.sh full pk pkparse pkwrite

I think we should add pk_wrap to that list.

@valeriosetti
Copy link
Contributor Author

valeriosetti commented Apr 21, 2023

./docs/architecture/psa-migration/syms.sh full pk pkparse pkwrite

I think we should add pk_wrap to that list.

Right, but fortunately this doesn't add much to the list:

@mpg
Copy link
Contributor

mpg commented Apr 24, 2023

Requires #7463

I'm not sure I understand why. Can't we have just the changes to all.sh and syms.sh without the others?

@valeriosetti
Copy link
Contributor Author

I'm not sure I understand why. Can't we have just the changes to all.sh and syms.sh without the others?

TBH this was mostly for me to ease the rebase process for the reshape of #7202. There is no strict requirement for that.
Do you want me to rebase this PR on development?

@mpg
Copy link
Contributor

mpg commented Apr 24, 2023

Yes, I'd prefer to have this based on development, that way we can merge it quickly.

(For the rework of 7202, I think you can start with merging the 3 pre-requisite PRs into your feature branch. Then you can remove the merge commits once all 3 are merged to development.)

It is now possible to analyze also modules and not only
x509 and tls libraries.

Signed-off-by: valerio <valerio.setti@nordicsemi.no>
Copy link
Contributor

@mpg mpg left a comment

Choose a reason for hiding this comment

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

LGTM, both the changes to the script, and the analysis.

@mpg mpg added approved Design and code approved - may be waiting for CI or backports needs-ci Needs to pass CI tests single-reviewer This PR qualifies for having only one reviewer and removed needs-preceding-pr Requires another PR to be merged first needs-review Every commit must be reviewed by at least two team members, labels Apr 24, 2023
@mpg mpg merged commit feb941a into Mbed-TLS:development Apr 24, 2023
@valeriosetti valeriosetti deleted the issue7460-part3 branch December 6, 2024 06:01
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 needs-ci Needs to pass CI tests priority-high High priority - will be reviewed soon single-reviewer This PR qualifies for having only one reviewer size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve pk_wrap calling convention and check for remaning ECP dependencies in PK files
2 participants