mbedtls/tests/src
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
..
drivers test_driver_aead.c: add support for LIBTESTDRIVER1 tests 2022-10-02 21:01:23 +02:00
asn1_helpers.c Move asn1_skip_integer to the asn1_helpers module 2021-02-23 20:29:38 +01:00
certs.c Make legacy_or_psa.h public. 2022-09-16 12:02:48 +02: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-15 20:47:07 +01:00
psa_crypto_helpers.c Move psa_crypto_slot_management.h out from psa_crypto_helpers.h 2021-11-03 09:35:35 +01:00
psa_exercise_key.c test_suite_psa_crypto: adapt dependenies and guards so the test can run in the driver-only build 2022-10-19 13:20:20 +02:00
random.c Make the fallback behavior of mbedtls_test_rnd_buffer_rand optional 2021-06-03 18:10:04 +02:00
threading_helpers.c Explain the usage of is_valid in pthread mutexes 2021-02-22 19:24:03 +01:00