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 Enable MBEDTLS_POLY1305_C in test drivers build 2022-10-12 13:04:12 +02:00
asn1_helpers.h Move asn1_skip_integer to the asn1_helpers module 2021-02-23 20:29:38 +01:00
constant_flow.h Merge pull request #736 from mpg/cf-varpos-copy-dev-restricted 2020-08-25 14:35:55 +01:00
fake_external_rng_for_test.h Move the fake PSA external RNG to its own header and source files 2021-01-20 20:02:01 +01:00
helpers.h Support negative zero as MPI test input 2022-11-10 15:15:25 +01:00
macros.h Include platform.h unconditionally: automatic part 2022-10-05 11:26:07 +02:00
psa_crypto_helpers.h Move psa_crypto_slot_management.h out from psa_crypto_helpers.h 2021-11-14 20:03:23 +01:00
psa_exercise_key.h tests: psa: Refine choice of default hash algorithm for signature 2021-11-30 14:49:19 +01:00
psa_helpers.h Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
random.h Fix long-standing obsolete comment 2021-06-02 21:39:31 +02:00