-
Notifications
You must be signed in to change notification settings - Fork 42
Move psasim into framework #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
minosgalanakis
wants to merge
146
commits into
Mbed-TLS:main
Choose a base branch
from
minosgalanakis:rework/move-psasim
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a temporary fix that will be reverted once the framework repository will have CI checks. Signed-off-by: Valerio Setti <[email protected]>
…and server It includes changes to: - tests/Makefile: build the library for client and server in different folders. It mimica the libtestdriver1 behavior (without functions renaming though). - tests/scripts/all.sh: helper function to build for client and server with some default configuration for each of them. - crypto_spe.h: this is dummy file taken from the already existing tests. It's just meant to pacify the compiler, not to provide something useful. It will likely be changed in the future. Signed-off-by: Valerio Setti <[email protected]>
…er MbedTLS libraries Ensure that both server and client can call mbedtls_version_get_string_full() to verify that they are linked against proper libraries. Note: each side (client/server) performs the call against its own MbedTLS library. There is no IPC communication involved in this test. Client/server communication will come later. Signed-off-by: Valerio Setti <[email protected]>
This commit implements the first useful IPC communication between the client and the server. The implemented command is simple, psa_crypto_init(), and its return value is sent back to the client. Note: the newly added file psa_functions_codes.h is temporary and it's probably the one that needs to be automatically generated by a python script to support all crypto functions. Signed-off-by: Valerio Setti <[email protected]>
The goal is to keep psasim as simple as possible: - do not build a separate lib for psa-ff; build those source files as part of server or client - do not have lot of different makefiles: just 1 that does all we need - do not have several subfolders for headers: only 1 is enough for this kind of project Signed-off-by: Valerio Setti <[email protected]>
Instead of copying the entire library & include folders twice to build libraries for client and server: - change the main config file (mbedtls_config.h) - build in the root library folder - move the generated library in the psasim folder - use those library for linking the client/server binaries Signed-off-by: Valerio Setti <[email protected]>
Signed-off-by: Valerio Setti <[email protected]>
Signed-off-by: Valerio Setti <[email protected]>
Add DEBUG=1 in test_psasim() to helpers and final make to build the libraries and the final binaries with debug symbols enabled. Signed-off-by: Valerio Setti <[email protected]>
Signed-off-by: Valerio Setti <[email protected]>
This allows to re-enable MBEDTLS_ENTROPY_NV_SEED since the seedfile is correctly found in the "test" folder at runtime. Signed-off-by: Valerio Setti <[email protected]>
While at this, fix also Makefile so that "make clean" does not complain if some of the files to be cancelled do not exist. Signed-off-by: Valerio Setti <[email protected]>
Signed-off-by: Tom Cosgrove <[email protected]>
…ctly Signed-off-by: Tom Cosgrove <[email protected]>
Signed-off-by: Tom Cosgrove <[email protected]>
…write() Signed-off-by: Tom Cosgrove <[email protected]>
Signed-off-by: Tom Cosgrove <[email protected]>
Signed-off-by: Tom Cosgrove <[email protected]>
Signed-off-by: Tom Cosgrove <[email protected]>
Not hooked into the build yet Signed-off-by: Tom Cosgrove <[email protected]>
…or psa_hash_compute() Still not used Signed-off-by: Tom Cosgrove <[email protected]>
…ute() A Perl script that creates them is also included as reference. This is not the final script (that will be in Python) but a proof-of-concept to show that creaation client and server wrappers can be scripted. It is not hooked into the build: it must be run manually. It is not part of the deliverables for this PR. Signed-off-by: Tom Cosgrove <[email protected]>
Signed-off-by: Tom Cosgrove <[email protected]>
- smoke test client.c becomes a trivial call to psa_crypto_init() - server.c now uses psa_sim_crypto_server.c's psa_crypto_call() - Makefile is updated to build all the modules, and allow a different MAIN - all.sh's test_psasim now tests the simulation of psa_hash_compute() too Signed-off-by: Tom Cosgrove <[email protected]>
…SA hash APIs Signed-off-by: Tom Cosgrove <[email protected]>
Signed-off-by: Tom Cosgrove <[email protected]>
Signed-off-by: Tom Cosgrove <[email protected]>
Signed-off-by: Tom Cosgrove <[email protected]>
…en they're no longer needed Signed-off-by: Tom Cosgrove <[email protected]>
Signed-off-by: Tom Cosgrove <[email protected]>
Non generated code was unfortnuately added to psa_sim_crypto_server.c, fix that by adding it to the generation scripts. Signed-off-by: Paul Elliott <[email protected]>
Signed-off-by: Paul Elliott <[email protected]>
This commit fixes paths for programs/psa to tf-psa-crypto/programs/psa. Signed-off-by: Harry Ramsey <[email protected]>
This commit refactors comments refering to tf-psa-crypto for the correct path upon repo split. Signed-off-by: Harry Ramsey <[email protected]>
This commit also includes regenerated C and H files. Signed-off-by: Valerio Setti <[email protected]>
This commit also includes regenerated C and H files. Signed-off-by: Valerio Setti <[email protected]>
[development] md: allow dispatch to PSA whenever CRYPTO_CLIENT is enabled
The README file content dates back to the early stages of PSASIM development. Since then a lot of things have changed, so the README file required a complete rewrite. Signed-off-by: Valerio Setti <[email protected]>
Signed-off-by: Valerio Setti <[email protected]>
[development] Remove the dynamic SE interface in 4.0
Signed-off-by: Felix Conway <[email protected]>
psasim: update README file
[development] Remove MBEDTLS_PSA_INJECT_ENTROPY
Signed-off-by: Valerio Setti <[email protected]>
…ization warning Signed-off-by: Felix Conway <[email protected]>
…MINATED_STRING This macro applies __attribute__((nonstring)) when using a compiler that supports it Signed-off-by: Felix Conway <[email protected]>
Signed-off-by: Felix Conway <[email protected]>
Signed-off-by: Ari Weiler-Ofek <[email protected]>
Signed-off-by: Ari Weiler-Ofek <[email protected]>
[Development] Fix GCC 15 warning 'Wunterminated-string-initialization'
This commit was generated using the following command:
sed -i 's/\(^\|[^_]\)common\.h/\1tf_psa_crypto_common.h/g' \
$(git ls-files . \
':!:programs/fuzz' \
':!:tests/psa-client-server' \
':!:tf-psa-crypto' \
':!:framework') \
$(git grep -l 'tf-psa-crypto/core/common.h')
Signed-off-by: Bence Szépkúti <[email protected]>
Rename tf-psa-crypto/core/common.h
Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Anton Matkin <[email protected]>
…erge-public-20250916 mbedtls: : merge public into restricted 2025-09-16
This is required in util.h in PSASIM as it uses fprintf. Previously stdio was inadvertantly included via psa/crypto_struct.h (of all places). Signed-off-by: David Horstmann <[email protected]>
… mbedtls-4.0.0.rc Signed-off-by: Minos Galanakis <[email protected]>
Signed-off-by: Minos Galanakis <[email protected]>
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Part of the work required by Mbed-TLS/mbedtls#10487. Psasim was originally places in framework directory, but moved to mbedtls while we were workign on it. Now this PR is migrating it back, while preserving the history