Merge pull request #8814 from gilles-peskine-arm/rsa-bitlen-fix-2.28
Backport 2.28: Fix mbedtls_pk_get_bitlen for a key size that is not a multiple of 8
diff --git a/library/ecp.c b/library/ecp.c
index 31a6b9e..f67b4d0 100644
--- a/library/ecp.c
+++ b/library/ecp.c
@@ -2614,8 +2614,8 @@
/* RP.X might be slightly larger than P, so reduce it */
MOD_ADD(RP.X);
+ /* Randomize coordinates of the starting point */
#if defined(MBEDTLS_ECP_NO_INTERNAL_RNG)
- /* Derandomize coordinates of the starting point */
if (f_rng == NULL) {
have_rng = 0;
}