Remove encrypt/decrypt from PK #297
No reviewers
Labels
No labels
api-break
approved
bug
component-docs
component-platform
component-test
dependencies
deprecation
DO-NOT-MERGE
enhancement
good first issue
help wanted
needs-adoption
needs-backports
needs-ci
needs-design-approval
needs-info
needs-preceding-pr
needs-review
needs-reviewer
needs-work
priority-high
priority-low
priority-medium
priority-scheduled
priority-very-high
resolved-after-1.1
single-reviewer
size-l
size-m
size-optimisation
size-s
size-xs
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-Mbed-TLS/TF-PSA-Crypto!297
Loading…
Reference in a new issue
No description provided.
Delete branch "rm-pk-crypt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Remove encryption/decryption features from PK, in order to avoid having to spend time on it in #298.
Depends on: https://github.com/Mbed-TLS/mbedtls/pull/10186 for a clean CI.(merged)PR checklist
LGTM 👍
LGTM so approving. I know it depends on https://github.com/Mbed-TLS/mbedtls/pull/10186 so I count on
need-preceding-pr(and failing CI) to block this one from being merged.I will re-check and re-approve once the dependency will be merged ;)
Made a zero-diff force-push (just added an blank line to the last commit's message). With the new github rules, it doesn't invalidate reviews. So this should be good to go as soon as the CI is happy.
While working on https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/298 I found that in
pk.cthere are still functions likepsa_algorithm_for_rsa()which can potentially return an encryption/decryption algorithm to be associated to a PK wrapped RSA key before importing it into PSA. Since this PR is about removing support for encryption/decryption using PK, should we keep that function as-is, or should it be updated accordingly?psa_algorithm_for_rsais used bymbedtls_pk_get_psa_attributesand there's no plan to change that. We're removing encryption from PK, andmbedtls_pk_get_psa_attributestogether withmbedtls_pk_import_into_psais how you do encryption in PSA with a key that you constructed via PK. So it's even more useful now.Oh right, I think I missed a detail yesterday while working on my previous comment. My reasoning was like: "if I cannot do encryption/decryption with PK, then I should not try to setup a PK context for that kind of operation in the first place, right?". What I missed is that one of the main benefits in having PK nowadays is that it provides ways to parse keys that are not available yet in PSA. Therefore on the practical side I can parse a key with PK, import it into PSA and then do encryption/decryption with PSA API.
Sorry for the noise @gilles-peskine-arm