mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-25 09:02:48 +00:00
bignum_mod_raw: Updated documentation for mpi_mod_raw_mul
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
parent
8eb6104256
commit
53a16b3fb5
@ -132,13 +132,13 @@ void mbedtls_mpi_mod_raw_mul(mbedtls_mpi_uint *X,
|
|||||||
{
|
{
|
||||||
/* Standard (A * B) multiplication stored into pre-allocated T
|
/* Standard (A * B) multiplication stored into pre-allocated T
|
||||||
* buffer of fixed limb size of (2N + 1).
|
* buffer of fixed limb size of (2N + 1).
|
||||||
|
*
|
||||||
* The space may not not fully filled by when
|
* The space may not not fully filled by when
|
||||||
* MBEDTLS_MPI_MOD_REP_OPT_RED is used, with most
|
* MBEDTLS_MPI_MOD_REP_OPT_RED is used, where we only need
|
||||||
* curves using (2N) limbs.
|
* (2N) or (2N-1) limbs (depending on limb size and curve).
|
||||||
*
|
*
|
||||||
* The 521-bit Weierstrass curve is the only
|
* The 521-bit Weierstrass curve is the only
|
||||||
* that which requires a limb size of (2N + 1). */
|
* that which requires a limb size of (2N). */
|
||||||
const size_t T_limbs = (N->bits == 521) ?
|
const size_t T_limbs = (N->bits == 521) ?
|
||||||
BITS_TO_LIMBS(N->bits * 2) + 1 :
|
BITS_TO_LIMBS(N->bits * 2) + 1 :
|
||||||
BITS_TO_LIMBS(N->bits * 2);
|
BITS_TO_LIMBS(N->bits * 2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user