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

test: add tests for rsa 2046/2047 bits key #216

Closed
wants to merge 5 commits into from
Closed

Conversation

Taowyoo
Copy link
Collaborator

@Taowyoo Taowyoo commented Nov 21, 2022

According to Mbed-TLS/mbedtls#868, currently in mbedtls 2.X:

mbedtls_pk_get_bitlen rounds up the size of RSA keys to the nearest byte.

The reason is that rsa_get_bitlen returns 8× the number of bytes required to store the modulus. This could be up to 7 bits higher than the actual number of bits.

This PR add tests to cover the current those cases to ensure, code works correctly as expected.

@Taowyoo Taowyoo closed this Mar 17, 2023
@Taowyoo Taowyoo deleted the yx/add-rsa-tests branch March 17, 2023 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant