]> granicus.if.org Git - esp-idf/commit
mbedtls: Fix Z->s in mbedtls_mpi_exp_mod()
authorKonstantin Kondrashov <konstantin@espressif.com>
Wed, 12 Jun 2019 11:00:44 +0000 (19:00 +0800)
committerKonstantinKondrashov <konstantin@espressif.com>
Wed, 26 Jun 2019 06:20:30 +0000 (14:20 +0800)
commitfbe566ac67b17c1d9ffe058db6ead53f2515b7a3
treeab47f6f032d29b2ca58126caf48fd48c0d77fc8c
parent381bd7d7852569b5bd4f68a8d921783703072b1f
mbedtls: Fix Z->s in mbedtls_mpi_exp_mod()

Z->s should never be zero, only 1 or -1.
Added additional checks for X, Y and M args to correctly set Z->s.

Closes: https://github.com/espressif/esp-idf/issues/1681
Closes: https://github.com/espressif/esp-idf/issues/3603
Closes: IDFGH-1313
components/mbedtls/port/esp_bignum.c