Create explicit crypto_null stub files for crypto platform functionality. #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.