aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-28Add check for unsupported partial curves accelerationManuel Pégourié-Gonnard
Manual test: run test_psa_crypto_config_accel_ecc_non_weierstrass_curves or test_psa_crypto_config_accel_ecc_weierstrass_curves as they are now, observe it failing with the expected #error. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28Add check for unsupported partial key type accelerationManuel Pégourié-Gonnard
Tested manually as follows: in component_test_psa_crypto_config_accel_ecc_some_key_types, modify loc_accel_list to remove one of the key types between helper_libtestdriver1_make_drivers and helper_libtestdriver1_make_main, and observe that the 2nd build fails with the expected #error. Note: removing one of the key types before helper_libtestdriver1_make_drivers causes the build of libtestdriver1 to fail, which is quite acceptable, just not what we're trying to observe. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28Fix typo: weiErstrassManuel Pégourié-Gonnard
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28Use lowercase for local variablesManuel Pégourié-Gonnard
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28Adjust handling of special case for DERIVEManuel Pégourié-Gonnard
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28Rename macros for consistencyManuel Pégourié-Gonnard
It's spelled KEY_TYPE everywhere else. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28Update docs/driver-only-builds.mdManuel Pégourié-Gonnard
Latest changes: - logic about the relationship between curves, key types and algs (8075) - building without bignum is no longer "coming soon", it's there :) Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28Improve documentation about driver-only p256-m.Manuel Pégourié-Gonnard
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28Remove now-redundant testsManuel Pégourié-Gonnard
These were temporaries to avoid unwanted use of low-level modules. Now that we have test components with those modules fully disabled (replaced with drivers), we no longer need these tests - which were out of date too. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28Auto-enable ACCEL macros for p256-m driverManuel Pégourié-Gonnard
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28Update list of p256-m entry pointsManuel Pégourié-Gonnard
There was a bit of a race condition between #8041 which introduced the new entry points, and #8203 which documented the list of entry points. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28Don't extend support for deprecated functionsManuel Pégourié-Gonnard
Restore guards from the previous release, instead of the new, more permissive guards. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-28Update ChangeLog for ECC.BN EPICManuel Pégourié-Gonnard
Actually not much to change there, from a high level perspective things are quite simple: you used to be able to disable ECP_C, now you can disable BIGNUM_C too. There will be more to update in driver-only-build.md which is the right place for a more detailed explanation of the limitations. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-27Merge pull request #8260 from gilles-peskine-arm/crypto_spe-include-fixGilles Peskine
Fix include path to psa/crypto_spe.h
2023-09-27Ensure tests will fail if CMake generation failsDavid Horstmann
Remove the in-source-tree generated files before running CMake. Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-09-27Update padding const-time fix changelogDave Rodgman
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-27Merge pull request #8075 from valeriosetti/issue8016Dave Rodgman
driver-only ECC: curve acceleration macros
2023-09-27Put crypto_spe.h on the include search path where neededGilles Peskine
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-27Document that MBEDTLS_PSA_CRYPTO_SPM needs crypto_spe.hGilles Peskine
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-27Fix include path to psa/crypto_spe.hGilles Peskine
We can't have a public header or library file reference our test environment (except possibly under test-only options, and even so, it would be with great reluctance). This breaks the build for other people. Fix #8259. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-27Add CMake include path for generated headerDavid Horstmann
Now that we are generating psa_crypto_driver_wrappers.h, we need to pass build/library as an include directory. Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-09-27Add ChangeLog entry for change in driver config APIManuel Pégourié-Gonnard
While this was arguably a bug as much as it is a change, I'm choosing the "API changes" section in order to give this more visibility as it seems likely to "break" (that is, compile in the built-implementation when it isn't desired) the build of some people who were relying on the old behaviour by not declaring which curves were accelerated (as most of our tests did before this PR). Said otherwise, as a user, I expect that most of the time "Bugfix" is for things that were not working and are now working, but here interested users are more likely to see it as "previously doing what I want, but now no longer doing what I want unless I make changes to my code". (Though of course there's no clear distinction, see xkcd 1172.) Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-27Document limitation on "mixed" buildsManuel Pégourié-Gonnard
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-26Merge pull request #8253 from paul-elliott-arm/fix_travis_coverity_buildGilles Peskine
Re-add python install of requirements to Travis CI
2023-09-26Re-add python install of requirements to Travis CI.Paul Elliott
Also correct 'distro to 'dist' and update ubuntu to jammy and python to 3.10 to attempt to fend off future issues. Too much got removed when disabling travis and the Coverity scan build was failing on 'make generated-files', due to lack of installed python dependencies. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-09-26Merge pull request #1080 from ↵Gilles Peskine
gilles-peskine-arm/parse_attribute_value_der_encoded-buffer_overflow Fix buffer overflow in parse_attribute_value_der_encoded
2023-09-26Merge pull request #7980 from xkqian/codesize_exclude_psa_wrappersDave Rodgman
Codesize exclude psa wrappers
2023-09-26Add build with only some ECC key types acceleratedManuel Pégourié-Gonnard
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-26Add build with some curves accelerated but not allManuel Pégourié-Gonnard
I chose to divide along the lines of Weierstrass vs other curve shapes (currently just Montgomery), mainly because it's the first thing that came to mind. It happened to reveal an issue in the logic for when (deterministic) ECDSA and ECJPAKE are built-in, which this commit is also fixing. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-26Fix a typo in psa-crypto-implementation-structure.mdXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Change the documenti about psa_crypto_driver_wrappers.c{h}Xiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26No need to include the 3rd party entry point head fileXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Change the description of auto-generated driver dispatch filesXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Remove useless spaces in MakefileXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Remove useless empty lineXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Remove the UN_USED_DISABLE attributeXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Change to os.path functions base on commentXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Move the dependency adjacent to the generated fileXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Change include guards of psa_crypto_driver_wrappers_no_static.hXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Change comments to psa_crypto_driver_wrappers.hXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Change the extension type of the file psa_crypto_driver_wrapperXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Automaticly generate psa_crypto_driver_wrappers_no_static.cXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Dont't generate object file for file only include static functionsXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Revert 3rd party p-256 entry fileXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Revert the Makefile to remove the dependency of generate_filesXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Move functions out of the static fileXiaokang Qian
Move get_key_buf_size/get_builtin_key out of the psa wrapper auto generated file Slot_management.c include the head file instead of the source file Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Change code styleXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Disable unused warning on visual studio and generate files before libXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Enable build of non-static psa wrapper functionsXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Move function psa_driver_wrapper_export_public_key out of auto-generatedXiaokang Qian
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>