Skip to content
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

Add PSA Crypto driver delegation for hashing functions #4043

Conversation

stevew817
Copy link
Contributor

Description

Add driver delegation as per the already established paradigms and the design document in docs/proposed/psa-driver-interface.md.

Status

READY

Requires Backporting

NO

Migrations

NO

Additional comments

Todos

  • Tests
  • Documentation
  • Changelog updated

Steps to test or reproduce

Test coverage through test_psa_crypto_drivers, which compiles with driver support and the test driver.

  • Fallback mechanism is exercised by all of the regular tests in test_suite_psa_crypto when driver support and the test driver are compiled in.
  • The test driver actually being called is tested in test_suite_psa_crypto_driver_wrappers

Includes basic test.
Based on the design document in psa-driver-interface.md.

Signed-off-by: Steven Cooreman <[email protected]>
@gabor-mezei-arm gabor-mezei-arm added Community component-psa PSA keystore/dispatch layer (storage, drivers, …) enhancement needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Jan 15, 2021
@@ -2607,6 +2624,17 @@ psa_status_t psa_hash_setup( psa_hash_operation_t *operation,
return( PSA_ERROR_BAD_STATE );
}

operation->mbedtls_in_use = 0;
Copy link
Contributor

@ronald-cron-arm ronald-cron-arm Jan 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not aligned with the organization of the PSA implementation with respect to the PSA driver interface that we are currently trying to move to. The code organization is described in the psa-crypto-implementation-structure.md document in PR #3933 and an example of its application for multi-part operation can be found here (for ciphers).
Thus this is likely that this PR will need some significant refactoring. It is also probably better to not start any refactoring before PR #3933 is merged.

@ronald-cron-arm ronald-cron-arm added needs-work and removed needs-reviewer This PR needs someone to pick it up for review labels Jan 25, 2021
@ronald-cron-arm ronald-cron-arm removed the needs-review Every commit must be reviewed by at least two team members, label Jan 29, 2021
@stevew817
Copy link
Contributor Author

Superseded by #4157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-psa PSA keystore/dispatch layer (storage, drivers, …) enhancement needs-work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants