All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] ML-KEM (FIPS 203) implementation with reusable decapsulation pool
@ 2026-06-09  7:45 kstzavertaylo
  2026-06-09 19:25 ` Eric Biggers
  0 siblings, 1 reply; 2+ messages in thread
From: kstzavertaylo @ 2026-06-09  7:45 UTC (permalink / raw)
  To: linux-crypto, herbert, ebiggers

Hello,
I have been working on an ML-KEM (FIPS 203) implementation for the
Linux kernel. This is an early RFC to solicit feedback on the overall
design and architecture before further polishing.

The implementation consists of two closely related variants sharing
the same core cryptographic logic:
    1. A userspace implementation accompanied by a set of validation
programs, including NIST KAT vectors, timing-leakage testing (dudect),
pool stress tests, and additional functional tests.
    2. A Linux kernel module implementing the KPP interface and
reusing the same core architecture where possible.

Key features include:
   1. Support for all three parameter sets: ML-KEM-512, ML-KEM-768,
and ML-KEM-1024.
   2. The implementation uses a reusable decapsulation pool consisting
of preallocated slots associated with a key context. The goal of this
design is to move memory allocation to key initialization and avoid
per-decapsulation allocations.
   3. Explicit zeroization of sensitive data and constant-time
operations where required.
   4. Portable C11 codebase with minimal differences between userspace
and kernel versions.

I am aware that some aspects (local SHA3/SHAKE implementation, coding
style, etc.) will likely need adjustment to align with upstream
expectations.

At this stage, I would like to ask for feedback on the following points:
   1. Is the general direction (KPP integration + reusable
decapsulation pool) acceptable?
   2. Are there any fundamental concerns with the pool-based architecture?
   3. Would you prefer to reuse kernel crypto primitives for
SHA3/SHAKE, or is the current embedded approach acceptable at this
stage?

The implementation is available at: repository - https://github.com/kstzv/ml-kem

Documentation and implementation details are available in the repository.

Any feedback, criticism or suggestions would be greatly appreciated.

Thank you for your time.
Best regards,
K. Zavertailo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-09 19:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09  7:45 [RFC] ML-KEM (FIPS 203) implementation with reusable decapsulation pool kstzavertaylo
2026-06-09 19:25 ` Eric Biggers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.