mbedtls/tests
Manuel Pégourié-Gonnard 047986c2f8 Add support for RESTARTABLE with internal RNG
Currently we draw pseudo-random numbers at the beginning and end of the main
loop. With ECP_RESTARTABLE, it's possible that between those two occasions we
returned from the multiplication function, hence lost our internal DRBG
context that lives in this function's stack frame. This would result in the
same pseudo-random numbers being used for blinding in multiple places. While
it's not immediately clear that this would give rise to an attack, it's also
absolutely not clear that it doesn't. So let's avoid that by using a DRBG
context that lives inside the restart context and persists across
return/resume cycles. That way the RESTARTABLE case uses exactly the
same pseudo-random numbers as the non-restartable case.

Testing and compile-time options:

- The case ECP_RESTARTABLE && !ECP_NO_INTERNAL_RNG is already tested by
  component_test_no_use_psa_crypto_full_cmake_asan.
- The case ECP_RESTARTABLE && ECP_NO_INTERNAL_RNG didn't have a pre-existing
  test so a component is added.

Testing and runtime options: when ECP_RESTARTABLE is enabled, the test suites
already contain cases where restart happens and cases where it doesn't
(because the operation is short enough or because restart is disabled (NULL
restart context)).

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-06-16 10:52:32 +02:00
..
.jenkins Add Jenkinsfile for PR job 2018-10-19 15:25:10 +01:00
configs Add a test component with malloc(0) returning NULL 2019-09-30 13:58:12 +02:00
data_files Normalize line endings 2020-05-28 18:31:24 +02:00
git-scripts Add doxygen.sh script to git hooks 2018-06-27 17:41:00 +03:00
scripts Add support for RESTARTABLE with internal RNG 2020-06-16 10:52:32 +02:00
suites Merge pull request #3352 from gilles-peskine-arm/fix-ecp-mul-memory-leak-2.16 2020-06-05 11:44:02 +02:00
.gitignore Move some ignore patterns to subdirectories 2015-01-28 15:33:23 +00:00
CMakeLists.txt Merge remote-tracking branch 'origin/pr/2293' into mbedtls-2.16 2019-03-05 16:31:02 +00:00
compat.sh Exclude DTLS 1.2 only with older OpenSSL 2019-08-13 11:44:04 +02:00
Descriptions.txt Add selftest program to the list of tests 2014-04-04 16:33:01 +02:00
Makefile Merge remote-tracking branch 'origin/pr/2053' into mbedtls-2.16 2019-06-21 15:59:16 +01:00
ssl-opt.sh Adjust timeout of tests with "no resend" assertions 2020-03-31 09:37:31 +02:00