mbedtls/tests
Manuel Pégourié-Gonnard 53fb66db12 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-08 09:09:20 +02:00
..
.jenkins
configs Add a test component with malloc(0) returning NULL 2020-02-11 19:26:28 +01:00
data_files Normalize line endings 2020-05-27 21:55:08 +02:00
docker/bionic
git-scripts
scripts Add support for RESTARTABLE with internal RNG 2020-06-08 09:09:20 +02:00
suites Merge pull request #3400 from mpg/fix-hmac-drbg-deps-dev 2020-06-05 11:50:02 +02:00
.gitignore
CMakeLists.txt Sort lists in CMakeLists.txt files 2020-04-17 11:58:54 +02:00
compat-in-docker.sh
compat.sh Revert "Remove tests that depend on TLS or X.509" 2020-03-19 14:17:54 +01:00
context-info.sh Add tests for the ssl_context_info program 2020-04-15 16:21:36 +02:00
Descriptions.txt Revert "Remove tests that depend on TLS or X.509" 2020-03-19 14:17:54 +01:00
make-in-docker.sh
Makefile Revert "tests: Use parent module includes when used as a submodule" 2020-03-19 14:13:59 +01:00
psa_crypto_helpers.h
psa_helpers.h
ssl-opt-in-docker.sh
ssl-opt.sh Saving the serialized context to a file 2020-04-17 16:26:43 +02:00