mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-19 17:00:20 +01:00
mbedtls: Fix a case for mpi_montgomery_exp_calc() when Z is not init
Closes: IDF-1870 Closes: IDFGH-3671 Closes: https://github.com/espressif/esp-idf/issues/5605
This commit is contained in:
@@ -318,7 +318,7 @@ static int mont(mbedtls_mpi* Z, const mbedtls_mpi* X, const mbedtls_mpi* Y, cons
|
||||
mpi_to_mem_block(RSA_MEM_RB_BLOCK_BASE, Y, hw_words);
|
||||
|
||||
start_op(RSA_MULT_START_REG);
|
||||
|
||||
Z->s = 1; // The sign of Z will be = M->s (but M->s is always 1)
|
||||
MBEDTLS_MPI_CHK( mbedtls_mpi_grow(Z, hw_words) );
|
||||
|
||||
wait_op_complete(RSA_MULT_START_REG);
|
||||
|
||||
Reference in New Issue
Block a user