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

Investigate interfacing to a defined subset of PSA Crypto #72

Open
hug-dev opened this issue Jan 28, 2021 · 0 comments
Open

Investigate interfacing to a defined subset of PSA Crypto #72

hug-dev opened this issue Jan 28, 2021 · 0 comments
Labels
enhancement New feature or request large Effort label
Projects

Comments

@hug-dev
Copy link
Member

hug-dev commented Jan 28, 2021

The PSA Crypto API has some implementation-defined parts. For example, output size macros and various types need to be defined by the implementor.
The consequence of that are:

  • the header file of the PSA Crypto implementation needs to be given as an input of this crate to generate the bindings
  • bindings can not be pre-generated
  • dynamic loading is impossible

A solution to investigate would be for us to define a subset PSA Crypto API where:

  • all functions are defined but return PSA_ERROR_NOT_SUPPORTED if not implementend
  • the key types and algorithms are limited to only the ones defined within the API (no extension)
  • the output macro are implemented (they can be with the constraint above)
  • the types are implemented, probably with void * pointer

We could implement all this in a header file, in this repo that we produce bindings from.

On the PSA Crypto implementors side, there will be a need to write a wrapper implementing our subset with the available functions.
In an ideal world, we could imagine a compilation option on the implementor project to produce a .a or .so which implements the subset instead of the original API. Then people will need to use that with Parsec.

@hug-dev hug-dev added the enhancement New feature or request label Jan 28, 2021
@hug-dev hug-dev added this to All issues in Parsec via automation Jan 28, 2021
@ionut-arm ionut-arm added the large Effort label label Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request large Effort label
Projects
Parsec
All issues
Development

No branches or pull requests

2 participants