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

Sealed trait to make (De|En)capsulationKeys more usable #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmwample
Copy link

Make is possible to wrap kem::(De|En)capsulationKey in external packages without exposing KemParams publicly.

Instead of making KemParams public and allowing external types to implement the interface, I have added a public trait Params which has KemParams as a public supertrait whose name is not publicly exported (private module). Rust API Guidelines

This makes it possible to do things like:

struct WrappedDecapsulationKey<P: Params> {
    key: DecapsulationKey<P>
}

This is more convenient than working with <P as KemCore>::DecapsulationKey.

Closes #65

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.

Downstream library usage of ml_kem::DecapsulationKey
1 participant