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

Create explicit crypto_null stub files for crypto platform functionality. #53

Merged
merged 3 commits into from
Mar 14, 2024

Conversation

taprinz
Copy link
Contributor

@taprinz taprinz commented Mar 12, 2024

Part of a long series of planned changes to address #10. As spdm_ring doesn't build on riscv64, we cannot use it as a crypto implementation backend. In general, an integrator of the library onto an embedded platform (like riscv64) will want to implement their own crypto hooks, for example with HW accelerators.

Because of this, we want to make it obvious for an integrator as to what functions they would need to provide in order to create their own platform implementation. This change does not modify functionality so much as it does serve as a minor refactor of where the NULL implementations of crypto platform APIs are located. This is done to be more intuitive to an integrator as to how they could add another crypto library, and what functions they would need to implement.

In the long run, it would be desirable to create similar null or stub implementations of all platform functionalities which rely on external crates which may not be usable on an embedded platform.

Note that I did not add crypto_null as a feature, as it seems Rust features are meant to only be additive, and not require mutual exclusivity (as crypto backends would require). This would be an issue in the long term if we are to formally support another crypto implementation upstream, outside of spdm-ring.

@@ -0,0 +1,37 @@
// Copyright (c) 2021 Intel Corporation
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we want to update/remove the copyright?

@jyao1 jyao1 merged commit 8ebd487 into ccc-spdm-tools:main Mar 14, 2024
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants