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

Backport 2.16: wrong RSA_PRV_DER_MAX_BYTES for odd MBEDTLS_MPI_MAX_SIZE #4100

Merged
merged 3 commits into from
Feb 2, 2021

Conversation

d-otte
Copy link
Contributor

@d-otte d-otte commented Feb 2, 2021

This is a backport to the mbedtls v2.16 branch of PR #4094 regarding issue #4093

if MBEDTLS_MPI_MAX_SIZE is odd then RSA_PRV_DER_MAX_BYTES will be two less than expected, since the macros are lacking parentheses.


Signed-off-by: Daniel Otte <d.otte@wut.de>
Avoid confusion and possible mistakes in usage of macros.

Signed-off-by: Daniel Otte <d.otte@wut.de>
Signed-off-by: Daniel Otte <d.otte@wut.de>
@chris-jones-arm chris-jones-arm added bug Community component-crypto Crypto primitives and low-level interfaces needs-reviewer This PR needs someone to pick it up for review labels Feb 2, 2021
@chris-jones-arm chris-jones-arm self-requested a review February 2, 2021 15:31
Copy link
Contributor

@chris-jones-arm chris-jones-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a complete, faithful backport to me.

@chris-jones-arm chris-jones-arm linked an issue Feb 2, 2021 that may be closed by this pull request
Copy link
Contributor

@yanesca yanesca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a faithful backport of the original.

@yanesca yanesca added approved Design and code approved - may be waiting for CI or backports and removed needs-reviewer This PR needs someone to pick it up for review labels Feb 2, 2021
@yanesca yanesca merged commit fee234a into Mbed-TLS:mbedtls-2.16 Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports bug component-crypto Crypto primitives and low-level interfaces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrong RSA_PRV_DER_MAX_BYTES for odd MBEDTLS_MPI_MAX_SIZE
3 participants