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

Flexible traits #9

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Flexible traits #9

wants to merge 5 commits into from

Conversation

leonbotros
Copy link
Contributor

@leonbotros leonbotros commented Nov 17, 2022

This PR aims to solve #6 . When some schemes require a public key in the key generation or decryption/decapsulation, an operation may panic. Instead, the code now won't compile. This change is breaking, so we should consider carefully.

This approach has several drawbacks:

  • when the concrete type of IBKEM is unknown, you have to have both the parameters to perform extraction and decryption.
  • it is a breaking change of our public API,
  • it bumps the MSRV to 1.65 (since we use GATs in the solution).

Another approach is to put the pk in the sk and usk, respectively. But imo, this does not make sense from a practical point of view:

  • In the case of extraction, you would expect the PKG to have both the mpk and msk.
  • In the decryption, a client that decrypts is also often a client that also encrypts, so you would expect the client to have the public key in its cache.

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.

1 participant