SOURCE_URL: https://majikah.solutions/products/majik-message/docs/wiki-ml-kem-768 --- title: "ML-KEM-768" id: "wiki-ml-kem-768" group: "majik-message" type: "products" version: "1.1.0" lastUpdated: "2026-02-19T00:00:00.000Z" difficulty: "Beginner" time: "4-5 minutes" tags: [ml-kem, ml-kem-768, fips-203, post-quantum, key-encapsulation, lattice, nist, quantum-resistant, cryptography] --- # ML-KEM-768 > The NIST-standardized post-quantum key encapsulation mechanism at the heart of Majik Message encryption — resistant to both classical and quantum computers ## Overview ML-KEM-768 is the cryptographic algorithm Majik Message uses to establish a secure encryption key between sender and recipient. It is quantum-resistant, meaning it remains secure even against future quantum computers. It is standardized by NIST under FIPS-203. ### What is ML-KEM-768? ML-KEM-768 stands for Module Lattice Key Encapsulation Mechanism, security level 768. It is a post-quantum cryptographic algorithm standardized by the US National Institute of Standards and Technology (NIST) under FIPS-203, published in 2024. Its job is key encapsulation: given a recipient's public key, it generates a random shared secret and a ciphertext. Only the recipient — with their corresponding private key — can recover that shared secret. That shared secret then becomes the key used to encrypt the actual message content with AES-256-GCM. ### Why Does Quantum Resistance Matter? Classical encrypted messaging platforms (Signal, WhatsApp, iMessage) rely on Elliptic Curve Diffie-Hellman (ECDH) for key exchange. ECDH's security depends on the mathematical difficulty of the discrete logarithm problem — something a sufficiently powerful quantum computer could solve efficiently using Shor's Algorithm. ML-KEM-768 is built on the hardness of lattice problems (specifically Module Learning With Errors, or MLWE), which are not vulnerable to Shor's Algorithm or any known quantum attack. This makes it secure against both today's classical computers and tomorrow's quantum computers. ### What Does '768' Mean? The number refers to the security parameter set. ML-KEM-768 provides 192-bit equivalent security (comparable to AES-192), which NIST considers more than sufficient to resist even large-scale quantum computers. The three available parameter sets are ML-KEM-512 (128-bit security), ML-KEM-768 (192-bit security), and ML-KEM-1024 (256-bit security). Majik Message uses the 768 level — a balance between strong quantum resistance and practical key sizes. ### ML-KEM-768 Key & Ciphertext Sizes | Item | Size | Purpose | | --- | --- | --- | | Public Key | 1,184 bytes | Shared with others to receive encrypted messages (your invite key) | | Secret Key | 2,400 bytes | Kept private; used to decrypt messages | | Ciphertext | 1,088 bytes per recipient | Produced during encapsulation; included in every MJKB envelope | | Shared Secret | 32 bytes | Used as the AES-256-GCM encryption key | ### How ML-KEM-768 Is Used in Majik Message When you send a message, Majik Message calls ML-KEM-768 encapsulation using the recipient's public key. This produces two outputs: a 32-byte shared secret and a 1,088-byte ciphertext. The shared secret becomes the AES-256-GCM key used to encrypt your message. The ciphertext is stored in the MJKB envelope alongside the encrypted message content. When the recipient opens the message, their private key runs ML-KEM-768 decapsulation on the ciphertext to recover the identical shared secret, which is then used to decrypt the AES ciphertext. The relay server only ever sees the ML-KEM ciphertext and the encrypted message — it cannot recover the shared secret without the recipient's private key. > **NOTE:** Forward Secrecy: Each message in Majik Message uses a fresh ML-KEM encapsulation — a new shared secret is generated every time. This means even if a private key were somehow compromised in the future, past messages encrypted with previous encapsulations remain secure. ### FIPS-203: Why Standardization Matters FIPS-203 is a Federal Information Processing Standard — a formal certification published by NIST that defines approved cryptographic algorithms for use by US government agencies and regulated industries. When Majik Message says it is FIPS-203 compliant, it means the ML-KEM-768 implementation follows the exact specification that undergoes rigorous public scrutiny by cryptographers worldwide. This is not a marketing claim — it is a verifiable, auditable standard with a published specification and reference implementations.