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: RSA decryption #5160

Closed
mpg opened this issue Nov 12, 2021 · 1 comment · Fixed by #5519
Closed

PK: RSA decryption #5160

mpg opened this issue Nov 12, 2021 · 1 comment · Fixed by #5519
Assignees
Labels
enhancement size-s Estimated task size: small (~2d)

Comments

@mpg
Copy link
Contributor

mpg commented Nov 12, 2021

In library/pk_wrap.c, provide an implementation of rsa_decrypt_wrap using psa_asymmetric_decrypt() instead of mbedtls_rsa_pkcs1_decrypt() when MBEDTLS_USE_PSA_CRYPTO is enabled.

This will require creating a temporary PSA private key with appropriate permissions. An example of something similar, but with a public key, can be found in ecdsa_verify_wrap() in the same file (note: there are two definitions of ecdsa_very_wrap(), we want to look at the one used with MBEDTLS_USE_PSA_CRYPTO).

Note: this function only handles RSA PKCS#1 v1.5, so no need to worry about OAEP here (which is actually not supported in PK so far).

Similar: #5162 and #5274 are also creating a temporary PSA private key.

@mpg mpg added enhancement Product Backlog size-s Estimated task size: small (~2d) labels Nov 12, 2021
This was referenced Dec 2, 2021
@mpg mpg changed the title Use PSA for RSA PKCS#1 v1.5 decryption in PK PK: RSA decryption Dec 7, 2021
@superna9999 superna9999 mentioned this issue Feb 9, 2022
2 tasks
@superna9999
Copy link
Contributor

@mpg Can you assign me this issue and link #5519 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants