mbedtls/tests/psa-client-server/psasim
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
..
include Revert "Adapt psasim" 2024-07-22 12:29:17 +02:00
src Refactor tests and programs comment 2024-11-20 16:20:52 +00:00
test psasim: small fixes to all.sh and test bash scripts 2024-08-06 11:52:00 +02:00
tools psa_autogen.py: improve management of output files 2024-05-16 16:13:38 +02:00
.gitignore psa-client-server: move psasim from framework repo to the mbedtls one 2024-05-03 17:28:04 +02:00
Makefile Revert "Adapt psasim" 2024-07-22 12:29:17 +02:00
README.md psa-client-server: move psasim from framework repo to the mbedtls one 2024-05-03 17:28:04 +02:00

psasim

This tool simulates a PSA Firmware Framework implementation. It allows you to develop secure partitions and their clients on a desktop computer. It should be able to run on all systems that support POSIX and System V IPC: e.g. macOS, Linux, FreeBSD, and perhaps Windows 10 WSL2.

Please note that the code in this directory is maintained by the Mbed TLS / PSA Crypto project solely for the purpose of testing the use of Mbed TLS with client/service separation. We do not recommend using this code for any other purpose. In particular:

  • This simulator is not intended to pass or demonstrate compliance.
  • This code is only intended for simulation and does not have any security goals. It does not isolate services from clients.

Building

To build and run the test program make sure you have make, python and a C compiler installed and then enter the following commands:

make run

Optionally the DEBUG=1 command line option can be enabled to increase verbosity:

make DEBUG=1 run

Once done with the test, it is possible to clean all the generated files with:

make clean

Features

The implemented API is intended to be compliant with PSA-FF 1.0.0 with the exception of a couple of things that are a work in progress:

  • psa_notify support
  • "strict" policy in manifest

The only supported "interrupts" are POSIX signals, which act as a "virtual interrupt".

The standard PSA RoT APIs are not included (e.g. cryptography, attestation, lifecycle etc).

Design

The code is designed to be readable rather than fast or secure. In this implementation only one message is delivered to a RoT service at a time. The code is not thread-safe.

Unsupported features

Because this is a simulator there are a few things that can't be reasonably emulated:

  • Manifest MMIO regions are unsupported
  • Manifest priority field is ignored
  • Partition IDs are in fact POSIX pid_t, which are only assigned at runtime, making it infeasible to populate pid.h with correct values.