Gilles Peskine 53a7206269 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-10 15:15:25 +01:00
..
drivers Fix aead driver code (remove redundant brace) 2022-10-13 10:23:58 +02:00
asn1_helpers.c Move asn1_skip_integer to the asn1_helpers module 2021-02-23 20:29:38 +01:00
fake_external_rng_for_test.c Fix wrong \file name in Doxygen comments 2021-02-23 20:29:38 +01:00
helpers.c Support negative zero as MPI test input 2022-11-10 15:15:25 +01:00
psa_crypto_helpers.c Move psa_crypto_slot_management.h out from psa_crypto_helpers.h 2021-11-14 20:03:23 +01:00
psa_exercise_key.c Redo of PR#5345. Fixed spelling and typographical errors found by CodeSpell. 2022-04-28 18:22:20 +01:00
random.c Make the fallback behavior of mbedtls_test_rnd_buffer_rand optional 2021-06-02 21:31:24 +02:00
threading_helpers.c Explain the usage of is_valid in pthread mutexes 2021-02-22 19:24:03 +01:00