mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Exp mod: Make sure RR has enough limbs
When generated by exp_mod, RR has enough limbs to be passed as a parameter to core functions. If it is received from the caller, it might be of any length. Signed-off-by: Janos Follath <janos.follath@arm.com>
This commit is contained in:
@ -1639,6 +1639,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
|
||||
*prec_RR = RR;
|
||||
}
|
||||
} else {
|
||||
MBEDTLS_MPI_CHK(mbedtls_mpi_grow(prec_RR, N->n));
|
||||
RR = *prec_RR;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user