Valerio Setti
65df79303f
psa_crypto_ecp: return unsupported for secp224k1 in check_ecc_parameters()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
ac73952474
test_suite_psa_crypto: improve failing tests for EC conversion functions
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
4ba0c61eda
test_suite_psa_crypto: add test case for ECP conversion with null values
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
afa01c7394
psa-transition: update "Elliptic curve mechanism selection" section
...
- add hyperlinks for the conversion functions.
- move conversion functions' description before the legacy<->PSA table.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
fc8a48a9e3
changelog: fix working
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
0bc8598d20
psa_util: properly handle secp224r1 private key size
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
8bd330dff5
changelog: add missing newline
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
ad819679a5
test_suite_psa_crypto: explicitly check return values of conversion functions
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
0e608807e3
psa: let mbedtls_ecc_group_from_psa() accept only exact bit lengths
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
dc33200b74
psa-transition: extend "Elliptic curve mechanism selection"
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
90e764c1bf
changelog: added documentation for the 2 new public functions
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
bf999cb22e
test_suite_psa_crypto: add test functions and cases for ECC conversion functions
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
3b7663de29
psa_util: update the documentation of ECC conversion functions
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
673868be5d
psa_crypto_ecp: add helper for checking EC parameters
...
This commit also updates "test_suite_psa_crypto.data" replacing
PSA_ERROR_NOT_SUPPORTED with PSA_ERROR_INVALID_ARGUMENT when
a wrong bit size is provided while importing key.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
d36c313b53
psa: remove bits_is_sloppy parameter from mbedtls_ecc_group_from_psa()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Valerio Setti
ddba51e6c9
psa: rename "mbedtls_ecc_group_of_psa" to "mbedtls_ecc_group_from_psa"
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
Manuel Pégourié-Gonnard
454ab28be5
Merge pull request #8668 from gilles-peskine-arm/asymmetric_key_data-secpr1
...
Fix incorrect test data for SECP_R1 in automatically generated tests
2024-01-09 09:21:14 +00:00
Manuel Pégourié-Gonnard
60c9eee267
Improve wording & fix typos
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2024-01-09 10:09:17 +01:00
Manuel Pégourié-Gonnard
481dd0b3e6
Merge pull request #8649 from valeriosetti/issue8646
...
check_config.h not complete about builds without CIPHER_C
2024-01-09 08:45:30 +00:00
Valerio Setti
dd2afcd881
Revert "psa_util: add algorithm's availability checks for MD conversion functions"
...
This reverts commit 3d2e0f5f42
.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 08:41:29 +01:00
Valerio Setti
9b2d738ccd
Revert "test_suite_md: improve md_to_from_psa() test function and related data"
...
This reverts commit 2c1070b397
.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 08:41:21 +01:00
Valerio Setti
cd38f27206
Revert "psa_util: fix typo in comment"
...
This reverts commit 98f5db9fca
.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 08:41:03 +01:00
Valerio Setti
d5cab81405
mbedtls_config: update documentation for CIPHER_C and CRYPTO_C
...
Adding auto-enablement sections.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 07:23:33 +01:00
Valerio Setti
9772642b8c
adjust_legacy_crypto: auto-enable CIPHER_C when any builtin cipher is enabled in PSA
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 07:23:33 +01:00
Valerio Setti
1aaffec7cf
Revert "check_config: add check for PSA builtin unauthenticated ciphers"
...
This reverts commit d5d99e800a0d648e976a28819ab8709daabcab9b.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-08 16:57:18 +01:00
Valerio Setti
c95ab2a1a0
mbedtls_config: extend documentation for MBEDTLS_PSA_CRYPTO_C
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-08 16:57:18 +01:00
Valerio Setti
95c32973f9
check_config: add check for PSA builtin unauthenticated ciphers
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-08 16:57:18 +01:00
Manuel Pégourié-Gonnard
d0c6f70e58
Update architecture doc for cipher dual dispatch
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2024-01-08 11:35:01 +01:00
Manuel Pégourié-Gonnard
c1cea63478
Quickly mention the status of RSA accel
...
Not related to other commits in this PR, should have been done in #8616
really, but since I'm updating the document, might as well do it here.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2024-01-08 11:35:01 +01:00
Manuel Pégourié-Gonnard
88bae8bc52
Rename tests components for clarity
...
All no_cipher components have crypto (as in libmbedcrypto.a), but the
difference is one doesn't have PSA crypto while the other two do.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2024-01-08 11:35:01 +01:00
Manuel Pégourié-Gonnard
7f48d5e203
Rename test components to better reflect content
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2024-01-08 11:35:01 +01:00
Manuel Pégourié-Gonnard
dc4103e9aa
Clarify CCM/CM with partial accel
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2024-01-08 11:35:01 +01:00
Manuel Pégourié-Gonnard
a57278151b
Update ChangeLog for CCM/GCM improvements
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2024-01-08 11:35:01 +01:00
Manuel Pégourié-Gonnard
729cf89704
Consolidate ChangeLog entries about CIPHER_C
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2024-01-08 11:35:01 +01:00
Manuel Pégourié-Gonnard
4aad0ff510
Merge pull request #8632 from valeriosetti/issue8598
...
[G5] Make block_cipher work with PSA
2024-01-08 08:07:53 +00:00
Paul Elliott
053db696b3
Allow programs/fuzz to be linked against pthread
...
Use the same mechanisms used to link other programs against pthread with
make, i.e. include common.make, and remove common code from programs/
fuzz/Makefile
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 21:05:23 +00:00
Paul Elliott
7ed1cf57ba
Enable common.make to be included by programs/fuzz
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 21:04:59 +00:00
Paul Elliott
4068c7e47c
Link programs with pthread via cmake
...
All programs are now linked directly with all test code, thus adding a
pthread abstraction into the test code means having to link the programs
with pthread (if the library is found under cmake).
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 21:04:52 +00:00
Paul Elliott
3dce2327ab
Use new thread abstraction for ctr_drbg tests
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 21:04:52 +00:00
Paul Elliott
3a4d2f14a8
Add test thread create/join abstraction
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 21:04:52 +00:00
Paul Elliott
17c119a5e3
Migrate to threading_helpers.h
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 21:04:52 +00:00
Paul Elliott
5c498f355d
Use mbedtls_test_info accessors internally as well
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 19:13:43 +00:00
Paul Elliott
4580d4d829
Add accessor helpers for mbedtls_test_info
...
Step one of being able to control access to mbedtls_test_info with
a mutex.
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 19:13:43 +00:00
Valerio Setti
98f5db9fca
psa_util: fix typo in comment
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-05 18:17:38 +01:00
Waleed-Ziad Maamoun-Elmelegy
e2d3db5cfc
Update mbedtls_ssl_get_output_record_size_limit signature
...
Co-authored-by: Ronald Cron <ronald.cron@arm.com >
Signed-off-by: Waleed-Ziad Maamoun-Elmelegy <122474370+waleed-elmelegy-arm@users.noreply.github.com >
2024-01-05 14:19:16 +00:00
Valerio Setti
3742f7c4b4
changelog: improve wording
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-05 10:37:58 +01:00
Ryan Everett
6a9c14b918
Update mbedtls_psa_get_stats
...
Uses readers to report "locked_slots",
and slot state empty to report "empty_slots".
Signed-off-by: Ryan Everett <ryan.everett@arm.com >
2024-01-04 16:57:48 +00:00
Ryan Everett
6cd2b8db96
Update psa_wipe_all_key_slots
...
This will still wipe the slot regardless of state/readers.
Signed-off-by: Ryan Everett <ryan.everett@arm.com >
2024-01-04 16:57:48 +00:00
Ryan Everett
1b70a07eca
Replace psa_unlock_key_slot calls in operations which act on FULL slots
...
Replaces calls to psa_unlock_key_slot with calls to psa_unregister_read.
All instances follow a pattern of a call to psa_get_and_lock_key_slot_X,
followed by some code which reads from a slot, followed by a call to psa_unregister_read.
Signed-off-by: Ryan Everett <ryan.everett@arm.com >
2024-01-04 16:57:48 +00:00
Ryan Everett
eb27dc0f3a
Update psa_load_X_key_into_slot
...
These functions (on success) take a slot from PSA_SLOT_FILLING to PSA_SLOT_FULL.
Signed-off-by: Ryan Everett <ryan.everett@arm.com >
2024-01-04 16:57:48 +00:00