Gilles Peskine 4a768dd17d Fix negative zero created by (-A) + (+A) or (-A) - (-A)
In mbedtls_mpi_add_mpi() and mbedtls_mpi_sub_mpi(), and by extention
mbedtls_mpi_add_int() and mbedtls_mpi_sub_int(), when the resulting value
was zero, the sign bit of the result was incorrectly set to -1 when the
left-hand operand was negative. This is not a valid mbedtls_mpi
representation. Fix this: always set the sign to +1 when the result is 0.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-15 20:36:18 +01:00
..
2022-10-19 08:35:08 -04:00
2021-06-28 09:24:07 +01:00
2022-11-02 17:25:48 +00:00
2022-11-02 17:27:25 +00:00
2022-11-02 17:27:25 +00:00
2022-11-02 17:27:25 +00:00
2022-10-13 14:28:15 +01:00
2022-10-07 14:08:42 +01:00
2022-09-16 12:02:48 +02:00
2022-10-13 14:30:03 +01:00
2022-10-13 14:29:38 +01:00
2022-10-13 16:47:13 +01:00
2021-06-28 09:24:07 +01:00
2021-03-29 14:20:18 +01:00
2021-03-29 14:20:18 +01:00
2021-06-28 09:24:07 +01:00
2022-08-31 10:14:25 +01:00
2022-05-12 09:45:03 +01:00
2022-07-01 16:43:25 +01:00
2020-11-25 13:10:50 +01:00
2022-10-13 13:32:02 +02:00
2022-11-09 22:43:31 +08:00
2022-10-19 08:35:09 -04:00
2022-11-09 22:43:31 +08:00
2022-11-09 22:43:31 +08:00
2022-11-09 22:43:31 +08:00
2022-11-09 22:43:31 +08:00
2022-03-29 17:43:56 +02:00
2022-10-28 12:51:35 -04:00
2022-10-28 12:51:35 -04:00
2022-10-28 12:51:35 -04:00