Update comments following code review
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
diff --git a/library/bignum_core.h b/library/bignum_core.h
index 279dca2..36758e5 100644
--- a/library/bignum_core.h
+++ b/library/bignum_core.h
@@ -190,11 +190,12 @@
/**
* \brief Subtract two known-size large unsigned integers, returning the borrow.
*
- * Calculate A - B where A and B have the same size.
- * This function operates modulo (2^ciL)^limbs and returns the carry
+ * Calculate `A - B` where \p A and \p B have the same size.
+ * This function operates modulo `(2^ciL)^limbs` and returns the carry
* (1 if there was a wraparound, i.e. if `A < B`, and 0 otherwise).
*
- * X may be aliased to A or B.
+ * \p X may be aliased to \p A or \p B, or even both, but may not overlap
+ * either otherwise.
*
* \param[out] X The result of the subtraction.
* \param[in] A Little-endian presentation of left operand.
@@ -249,12 +250,14 @@
* the multiplication A * B * R^-1 mod N where
* R = (2^ciL)^AN_limbs.
* \param[in] A Little-endian presentation of first operand.
- * Must have exactly \p AN_limbs limbs.
+ * Must have the same number of limbs as \p N.
* \param[in] B Little-endian presentation of second operand.
* \param[in] B_limbs The number of limbs in \p B.
+ * Must be <= \p AN_limbs.
* \param[in] N Little-endian presentation of the modulus.
- * This must be odd and have exactly \p AN_limbs limbs.
- * \param[in] AN_limbs The number of limbs in \p X, \p A, \p N.
+ * This must be odd, and have exactly the same number
+ * of limbs as \p A.
+ * \param[in] AN_limbs The number of limbs in \p X, \p A and \p N.
* \param mm The Montgomery constant for \p N: -N^-1 mod 2^ciL.
* This can be calculated by `mbedtls_mpi_montg_init()`.
* \param[in,out] T Temporary storage of size at least 2*AN_limbs+1 limbs.