Skip to content

ml-kem: impl KeyExport for DecapsulationKey#228

Merged
tarcieri merged 1 commit intomasterfrom
ml-kem/add-key-export-impl
Jan 31, 2026
Merged

ml-kem: impl KeyExport for DecapsulationKey#228
tarcieri merged 1 commit intomasterfrom
ml-kem/add-key-export-impl

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Jan 31, 2026

With the current way we implement expanded key support, this currently needs to be fallible, and since KeyExport is infallible we have to panic.

Perhaps we can make a separate type which contains only dk_pke and z like ExpandedDecapsulationKey so we can ensure DecapsulationKey always has the seed.

For now, this at least lets us have an impl of KeyExport, even if having a panicking condition is not ideal.

With the current way we implement expanded key support, this currently
needs to be fallible.

Perhaps we can make a separate type which contains only `dk_pke` and `z`
like `ExpandedDecapsulationKey` so we can ensure `DecapsulationKey`
always has the seed.

For now, this at least lets us have an impl of `KeyExport`, even if
having a panicking condition is not ideal.
@tarcieri tarcieri merged commit 569e43f into master Jan 31, 2026
23 checks passed
@tarcieri tarcieri deleted the ml-kem/add-key-export-impl branch January 31, 2026 15:55
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