Skip to content

Serialization of kem::DecapsulationKey #799

@kc1212

Description

@kc1212

Problem:

For ML-KEM, the encapsulation key can be serializd using key_bytes but there are no similar functions for DecapsulationKey.

For many application, the decapsulation key must be stored on some persistent storage which is not possible with the current API if not mistaken.

Solution:

Add a method to serialize and deserialize a decapsulation key.

This is defined in the ByteEncode (Algorithm 5) function of the NIST spec https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.203.pdf and used in, for example Algorithm 13 during key generation. I'm not sure if the openssl API already has it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions