Valerio Setti
e9829e59c5
psasim: add AUT for cipher encryption/decryption
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:17:32 +02:00
Valerio Setti
87be9db668
psasim: add AUT for key derivation
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:17:32 +02:00
Valerio Setti
a06b22d709
psasim: add AUT for symmetric encryption/decryption
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:17:13 +02:00
Valerio Setti
bb1502b804
psasim: add AUT for PSA sign and verify
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:16:50 +02:00
Valerio Setti
6d6fe8b2d5
psasim: add AUT for key generation and raw key agreement
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:16:39 +02:00
Valerio Setti
f79e17a3d5
psasim: add AUT for MAC
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:16:25 +02:00
Valerio Setti
25afdc1309
psasim: add AUT for psa_generate_random()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:16:00 +02:00
Valerio Setti
5beb236835
psasim: merge all AUT programs into a single executable
...
This makes both building and testing much faster.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:15:30 +02:00
Tom Cosgrove
d32fac276d
psasim: have the generator script check for type = "void" rather than name = "(void)"
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:03:01 +02:00
Tom Cosgrove
4d8d5569d8
psasim: add support for psa_reset_key_attributes()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:10 +02:00
Tom Cosgrove
feb021695a
psasim: add support for psa_copy_key()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:10 +02:00
Tom Cosgrove
05c99e13e6
psasim: add support for psa_{sign,verify}_hash_xxx() and get/set max ops
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:09 +02:00
Tom Cosgrove
9b10cf7e39
psasim: add support for PSA functions that return uint32_t or void
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:08 +02:00
Tom Cosgrove
1a8b805cf5
psasim: add support for key functions that don't need psa_key_attributes_t
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:08 +02:00
Tom Cosgrove
8f1c913e38
psasim: add support for psa_asymmetric_{encrypt,decrypt}() to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:07 +02:00
Tom Cosgrove
6add43aac8
psasim: add support for psa_{sign,verify}_{message,hash}() to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:06 +02:00
Tom Cosgrove
5d4b9cb2e2
psasim: add support for psa_generate_key*() to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:06 +02:00
Tom Cosgrove
c3236b85da
psasim: add support for psa_key_derivation_xxx() and psa_raw_key_agreement() to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:05 +02:00
Tom Cosgrove
623fcb37d6
psasim: add the ability to serialise psa_key_production_parameters_t
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:04 +02:00
Tom Cosgrove
a2d81c9fb6
psasim: psa_key_derivation_verify_bytes() doesn't follow the naming convention for a buffer, so override
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:04 +02:00
Tom Cosgrove
c6d2e768d6
psasim: use ser_params and ser_result variable names in client; 'params' is needed by some PSA functions
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:03 +02:00
Tom Cosgrove
55b62dab75
psasim: skip some functions; see _SKIP_FUNCTIONS in generate_psa_wrappers.py
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:02 +02:00
Tom Cosgrove
a4eac4a84d
psasim: add support for psa_cipher_xxx() functions
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:02 +02:00
Tom Cosgrove
853ca0cdb0
psasim: add support for psa_mac_xxx() functions
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:01 +02:00
Tom Cosgrove
baace2f7ba
psasim: add support for psa_generate_random()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:01:29 +02:00
Tom Cosgrove
150b88c9d2
Merge pull request #9280 from valeriosetti/psasim-reset-slots-on-disconnection
...
psasim-server: add function to reset operations slots
2024-06-19 11:10:52 +01:00
Tom Cosgrove
125440d344
Merge pull request #9278 from valeriosetti/fix-psasim-logs
...
psa_sim: improve log prints
2024-06-19 11:03:05 +01:00
Ronald Cron
de0d7e6cd0
Merge pull request #9247 from ronald-cron-arm/move-psa-headers
...
Move PSA headers to a new tf-psa-crypto directory
2024-06-18 18:48:24 +00:00
Tom Cosgrove
a60d9223d6
Update psa_sim_serialise.pl to create the psa_sim_serialise.c we want
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-18 13:22:21 +01:00
Tom Cosgrove
37610024e9
Update psa_sim_generate.pl to create the psa_sim_crypto_client.c we want
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-18 14:10:55 +02:00
Valerio Setti
2eb8cc7d9d
psa_sim: improve log prints
...
- always print ERROR and FATAL messages because they should never
occur, but when they do it's important to see them immediately;
- keep INFO prints under DEBUG guard;
- set client's PRINT as INFO message because otherwise it will
mess test_suites's output;
- change some error messages from INFO to ERROR because that's
what they are.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-18 14:10:54 +02:00
Tom Cosgrove
2468896857
Have psa_sim_serialise.pl generate psa_sim_serialize_reset()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-18 12:32:57 +01:00
Tom Cosgrove
aaf7e859a4
Have psa_sim_generate.pl add psa_crypto_close() to psa_sim_crypto_server.c
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-18 12:31:57 +01:00
Valerio Setti
2fd9572f27
psasim-server: add function to reset operations slots
...
When the client disconnects the server can clean operations slots
so that upcoming clients will not hit the maximum slot limit
(at least it's very unlikely to happen for normal clients).
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-18 11:00:17 +02:00
Valerio Setti
2687e4797d
psa_sim: make server ping time much faster
...
Reduce server's ping time for messages from 50ms to 1us because
otherwise tests suites will take forever to execute.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-18 10:37:30 +02:00
Ronald Cron
c7e9e367bb
Adjust build systems
...
Adjust build systems such as we can build
Mbed TLS in the default and full configuration.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-13 09:02:24 +02:00
Tom Cosgrove
0fe5b8d4a3
Add support for and run (a copy of) the PSA aead_demo program under PSA sim
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-11 17:26:17 +01:00
Tom Cosgrove
98760124b8
Make it possible to pass arguments to PSA sim psa_client
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-11 17:21:15 +01:00
Tom Cosgrove
b923b473e7
Have PSA sim client wrappers say which call fails, if one does
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-11 17:19:31 +01:00
Valerio Setti
f98635c360
psasim: build server library and binary before client's ones
...
This allows to keep the same CONFIG_H while building the Mbed TLS
library and the application (no matter if it's client or server).
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-11 14:26:42 +01:00
Valerio Setti
75129e2ce3
psa_sim_crypto_[client/server]: check if CRYPTO_C is enabled
...
CRYPTO_C must or must-not be enabled on client and server
sides as follows:
- if it's enabled while building the client side it's a failure;
- it it's NOT enabled while building the server it's a failure.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-11 14:26:36 +01:00
Tom Cosgrove
51b2c86852
Use our own copy of programs/psa/psa_hash.c in the PSA simulator tests
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-11 14:26:03 +01:00
Tom Cosgrove
5ddd6591c3
Revert "Correctly build client-side code that's to be run under the PSA crypto sim"
...
This reverts commit e7a2230df7e9468f3a276edabe20a0705a492940.
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-11 14:26:03 +01:00
Tom Cosgrove
f252f61611
psa_sim_serialise.pl now creates the updated .c file
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 15:50:53 +01:00
Tom Cosgrove
db87a44898
psa_sim_serialise.pl now creates the updated .h file
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 15:50:13 +01:00
Tom Cosgrove
0d0415e6e0
Move the comment block in psa_sim_serialise.c back to where it belongs
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 15:49:02 +01:00
Tom Cosgrove
9ab19695b5
Make psa_sim_generate.pl output the new type of server wrapper we want
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 14:24:28 +01:00
Tom Cosgrove
517f4a1b4d
Store operation_ts on PSA sim server side; only send handle to client
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 14:08:04 +01:00
Tom Cosgrove
d6048a459c
We want the PSA hash code if MBEDTLS_PSA_CRYPTO_CLIENT && !MBEDTLS_PSA_CRYPTO_C
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 14:07:26 +01:00
Tom Cosgrove
e7a2230df7
Correctly build client-side code that's to be run under the PSA crypto sim
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 14:07:26 +01:00