mbedtls_mpi_read_binary() document that function guarantees to return an MPI with exactly the necessary number of limbs and remove redundant call to mbedtls_mpi_grow()

Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
diff --git a/library/bignum.c b/library/bignum.c
index a7e3fa3..288f859 100644
--- a/library/bignum.c
+++ b/library/bignum.c
@@ -785,6 +785,9 @@
 
 /*
  * Import X from unsigned binary data, little endian
+ *
+ * This function is guaranteed to return an MPI with exactly the necessary
+ * number of limbs (in particular, it does not skip 0s in the input).
  */
 int mbedtls_mpi_read_binary_le( mbedtls_mpi *X,
                                 const unsigned char *buf, size_t buflen )
@@ -811,6 +814,9 @@
 
 /*
  * Import X from unsigned binary data, big endian
+ *
+ * This function is guaranteed to return an MPI with exactly the necessary
+ * number of limbs (in particular, it does not skip 0s in the input).
  */
 int mbedtls_mpi_read_binary( mbedtls_mpi *X, const unsigned char *buf, size_t buflen )
 {
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index f8a2ae4..36a1b0c 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -4934,7 +4934,6 @@
         *    Result of comparison is returned. When it indicates error
         *    then this fuction is called again.
         */
-        MBEDTLS_MPI_CHK( mbedtls_mpi_grow( &k, diff_N_2.n ) );
         MBEDTLS_MPI_CHK( mbedtls_mpi_lt_mpi_ct( &diff_N_2, &k, &key_out_of_range ) );
     }