commit | 0512d178e01430ceeb97902a9f219e6575f672ee | [log] [tgz] |
---|---|---|
author | Janos Follath <janos.follath@arm.com> | Tue Feb 20 14:30:46 2024 +0000 |
committer | Janos Follath <janos.follath@arm.com> | Tue Feb 20 14:30:46 2024 +0000 |
tree | 4ef0ef36d88fc9b7a3288d1f36d36f79be59c960 | |
parent | 518b5b60c658f91e0605af5c5dfef2836bbf9d0c [diff] [blame] |
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>
diff --git a/library/bignum.c b/library/bignum.c index 5ddcf72..0b8fec3 100644 --- a/library/bignum.c +++ b/library/bignum.c
@@ -1639,6 +1639,7 @@ *prec_RR = RR; } } else { + MBEDTLS_MPI_CHK(mbedtls_mpi_grow(prec_RR, N->n)); RR = *prec_RR; }