mbedtls/tests/include
Gilles Peskine ca6e8aac58 Support negative zero as MPI test input
The bignum module does not officially support "negative zero" (an
mbedtls_mpi object with s=-1 and all limbs zero). However, we have a
history of bugs where a function that should produce an official
zero (with s=1), produces a negative zero in some circumstances. So it's
good to check that the bignum functions are robust when passed a negative
zero as input. And for that, we need a way to construct a negative zero
from test case arguments.

There are checks that functions don't produce negative zeros as output in
the test suite. Skip those checks if there's a negative zero input: we
don't want functions to _create_ negative zeros, but we don't mind if
they _propagate_ negative zeros.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-15 20:47:07 +01:00
..
alt-dummy Code review fixes 2021-06-18 12:59:38 +02:00
baremetal-override tests: prevent inclusion of time.h in baremetal compiles 2022-03-04 05:07:45 -05:00
spe Correct copyright and license in crypto_spe.h 2022-09-12 17:57:32 +01:00
test Support negative zero as MPI test input 2022-11-15 20:47:07 +01:00