94 Commits

Author SHA1 Message Date
Gabor Mezei
6763a5546a
Update comments
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
655c487edb
Update dependencies
Added `MBEDTLS_CIPHER_MODE_XTS` as a dependency for `PSA_WANT_ALG_XTS`.
Otherwise, `MBEDTLS_CIPHER_MODE_XTS` is always enabled which enables a
lot of code we would like to be disabled when testing CFB/CTR... only.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
af198c2ee5
Rename variable
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
242806ad6f
Update dependencies
All cipher padding methods depend on CBC. To aviod switching it off
add this dependency to all of the methods and handle it as a common dependency.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
a5f35296bd
Update comment
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
95be5fb18b
Add support for common dependencies in exclusive groups
When elements of an exclusive group have dependencies in common turning them off
breaks the elements build. Support added to handle and ignore these dependencies
when only one of the elements is enabled.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
e191c0358e
Update the dependencies of the cipher algorithms
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
5a61086748
Test all cipher algorithm
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:26:34 +01:00
Gabor Mezei
6f77baff68
Use PSA macros for the chipher_chaining domain
Exclude the XTS mode because it is not implemented via the PSA API.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-12 18:25:05 +01:00
Ronald Cron
101816b41f
Merge pull request #9612 from gabor-mezei-arm/9141_update_depends.py_cipher_id_domain
Update the `cipher_id` domain to use PSA macros in `depends.py`
2024-11-08 15:32:39 +00:00
Gabor Mezei
bd8e81834f
Fix pylint issue
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-06 11:25:01 +01:00
Gilles Peskine
ac767e5c69 Remove MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
Remove the configuration option MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED and all
code guarded by it. This remove support for the RSA-PSK key exchange in TLS
1.2.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-11-05 15:49:01 +01:00
Gabor Mezei
e6cfa3b428
Update dependencies
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-04 17:43:12 +01:00
Gabor Mezei
fb6b0dbbfd
Use crypto_knowledge to determine the cipher key types
Replace the old implementation which uses `cipher.h` to gather
information.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-04 17:43:12 +01:00
Gabor Mezei
03cc5921be
Collect key types
Use KeyType from crypto_knowledge to use its functionality.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-04 17:43:12 +01:00
Gabor Mezei
06a060ddd8
Collect the cipher algorithms
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-04 17:43:10 +01:00
Gabor Mezei
402381d2a6
Collect the algorithms
Use Algorithm from crypto_knowledge to use its functionality.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-11-04 17:41:42 +01:00
Gabor Mezei
b50043b960
Update cipher_id domain to use PSA macros
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-22 16:55:19 +02:00
Gabor Mezei
4fef797450
Update macro dependencies
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-21 14:27:23 +02:00
Gabor Mezei
f10402c028
Update macro dependencies
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-21 14:27:22 +02:00
Gabor Mezei
c9f01cf8b5
Use f-string instead of concatenation
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-21 14:27:22 +02:00
Gabor Mezei
224152eec0
Remove unneeded newlines
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-21 14:27:22 +02:00
Gabor Mezei
fb06101b9f
Fix recursive dependencies for cross referencing
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-21 14:27:22 +02:00
Gabor Mezei
4e10d6c21d
Add consistency check for option avalability
The PSA and MbedTLS options can switch the same functionality separately
so add a check to ensure the cpnsistency.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-21 14:26:52 +02:00
Gabor Mezei
8f94485166
Fix dependency
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-21 14:26:52 +02:00
Gabor Mezei
610e6e2aea
Add PSA macro dependencies
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-21 14:26:52 +02:00
Gabor Mezei
8ec990bc45
Apply config dependecies recursively
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-21 14:26:52 +02:00
Gabor Mezei
9ce6d244f1
Remove depends.py option to use without PSA
Also removed test which uses this option.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-21 14:26:52 +02:00
Gabor Mezei
035d7c8cfa
Move file backup support to config_common.py
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-21 14:26:52 +02:00
Gabor Mezei
f5408f0909
Enable usage of crypto config in depends.py
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-10-21 14:26:52 +02:00
Gabor Mezei
f77722d67f
Rename calss
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:07 +02:00
Gabor Mezei
3678deed9d
Add crypto config support for config.py
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2024-07-25 11:00:00 +02:00
Ronald Cron
b50d30f338 Adapt cipher.h path in depends.py
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-01 14:59:35 +02:00
Gilles Peskine
35cb319832 depends.py: set unique configuration names in outcome file
Set unique configuration names in the outcome file. This was lost in the
rewrite from depends-*.pl to depends.py.

Fix #7290

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-12 17:32:44 +01:00
Dave Rodgman
84125a167e Merge remote-tracking branch 'origin/development' into default-compiler-all
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-02 11:42:38 +00:00
Gilles Peskine
259df98972 Revert "Add option to pass make variables to depends.py"
This reverts commit be978a8c4fc52965b486125f2993251025b1a399.

The feature is no longer needed, and the script is broken if you don't pass
--make-vars.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-22 13:17:33 +01:00
Dave Rodgman
5c7e94487e fix line length
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-21 15:42:22 +00:00
Dave Rodgman
3bc249959c
Merge branch 'development' into default-compiler-all
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-21 14:35:14 +00:00
Dave Rodgman
590519f535 Enable -O2 in depends.py
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 11:33:55 +00:00
Paul Elliott
be978a8c4f Add option to pass make variables to depends.py
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-12-18 14:49:34 +00:00
Dave Rodgman
4eb44e4780 Standardise some more headers
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-03 12:15:12 +00:00
Dave Rodgman
16799db69a update headers
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-02 19:47:20 +00:00
Dave Rodgman
d680d4fbf9 SHA256 renaming - fix some missed things
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-11 11:05:22 +01:00
Gilles Peskine
884b462044 When subtracting classic symbols from full, turn off PSA_CRYPTO_CONFIG
Otherwise unwanted algorithms creep back from the default-on PSA_WANT
symbols.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-21 17:50:49 +02:00
Valerio Setti
15e7044627 test: update depends.py with new dependencies
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-16 16:03:47 +02:00
Pol Henarejos
d06c6fc45b
Merge branch 'development' into sha3
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-05-05 16:01:18 +02:00
Manuel Pégourié-Gonnard
5a51d0d789 Fix depends.py failure with correct TLS 1.2 deps
TLS 1.2 has never been able to work with only SHA-512, it just happened
to pass previously because the declared dependencies were too lax.
(Probably related to the fact that in the past we didn't distinguish
between SHA-512 and SHA-384 in dependencies.)

So, just disable all of TLS in SHA-512-only builds. While at it, tune
build_info.h to make this easier - it already had partial support for
disabling TLS 1.2 or TLS 1.3 in an easier way, but not both of them at
the same time.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-03-24 10:43:40 +01:00
Pol Henarejos
f61d6c0a2b
Merge branch 'development' into sha3 2023-03-04 00:03:06 +01:00
Gilles Peskine
57897b8d6a
Merge pull request #6493 from AndrzejKurek/pymod
Use `config.py` as a module in `depends.py`
2023-03-02 15:38:47 +01:00
Andrzej Kurek
72082dc28e Improve tests/scripts/depends.py code
As suggested by gilles-peskine-arm.

Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-02-15 05:20:33 -05:00