Fixing PK to make it compliant with the documentation for 1.0 release #471
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!471
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-pk"
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
mbedtls_pk_copy[_public]_from_psambedtls_pk_get_psa_attributes()always return PKCS v1.5 algs for RSA keysDepends on: https://github.com/Mbed-TLS/TF-PSA-Crypto/pull/468#discussion_r2378067577
PR checklist
I can't review this effectively since it's changing the behavior to not match the documentation in this branch.
Please cherry-pick Manuel's relevant commits so that the documentation and the code are consistent in this pull request.
See this comment - I believe the tests that rely on
mbedtls_pk_set_rsa_padding()and/ormbedtls_pk_set_rsa_hash()should ultimately be removed, because we want to remove those functions and the underlying fields. But I leave it up to you whether you're rather do this at once in this PR (for the sake of clarity) or in a follow-up PR (for the sake of speed here).We may want to make this one depend on#468 rather than cherry-picking two commits from it?
I didn't do that initially because I saw that #468 had a CI with many failures and I wanted to test my changes on their own. Rebased now anyway 😉
LGTM at 67ab2d3486dcd8cb7a2e76d68c1eae65472f0826 except for the changelog
Manuel's PR also has the changelog entries now and I reviewed them there. Please remove them here.
Ideally we'd get rid of the
rsa_paddingfield and ofmbedtls_pk_rsa_padding_t. But it looks like this would require significant further work in the tests, so I'm happy to defer that to a future cleanup.@ -712,3 +712,3 @@depends_on:PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY:PSA_WANT_ALG_RSA_PSS:PSA_WANT_ALG_SHA_256pk_rsa_v21_get_psa_attributes:MBEDTLS_MD_SHA256:FROM_PAIR:PSA_KEY_USAGE_DECRYPT:1:PSA_ALG_RSA_OAEP(PSA_ALG_SHA_256)pk_rsa_v21_get_psa_attributes:MBEDTLS_MD_SHA256:FROM_PAIR:PSA_KEY_USAGE_DECRYPT:1:PSA_ALG_RSA_PKCS1V15_CRYPTI'm not sure if there's any point in
pk_rsa_v21_get_psa_attributes, since there isn't a concept of “v21 PK context” any more. But that can be part of a later cleanup. I don't want to get bogged down into a major refactoring of the test code.@ -1623,16 +1626,15 @@ void pk_psa_wrap_sign_ext(int pk_type, int key_bits, int key_pk_type, int md_alg/* Create legacy RSA public/private key in PK context. */Why keep this commented-out line?
For these follow-up tasks I prepared https://github.com/Mbed-TLS/TF-PSA-Crypto/pull/477. Can I add you as reviewer to that one?
Ah, thanks, good to know it's already there! I'm afraid I'll pass on reviewing for now, I have other urgent things for the release and for the beginning of Q4.
@valeriosetti can you rebase now that #468 has been merged? Then I'll review promptly!
LGTM, thanks!
LGTM