Skip to main content

Keeper ML-KEM

Production-ready post-quantum cryptography library implementing ML-KEM (FIPS 203) for Keeper Commander applications.

Overview

This package provides a lightweight, optimized implementation of the Module-Lattice-Based Key-Encapsulation Mechanism (ML-KEM) as standardized in FIPS 203. It features native C extensions for performance-critical operations while maintaining a simple, intuitive API.

Installation

pip install keeper-mlkem

Usage

Basic Example

from mlkem import ML_KEM, MLKEM_768_PARAMETERS

# Initialize ML-KEM-768
ml_kem = ML_KEM(MLKEM_768_PARAMETERS)

# Generate key pair
encapsulation_key, decapsulation_key = ml_kem.key_gen()

# Encapsulate (create shared secret)
shared_secret, ciphertext = ml_kem.encaps(encapsulation_key)

# Decapsulate (recover shared secret)
recovered_secret = ml_kem.decaps(decapsulation_key, ciphertext)

assert shared_secret == recovered_secret

Security Parameters

Three security levels are available, aligned with NIST security categories:

from mlkem import MLKEM_512_PARAMETERS, MLKEM_768_PARAMETERS, MLKEM_1024_PARAMETERS

ML_KEM(MLKEM_512_PARAMETERS)   # NIST Level 1 (128-bit security)
ML_KEM(MLKEM_768_PARAMETERS)   # NIST Level 3 (192-bit security) - Recommended
ML_KEM(MLKEM_1024_PARAMETERS)  # NIST Level 5 (256-bit security)

Technical Specifications

  • Standard: FIPS 203 (Module-Lattice-Based Key-Encapsulation Mechanism)
  • Language: Python 3.11+
  • Performance: Optimized C extensions for cryptographic operations
  • Validation: Tested against official NIST test vectors

System Requirements

  • Python 3.11 or higher
  • C compiler (for installation from source)
    • Linux: GCC (typically pre-installed)
    • macOS: Clang via Xcode Command Line Tools (xcode-select --install)
    • Windows: Microsoft Visual C++ Build Tools

Pre-built wheels are available for major platforms (Linux, macOS, Windows) and common architectures.

About ML-KEM

ML-KEM is a post-quantum cryptographic algorithm designed to resist attacks from both classical and quantum computers. It provides a secure method for two parties to establish a shared secret over an insecure channel:

  1. Key Generation: Generate a public/private key pair
  2. Encapsulation: Use the public key to generate a shared secret and ciphertext
  3. Decapsulation: Use the private key to recover the shared secret from the ciphertext

The resulting shared secret can be used with symmetric encryption algorithms (e.g., AES) or key derivation functions for secure communications.

License

MIT License - Copyright (c) 2025 Keeper Security Inc.

Security Notice

This library implements ML-KEM (FIPS 203) and has been validated against official NIST test vectors. While it is suitable for production use, users should follow best practices for cryptographic implementations:

  • Keep the library updated to receive security patches
  • Use appropriate key sizes for your security requirements (ML-KEM-768 is recommended for most applications)
  • Properly handle and store private keys

Metadata

Release files for keeper-mlkem 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for keeper-mlkem 1.0.2
File Size Uploaded
keeper_mlkem-1.0.2.tar.gz 11.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for keeper-mlkem 1.0.2
File
keeper_mlkem-1.0.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
keeper_mlkem-1.0.2-cp313-cp313-win32.whl CPython 3.13 CPython 3.13 Windows x86-32 Details
keeper_mlkem-1.0.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.5+ x86-64, Linux glibc 2.17+ x86-64 Details
keeper_mlkem-1.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-32, Linux glibc 2.5+ x86-32 Details
keeper_mlkem-1.0.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
keeper_mlkem-1.0.2-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details
keeper_mlkem-1.0.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
keeper_mlkem-1.0.2-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details
keeper_mlkem-1.0.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.5+ x86-64, Linux glibc 2.17+ x86-64 Details
keeper_mlkem-1.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-32, Linux glibc 2.5+ x86-32 Details
keeper_mlkem-1.0.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
keeper_mlkem-1.0.2-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
keeper_mlkem-1.0.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
keeper_mlkem-1.0.2-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details
keeper_mlkem-1.0.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64, Linux glibc 2.5+ x86-64 Details
keeper_mlkem-1.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.11 CPython 3.11 Linux glibc 2.5+ x86-32, Linux glibc 2.17+ x86-32 Details
keeper_mlkem-1.0.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
keeper_mlkem-1.0.2-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details

Total release size: 576.8 kB

Release files / keeper_mlkem-1.0.2.tar.gz

Download URL keeper_mlkem-1.0.2.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
52f472df2c7ebcad64770cdfbc1321bb4014009ec32f731a3faa2afd4870d837
BLAKE2b-256 checksum
How to use checksums
606e18aff45dca0f76cd767ec75879235ea7f465d480adde5cce591b4ff24eda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp313-cp313-win_amd64.whl

Download URL keeper_mlkem-1.0.2-cp313-cp313-win_amd64.whl
Size 24.3 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
4a38f5c96eef8f23a5181bd0a09af50512cbbbab1303101faa6520f73e60dbe5
BLAKE2b-256 checksum
How to use checksums
e299b1c8a191313ed3e1721ee53dc58d9ffbf6238b35ba0dfb743702e7eb7e7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp313-cp313-win32.whl

Download URL keeper_mlkem-1.0.2-cp313-cp313-win32.whl
Size 21.2 kB
Tags CPython 3.13 Windows x86-32
SHA-256 checksum
How to use checksums
a6284163ff3c8cf033f79b990af5705ec4cb4b46a27dcb2f4785fa9fb184a8e9
BLAKE2b-256 checksum
How to use checksums
192da2ebc82ad282a6f0da9d369dda8152ec7a261a071029742758ee84d8ef63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL keeper_mlkem-1.0.2-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 39.1 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
b07bdff79d6b9f2c188f4a8d083a8f26e34104611578650c998e361f17733a6a
BLAKE2b-256 checksum
How to use checksums
0bfa11ce9be94e7aff741da7032a0aac11b101439513c2d12f7ae3a590dda442
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL keeper_mlkem-1.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 36.4 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
8f5ab89f6e9c444375a3c97cabcfc8854ffad5532ffbef833363a88ec39dbaf0
BLAKE2b-256 checksum
How to use checksums
342a69b89cad42a9e6c47a72462274c6cce916ace43623a796a49fd073f57b72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL keeper_mlkem-1.0.2-cp313-cp313-macosx_11_0_arm64.whl
Size 33.3 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
551ef89a3fd1fd5c2635667309b08638288e6b0e1229c43b84c078e540f59447
BLAKE2b-256 checksum
How to use checksums
51c701c85e56b78f6aa7285754e530b46919d1267adb8ec578b0dfe01ab438a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp313-cp313-macosx_10_13_x86_64.whl

Download URL keeper_mlkem-1.0.2-cp313-cp313-macosx_10_13_x86_64.whl
Size 34.0 kB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
c1c13f7d171405cc7bd6794a2df76dfb5345a9d738899b5ff854c5dc78011ad9
BLAKE2b-256 checksum
How to use checksums
f74a2c8b35fb6ead08798fe8134f028e094be33b1c0916bbc88a382c7c0ecddb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp312-cp312-win_amd64.whl

Download URL keeper_mlkem-1.0.2-cp312-cp312-win_amd64.whl
Size 24.3 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
0646fa23e7a22af589e6bd3d6726566080ca49330d8d112b9b1457fe7c2a435b
BLAKE2b-256 checksum
How to use checksums
aaffdb08e8a09a1255469c936d02e5879e6efcbd5f005bfdff6810d20a8bb115
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp312-cp312-win32.whl

Download URL keeper_mlkem-1.0.2-cp312-cp312-win32.whl
Size 21.2 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
cd07497e0ebd2881e117994baca83302e9ba4be4c328ee2aa1444687469aff27
BLAKE2b-256 checksum
How to use checksums
c98e25b54c5b8e4df265f75c3bfda9f81f44fbb24d7be364a7a4f4a8cccb10fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL keeper_mlkem-1.0.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 39.2 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
f2dd842469787a7adafa7767598a2bd7db0205d5f52d063a7471bf08dddb955a
BLAKE2b-256 checksum
How to use checksums
c6f667cd712c362a5e68a15822c5fb6e9698e48660c5f881e732ed03bfe534d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL keeper_mlkem-1.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 36.5 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
b8a39c1b44016707cb47481cefd1dcea54e278b33f5505590f1a0474e1ac8b80
BLAKE2b-256 checksum
How to use checksums
2d8447276e66b32d9c60d393b3971219554a1543300d667f84b3eca51221e878
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL keeper_mlkem-1.0.2-cp312-cp312-macosx_11_0_arm64.whl
Size 33.3 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
837d5efa1d71652c563f07aedee117be4f1a12327cd5364d27d64f97162f02f3
BLAKE2b-256 checksum
How to use checksums
b48e9cb4862f63a1edd23b30b4bcb6c646facff0b5c8ed98405e13c34a8977c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp312-cp312-macosx_10_13_x86_64.whl

Download URL keeper_mlkem-1.0.2-cp312-cp312-macosx_10_13_x86_64.whl
Size 34.0 kB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
5bf9cff62a59ee993942e66d37421adce1a9011af761767bff9fc6645ce55f55
BLAKE2b-256 checksum
How to use checksums
383ea454bf2a9ce0c61b4e7f8d8a962b4dc2f873803926ccbb3cb067e907fce9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp311-cp311-win_amd64.whl

Download URL keeper_mlkem-1.0.2-cp311-cp311-win_amd64.whl
Size 24.3 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
aa691cd96054204ee7fbc5e90447c3c8c331708de5a118087a2b2246a9bcc6a8
BLAKE2b-256 checksum
How to use checksums
ba391a2cd15b1902efc5e4fbea5124a3452a718ee703f7ee1d8ee07eb4648192
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp311-cp311-win32.whl

Download URL keeper_mlkem-1.0.2-cp311-cp311-win32.whl
Size 21.2 kB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
943717489df2b788c96b5d77bb216db2db73206ad716a50f16339f3276f517f1
BLAKE2b-256 checksum
How to use checksums
1d322cbd232a1f4474faee55eb401dbcc4526150b06d342ce1f6afe9025b3d80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL keeper_mlkem-1.0.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 39.1 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
da2ea3bd24ce18e72c112dab47170ddb770afe91f2ae0eec68aed67774d19e12
BLAKE2b-256 checksum
How to use checksums
50d66b2296687a0d09c899e73b8878635e7a5d43df236159a9cc998daf65cb5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL keeper_mlkem-1.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 36.4 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
49aca667cddb37d8c1e12fbffc6e7d91ae95a28f8b73de2a35ad762240563ff7
BLAKE2b-256 checksum
How to use checksums
e03712082e1dc40bae742b1276b47eb750cfbafd8c755abcff3f1081d51bb9c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL keeper_mlkem-1.0.2-cp311-cp311-macosx_11_0_arm64.whl
Size 33.3 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
005ef3bdd6527163012d07c608e3968f39c2267bc9c951e5755b15325a6c6c60
BLAKE2b-256 checksum
How to use checksums
93d74555e33fe951264a4748746b74060f0b31b672c6557e4db03681a9d66d74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / keeper_mlkem-1.0.2-cp311-cp311-macosx_10_9_x86_64.whl

Download URL keeper_mlkem-1.0.2-cp311-cp311-macosx_10_9_x86_64.whl
Size 34.2 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
61f9735928e41efa65482330344353b0f438b308d26569ae322cd7d544633486
BLAKE2b-256 checksum
How to use checksums
337e208b3b1a29e9b795cc433b0c741ac2489e4024f9cd86464d55eac0f8e7ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

1.0.2 This release

19 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page