c6952491c1
Merge pull request #6446 from yanesca/add_split_arch_tests_to_bignum_core
...
Add split arch tests to bignum core
2022-10-20 18:29:33 +01:00
be17655b57
mbedtls_mpi_mod_modulus_init() must be called before any 'goto exit' in tests
...
Fixes Coverity issues 381527 and 381526.
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2022-10-20 16:57:10 +01:00
78e3c9b574
Fix style in bignum_core.py
...
Signed-off-by: Janos Follath <janos.follath@arm.com >
2022-10-20 12:09:30 +01:00
560805d665
Fix mbedtls_mpi_core_add_if test aliasing
...
Signed-off-by: Janos Follath <janos.follath@arm.com >
2022-10-20 12:04:40 +01:00
2c95a56e13
Remove KNOWN_MBEDTLS_SUPPORTED_HASH_ALG as it is now not used anywhere
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2022-10-20 12:38:44 +02:00
b0ee577287
Bignum core: test shift_r
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2022-10-20 12:00:57 +02:00
ba516f7524
mpi_core_add_if test: Remove dependency on old API
...
Signed-off-by: Janos Follath <janos.follath@arm.com >
2022-10-20 10:59:50 +01:00
5ff03d49c0
Bignum Core test: move bound to constructor
...
We will need it to pad parameters in the base class, but it is useful
because every child class would need to calculate it anyway.
Signed-off-by: Janos Follath <janos.follath@arm.com >
2022-10-20 10:53:14 +01:00
c279b2fa4a
Move mbedtls_mpi_core_shift_r to the proper source file
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2022-10-20 11:40:15 +02:00
6641420951
Bignum core: Break shift_r function out of the classic shift_r
...
This commit contains the function prototype for mbedtls_mpi_core_shift_r,
and the implementation minimally modified from mbedtls_mpi_shift_r.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2022-10-20 11:40:15 +02:00
e153a715f0
mpi_core_add_if: simplify tests
...
Use the new, limb size aware base class to generate tests for
mpi_core_add_if().
Signed-off-by: Janos Follath <janos.follath@arm.com >
2022-10-20 10:40:03 +01:00
dd2e4683d0
Bignum Core: add limb size specific test generation
...
In Bignum Core the result also involves a carry and both the result and
the carry depend on the size of the limbs.
Before this change both 32 and 64 bit specific result have been passed
to the test functions.
Moving this decision out of the tests makes the test functions easier to
write and read and the test cases easier to read and debug. The change
doesn't make writing the generator script any harder and might even make
reading it easier.
Signed-off-by: Janos Follath <janos.follath@arm.com >
2022-10-20 10:38:22 +01:00
2bb9c8a884
Change brace initialization to memset
...
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2022-10-20 10:18:37 +01:00
2b751cfa46
Merge pull request #6399 from wernerlewis/bignum_gen_6274
...
Split bignum tests by module and generate with Python framework
2022-10-20 09:29:56 +01:00
01dd548025
Minor fixes to x509_get_name() test function
...
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2022-10-19 17:13:57 +01:00
f1c24f0fbc
Add missing include
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 16:43:22 +01:00
bd3ddafee2
Move tests added in #6289
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:36:18 +01:00
f86c82e8f3
Pass bits_in_limb parameter to duplicated methods
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
63653b9b0a
Remove unnecessary check
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
6baf12b18d
Move legacy mod functions back to test_suite_mpi
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
2295eecb12
Add missing space in string
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
ffe4478936
Move mpi_core_bitlen tests to bignum_core files
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
1b20e7e645
Redefine result() method to return List
...
Many bignum tests have multiple calculated result values, so return
these as a list, rather than formatting as a string.
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
7a2731463b
Add function to generate random montmul cases
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
a850312e9d
Add test generation for mpi_core_montmul
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
0a9c48b68e
Add test generation for mpi_core_mla
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
bbf0a32d67
Add flag for unique combinations in operations
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
6351c7f5f3
Add test generation for mpi_core_sub
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
ce769d1fc9
Add test generation for mpi_core_add_if
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
99e8178fa7
Add module for bignum_core test generation
...
Separate file is added for classes used to generate cases for tests
in bignum_core.function. Common elements of the BignumOperation class
are added to classes in a new common file, for use across files.
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
0c6ea12145
Move bignum_mod tests into separate files
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
c9b6a0aef9
Move bignum_mod_raw tests into separate files
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:20:01 +01:00
c6004a2ab3
Move bignum_core tests into separate files
...
Test cases for mpi_core_add_if, mpi_core_mla, mpi_core_sub,
mpi_core_montmul are not copied into new files, these are generated in
subsequent commits.
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-10-19 15:19:53 +01:00
149c1516e7
Merge pull request #6435 from mpg/improve-outcome-analysis
...
Improve outcome analysis for driver-only builds
2022-10-19 15:54:17 +02:00
4281ae0bd2
Merge pull request #6373 from gilles-peskine-arm/bignum-core-conventions
...
Spell out bignum core conventions
2022-10-19 15:53:33 +02:00
db2996357c
Merge pull request #6289 from gabor-mezei-arm/6237_Add_conditional_assign_and_swap_for_bignum
...
Bignum: Add safe conditional assign and swap for the new MPI types
2022-10-19 15:51:19 +02:00
f4b8a4f971
pylint: ignore duplicated imports
...
It is not uncommon to have the same imports
across different python files. Ignore it when
running pylint.
Starting at pylint 2.14.5 this is the default value.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 09:13:11 -04:00
b8a97e7520
depends.py: rename domains argument to tasks
...
Tasks can consist of domains and/or jobs.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00
629c412e81
depends.py documentation fixes
...
Now that the format of exclusive groups has been changed,
update the documentation using it too.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00
9387b7b34e
Add a temporary solution to create a seedfile
...
This caused problems if a config with SHA512 was
compiled after a config without it and the seedfile
did not contain enough data.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00
b489f958b8
depends.py: remove config options that are unset anyway
...
Over the lifespan of this script these options have been removed
from the "full" configuration.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00
a44c5bcdb7
depends.py: rename config_pl usage to config_py
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00
22b959d9a5
depends.py - add SHA256 dependency of LMS
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00
c610e7402e
Formatting & unnecessary (void) fixes
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00
65b2ac1f1d
Change the way exclusive groups are defined in depends.py
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00
f4b18672ff
depends.py: fix TLS 1.3 requirements
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00
a0cb4fa302
Improve depends.py readability
...
Switch from SHA224 & SHA384 testing to SHA256 and SHA512.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00
b50754ae86
Switch from x509_CRT_PARSE to KEY_EXCHANGE_WITH_CERT_ENABLED
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00
e5535e3123
Add MBEDTLS_DES_C exclusive group dependencies
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00
d0786f5f26
Revert one of the changes to ssl_server2 dependencies
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2022-10-19 08:35:09 -04:00