PK: inline & simplify restartable functions #520

Open
opened 2025-10-14 08:04:28 -05:00 by mpg · 0 comments
mpg commented 2025-10-14 08:04:28 -05:00 (Migrated from github.com)

This is an internal refactoring in the same vein as #515 and #519. High-level steps:

  1. Review existing tests (see below) and possibly complete them.
  2. Refactor
  3. Optional: if the refactoring results in more cases being naturally supported, add corresponding test cases.

Step 1: see #515 except wrapping contexts are not supported, plus the following:

  • Positive: we can abort an incomplete operation and it does not leak resources.

Step 2: we want to remove use of sign_rs_func, verify_rs_func, rs_alloc_func and rs_free_func pointers, however some of them may subsist as static functions in pk.c. There may be fewer opportunities for simplification / unification than in previous similar tasks.

Step 3: consider supporting wrapping contexts if it comes naturally.

Does not really depend on #515 and #519, but likely to have contextual conflicts in pk_wrap.[ch].

This is an internal refactoring in the same vein as #515 and #519. High-level steps: 1. Review existing tests (see below) and possibly complete them. 2. Refactor 3. Optional: if the refactoring results in more cases being naturally supported, add corresponding test cases. Step 1: see #515 except wrapping contexts are not supported, plus the following: - Positive: we can abort an incomplete operation and it does not leak resources. Step 2: we want to remove use of `sign_rs_func`, `verify_rs_func`, `rs_alloc_func` and `rs_free_func` pointers, however some of them may subsist as static functions in `pk.c`. There may be fewer opportunities for simplification / unification than in previous similar tasks. Step 3: consider supporting wrapping contexts if it comes naturally. Does not really depend on #515 and #519, but likely to have contextual conflicts in `pk_wrap.[ch]`.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto#520
No description provided.