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

Add PSA interruptible export public-key get num ops API #9820

Open
wants to merge 19 commits into
base: development
Choose a base branch
from

Conversation

waleed-elmelegy-arm
Copy link
Contributor

@waleed-elmelegy-arm waleed-elmelegy-arm commented Dec 2, 2024

Description

fixes #9649

Add PSA interruptible export public-key get num ops API

PR checklist

Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.

  • changelog provided
  • development PR not required because:
  • framework PR not required
  • 3.6 PR not required because:
  • 2.28 PR not required because:
  • tests provided

@waleed-elmelegy-arm waleed-elmelegy-arm added DO-NOT-MERGE needs-ci Needs to pass CI tests component-psa PSA keystore/dispatch layer (storage, drivers, …) labels Dec 2, 2024
@waleed-elmelegy-arm waleed-elmelegy-arm force-pushed the add-iop-export-pub-key-get-num-ops branch 2 times, most recently from d96914d to db56913 Compare December 3, 2024 16:03
@waleed-elmelegy-arm waleed-elmelegy-arm added needs-preceding-pr Requires another PR to be merged first size-s Estimated task size: small (~2d) and removed DO-NOT-MERGE needs-ci Needs to pass CI tests labels Dec 3, 2024
@paul-elliott-arm paul-elliott-arm self-requested a review December 4, 2024 11:50
Key type must be a key pair or public-key if not we return
PSA_ERROR_INVALID_ARGUMENT.

The key type must be ECC key as this is what we support for
now otherwise we return PSA_ERROR_NOT_SUPPORTED.

Signed-off-by: Waleed Elmelegy <[email protected]>
The test is marked as opaque but the parameter was set
to PSA_KEY_LIFETIME_VOLATILE.

Signed-off-by: Waleed Elmelegy <[email protected]>
Rename it to mbedtls_psa_export_public_key_iop_t as
iop stands for "interuptible operation" already.

Signed-off-by: Waleed Elmelegy <[email protected]>
The test is supposed to be an opaque key test but the
testing function does not support specifying an
opaque driver.

Signed-off-by: Waleed Elmelegy <[email protected]>
* Improve wording of comments.
* Zeroize buffer before doing iop testing to
  avoid comparing with previous values in
  case they are not overwritten.
* Remove redundant testing.

Signed-off-by: Waleed Elmelegy <[email protected]>
Rename interruptible_key_agreement_get_min_num_ops()
testing helper function to
interruptible_operations_get_min_num_ops() since it's
values are not only specefic to key agreement but to
any resartable ecp operation.

Also add different key sizes and rounding up for keys
where there are no data available.

Signed-off-by: Waleed Elmelegy <[email protected]>
@waleed-elmelegy-arm waleed-elmelegy-arm force-pushed the add-iop-export-pub-key-get-num-ops branch from 53e7ad2 to ef5c8a9 Compare December 10, 2024 18:02
@paul-elliott-arm paul-elliott-arm added needs-review Every commit must be reviewed by at least two team members, priority-high High priority - will be reviewed soon labels Dec 11, 2024
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.

First pass, looks good to me, obvious rebase incoming, so not approving yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-psa PSA keystore/dispatch layer (storage, drivers, …) needs-preceding-pr Requires another PR to be merged first 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
Development

Successfully merging this pull request may close these issues.

Implement interruptible ECC Export Public Key (iop tests)
2 participants