Rename mbedtls_mpi_msb to mbedtls_mpi_bitlen
diff --git a/library/ecp_curves.c b/library/ecp_curves.c
index 41d7f79..e97c401 100644
--- a/library/ecp_curves.c
+++ b/library/ecp_curves.c
@@ -594,8 +594,8 @@
     ecp_mpi_load( &grp->G.Y, gy, gylen );
     ecp_mpi_set1( &grp->G.Z );
 
-    grp->pbits = mbedtls_mpi_msb( &grp->P );
-    grp->nbits = mbedtls_mpi_msb( &grp->N );
+    grp->pbits = mbedtls_mpi_bitlen( &grp->P );
+    grp->nbits = mbedtls_mpi_bitlen( &grp->N );
 
     grp->h = 1;
 
@@ -670,7 +670,7 @@
     MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->P, 1 ) );
     MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &grp->P, 255 ) );
     MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &grp->P, &grp->P, 19 ) );
-    grp->pbits = mbedtls_mpi_msb( &grp->P );
+    grp->pbits = mbedtls_mpi_bitlen( &grp->P );
 
     /* Y intentionaly not set, since we use x/z coordinates.
      * This is used as a marker to identify Montgomery curves! */