]> granicus.if.org Git - esp-idf/commit
mbedtls: Don't unnecessarily grow the result of a hardware bignum operation
authorAngus Gratton <angus@espressif.com>
Thu, 9 Aug 2018 05:13:43 +0000 (15:13 +1000)
committerbot <bot@espressif.com>
Tue, 28 Aug 2018 09:08:43 +0000 (09:08 +0000)
commit961f59ff57a83687bbec2692c36e6eb6cae3d6b8
treea9733e3a49df565b0bfd2d3e38999d0f6a32563f
parent26850880b2654d0efd2b81104e0ec4320bebb2cb
mbedtls: Don't unnecessarily grow the result of a hardware bignum operation

Avoids growing the result of hardware bignum operations
(particularly for multiplication)

Fixes bugs where some Elliptic Curve operations fail or corrupt memory,
as they assume length of the number is never greater than the number of
non-zero limbs.

Includes some general refactoring to standardize terminology.

Closes https://github.com/espressif/esp-idf/issues/1556

Fixes TW12984

Adds test cases for both these issues.
components/mbedtls/port/esp_bignum.c
components/mbedtls/test/test_ecp.c [new file with mode: 0644]