431 Commits

Author SHA1 Message Date
Harry Ramsey
885ce72ca6 Remove duplicate demo_common.sh in tf-psa-crypto
This commit removes the duplicate demo_common.sh file in tf-psa-crypto
and instead use the demo_common.sh file in mbedtls/programs.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:35 +00:00
Harry Ramsey
ff57cc56ba Move program gitignore to tf-psa-crypto/programs
This commit moves programs from tf-psa-crypto/.gitignore to
tf-psa-crypto/programs/.gitignore.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:35 +00:00
Harry Ramsey
be20844c23 Update path in run_demos.py
This commit updates the path to programs in run_demos.py to
tf-psa-crypto/programs.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:35 +00:00
Harry Ramsey
8ee1b5d098 Update gitignore
Update gitignore in programs and tf-psa-crypto following the move of
multiple files.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:21:35 +00:00
Harry Ramsey
e9e316e8c5 Update path in programs/psa/CMakeList.txt
This commit updates the path to the generate_psa_constants.py script in
programs/psa/CMakeList.txt file.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
fb4824b496 Fix incorrect paths to generate_psa_constants.py
This commit fixes incorrect paths to generate_psa_constants.py after
being moves to tf-psa-crypto.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
61372efe95 Refactor tests and programs comment
This commit refactors comments refering to tf-psa-crypto for the
correct path upon repo split.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
e1d6f74b92 Move generate_psa_constants.py to tf-psa-crypto
This commit moves generate_psa_constants.py to tf-psa-crypto and updates
the paths inside the script necessary for that move.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
d66fb8475c Adjust psa program paths in CMakeLists
This commit adjusts the paths of programs/psa to tf-psa-crypto/programs
in CMakeLists.txt.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:52 +00:00
Harry Ramsey
75e8e030b1 Fix paths for programs/psa
This commit fixes paths for programs/psa to tf-psa-crypto/programs/psa.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:20:48 +00:00
Harry Ramsey
ced26059e3 Move psa programs to tf-psa-crypto directory
This commit moves psa programs from the programs/psa directory to
tf-psa-crypto/programs/psa directory.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-20 16:12:43 +00:00
David Horstmann
0223bc6dcc Update paths in TF-PSA-Crypto CMakeLists.txt
Some test build commands were moved to the CMakeLists.txt in the
tf-psa-crypto directory. Apply framework-related changes to this moved
section.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:45 +00:00
David Horstmann
5b93d97b95 Update references to test helpers
Replace:
* tests/src -> framework/tests/src
* tests/include -> framework/tests/include

Except for occurrences of:
* tests/src/test_helpers (since this only contains ssl_helpers.c)
* tests/src/test_certs.h
* tests/include/alt_dummy

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-11-18 15:50:44 +00:00
Janos Follath
fe4b02cc69
Merge pull request #9602 from paul-elliott-arm/add_key_agreement_negative_tests
Add key agreement negative tests
2024-11-18 13:02:03 +00:00
Ronald Cron
fee08b45e2
Merge pull request #9760 from ronald-cron-arm/tf-psa-crypto-cmake
Finalize the integration of the TF-PSA-Crypto build system into the Mbed TLS one
2024-11-15 17:05:16 +00:00
Paul Elliott
7267e56189 Fix incorrect return code
Code return differs from raw agreement, so tests fail.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Paul Elliott
c54fcc765e Add new psa_key_agreement() to key_agreement_fail()
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Paul Elliott
d118cd21d6 Fix definition of psa_generate_key_iop_complete()
Incorrect usage of psa_key_id_t breaks ability to regenerate psa_sim
headers properly, should have been mbedtls_svc_key_id_t in the first
place, so replace with that.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-14 19:07:58 +00:00
Ronald Cron
d779e95720 Fix cmake option name
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 16:25:34 +01:00
Ronald Cron
bea67a1ebf Fix everest build
Fix everest build following the merge of
9490. By the way removed an unnecessary
link of the everest lib to mbedtls test
executable. It comes through the mbedtls
library that gets it from the tfpsacrypto
library.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 11:27:49 +01:00
Ronald Cron
0381a98114 cmake: Move copy of crypto libraries to mbedtls
Move copy of crypto libraries to mbedtls as this
copy does not make sense in TF-PSA-Crypto context.
Also copy all of them, not just tfpsacrypto.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:28:27 +01:00
Ronald Cron
8126a686d9 cmake: Rename mbedcrypto library to tfpsacrypto
Do not do the same in the make build system yet,
cmake build system only scope for this PR.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:28:27 +01:00
Ronald Cron
b7d0e52e16 cmake: Rename mbedcrypto target to tfpsacrypto
Rename mbedcrypto target to tfpsacrypto and
prefix all cmake related variables with
tfpsacrypto instead of mbedcrypto.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:28:27 +01:00
Ronald Cron
020e026779 cmake: tf-psa-crypto: Add cmake_subproject test program
The empty framework directory is temporary. It will be
removed when TF-PSA-Crypto uses its framework submodule.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:28:21 +01:00
Ronald Cron
97cfd707ee tf-psa-crypto: cmake: Let TF-PSA-Crypto.cmake be the top cmake file
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
d3b33a2e81 Finalize TF-PSA-Crypto.cmake to become the top cmake file
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
ba850f3207 Rename export MbedTLSTargets to TF-PSA-CryptoTargets
Keep installations on MbedTLSTargets export
crypto libraries for the sake of mbedtls.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
2609fe9155 cmake: tf-psa-crypto: Rename mbedtls_test to tf_psa_crypto_test
To avoid conflict between the two targets when
the integration of the TF-PSA-Crypto cmake build
system into the Mbed TLS one is completed.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
a9219ff73d Add project prefix to API documentation targets
To avoid conflict between the two targets when
the integration of the TF-PSA-Crypto build system
into the Mbed TLS one is completed.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
169393e6ae Restrict the definition of memcheck/lcov targets
Restrict the definition of memcheck/lcov targets
to the case where Mbed TLS/TF-PSA-Crypto is the
main project. To avoid conflict between the
targets when the integration of the TF-PSA-Crypto
build system into the Mbed TLS one is completed.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
564b1cb643 tf-psa-crypto: cmake: Fix target for compile options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:47 +01:00
Ronald Cron
13a7ccec76 Align all.sh tf-psa-crypto components naming
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:06:29 +01:00
Ronald Cron
211bf6de21 cmake: Fix config files compile definitions
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 08:52:20 +01:00
Manuel Pégourié-Gonnard
30e8eb9847 Update path to all-core.sh
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-11-12 11:57:46 +01:00
Janos Follath
241b9012a0
Merge pull request #9490 from waleed-elmelegy-arm/add-iop-key-agrmnt-api
Add PSA interruptible key agreement APIs
2024-11-11 09:29:16 +00:00
Gilles Peskine
4c58e89976
Merge pull request #9613 from gilles-peskine-arm/remove-rsa-psk-key-exchange
Remove RSA-PSK key exchange
2024-11-07 15:09:05 +00:00
Waleed Elmelegy
947afa05d6 Remove designated initializers from ECDH compile time initializers
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-07 15:06:28 +00:00
Manuel Pégourié-Gonnard
e248de54bf
Merge pull request #9720 from mpg/all.sh-tf-psa-crypto-dev
All.sh add support for tf-psa-crypto components
2024-11-07 08:49:44 +00:00
Paul Elliott
fc140d0c6b
Merge pull request #9672 from gilles-peskine-arm/coverity-20241004
Fix edge cases of mbedtls_psa_raw_to_der and mbedtls_psa_der_to_raw
2024-11-06 19:03:13 +00:00
Gilles Peskine
b48d5263c5
Merge pull request #9758 from gilles-peskine-arm/move-test_suite_psa_crypto_ecp
Move new test suite to the tf-psa-crypto directory
2024-11-06 17:56:30 +00:00
Waleed Elmelegy
7817da0833 Improve and fix compile initializers for ECDH/ECP
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
a4d0fd1143 Fix a typo and a mistake in ECDH conext compile time initalizer
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
97041ed399 Fix Documentation issue in mbedtls_psa_key_agreement_iop_setup()
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
e980fbe291 Fix codestyle in ECDH compile time initilaizers
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
f840b3a2c0 Add compile time initilaizers to ECDH and bignum structs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
280e22518e Add small fixes to iop key agreement APIs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
cd721b9870 Add a common key agreement parameter validation function across iop and normal APIs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
18df1c560a Refactor and improve interuptible key agreement builtin implementation
- rename psa_driver_wrapper_key_agreement_xxx to
  psa_driver_wrapper_key_agreement_iop_xxx.
- reorganise the paraemters of psa_driver_wrapper_key_agreement_setup

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
86e518b7bd Remove interuptible key agreement driver interface
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00
Waleed Elmelegy
842213811d Fix possible error in initalizing key agreement iop struct
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:49 +00:00