WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@tarcieri
Copy link
Member

This notably provides a common way to initialize KEM decapsulation keys along with a common way to do key generation

This notably provides a common way to initialize KEM decapsulation keys
along with a common way to do key generation
@tarcieri
Copy link
Member Author

cc @rozbb

@tarcieri tarcieri changed the title kem: add KeyInit support to Decapsulator kem: add KeyInit support to Decapsulate Oct 30, 2025
/// Often, this will just be a secret key. But, as with [`Encapsulate`], it can be a bundle
/// of secret keys, or it can include a sender's private key for authenticated encapsulation.
pub trait Decapsulate<EK, SS> {
pub trait Decapsulate<EK, SS>: KeyInit {
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure that KeyInit should be a super trait of Decapsulate? Couldn't Decapsulate in theory be implemented on top of a HSM?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. I guess I'll close this, but perhaps we can use KeyInit by convention in the KEM crates.

Copy link
Member

Choose a reason for hiding this comment

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

It may be worth to re-export KeyInit from kem to promote its use.

@tarcieri tarcieri closed this Oct 30, 2025
@tarcieri tarcieri deleted the kem/decapsulator-key-init branch October 30, 2025 19:05
tarcieri added a commit that referenced this pull request Oct 30, 2025
Encourages the use of these traits for initializing decapsulators that
impl the `Decapsulate` type.

(This is effectively #2056 without the supertrait bound)
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.

3 participants