From 6b7ce968d2b535ea99cdd9c86dc05c4bf103314c Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 15 Dec 2022 15:04:33 +0100 Subject: [PATCH] Clarify some comments Signed-off-by: Gilles Peskine --- library/bignum.c | 2 +- library/bignum_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/bignum.c b/library/bignum.c index 142c4c6602..043bd6a0bc 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -1973,7 +1973,7 @@ int mbedtls_mpi_random( mbedtls_mpi *X, /* Ensure that target MPI has exactly the same number of limbs * as the upper bound, even if the upper bound has leading zeros. - * This is necessary for the mbedtls_mpi_lt_mpi_ct() check. */ + * This is necessary for mbedtls_mpi_core_random. */ int ret = mbedtls_mpi_resize_clear( X, N->n ); if( ret != 0 ) return( ret ); diff --git a/library/bignum_core.c b/library/bignum_core.c index a432c2b21a..770734c4a0 100644 --- a/library/bignum_core.c +++ b/library/bignum_core.c @@ -163,7 +163,7 @@ unsigned mbedtls_mpi_core_uint_le_mpi( mbedtls_mpi_uint min, /* min <= least significant limb? */ unsigned min_le_lsl = 1 ^ mbedtls_ct_mpi_uint_lt( A[0], min ); - /* most significant limbs (excluding 1) are all zero? */ + /* limbs other than the least significant one are all zero? */ mbedtls_mpi_uint msll_mask = 0; for( size_t i = 1; i < A_limbs; i++ ) msll_mask |= A[i];