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

PK: don't use mbedtls_ecp_check_pub_priv() when USE_PSA is enabled. #7387

Closed
mpg opened this issue Apr 3, 2023 · 1 comment · Fixed by #7391
Closed

PK: don't use mbedtls_ecp_check_pub_priv() when USE_PSA is enabled. #7387

mpg opened this issue Apr 3, 2023 · 1 comment · Fixed by #7391
Assignees
Labels
enhancement size-s Estimated task size: small (~2d)

Comments

@mpg
Copy link
Contributor

mpg commented Apr 3, 2023

Context: see #6839; this is a step towards ECPa.PK.

Using mbedtls_ecp_check_pub_priv() is a dependency on ECP arithmetic which we're trying to avoid. Let's try another approach.

For example, now we can call mbedtls_pk_write_pubkey() on both prv and pub and compare the results - edit: or we could directly got something more future-proof, see below.

Notes for the future:

Prototype: #7357

@mpg mpg changed the title PK: don't use ECP check_pair when USE_PSA is enabled. PK: don't use mbedtls_ecp_check_pub_priv() Apr 3, 2023
@mpg mpg added size-m Estimated task size: medium (~1w) enhancement labels Apr 3, 2023
@mpg
Copy link
Contributor Author

mpg commented Apr 3, 2023

since also for the key creation we are already importing the private key into PSA to get its public part, why can't we go that way directly also here? In theory also 7202 is a sort of middle step toward having everything on the PSA side (or at least there is a discussion on this)

Indeed, instead of doing something that we'll then change when 7202 and 7074 are done, we should go directly for something closer to the final version.

Also, it might create an opportunity for saving code by sharing it with pkparse.

@mpg mpg changed the title PK: don't use mbedtls_ecp_check_pub_priv() PK: don't use mbedtls_ecp_check_pub_priv() when USE_PSA is enabled. Apr 3, 2023
@valeriosetti valeriosetti self-assigned this Apr 3, 2023
@mpg mpg added size-s Estimated task size: small (~2d) and removed size-m Estimated task size: medium (~1w) labels Apr 4, 2023
@mpg mpg closed this as completed in #7391 Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants