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 tests: use PSA to generate keypairs when USE_PSA is enabled #7389

Closed
mpg opened this issue Apr 3, 2023 · 0 comments · Fixed by #7393
Closed

PK tests: use PSA to generate keypairs when USE_PSA is enabled #7389

mpg opened this issue Apr 3, 2023 · 0 comments · Fixed by #7393
Assignees
Labels
component-crypto Crypto primitives and low-level interfaces 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.

In test_suite_pk.function, we use ECP functions to generate ECC key pairs in two places:

  • mbedtls_ecp_gen_keypair() in pk_genkey();
  • mbedtls_ecp_gen_key() in pk_psa_sign().
    This is a dependency on ECP arithmetic, which we're trying to avoid.

Instead, when MBEDTLS_USE_PSA_CRYPTO is enabled, we can use an approach based on psa_generate_key(). This task is to implement it.

Notes:

  • pk_psa_sign() already depends on MBEDTLS_USE_PSA_CRYPTO.
  • We don't want duplicated call, anything that can be shared between those two places should be (might be partially pre-existing).

Prototype: #7357

@mpg mpg added enhancement component-crypto Crypto primitives and low-level interfaces size-m Estimated task size: medium (~1w) labels 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 #7393 Apr 11, 2023
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-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants