Post-quantum cryptography in a game scripting language sounds like a joke. It isn't one any more.
This is the first ML-KEM for Luau: the key exchange NIST standardised as FIPS 203, written in pure Luau and built from the first line to compete with native libraries like Go's crypto/mlkem . All three parameter sets. About 400 lines. No dependencies. Every operation at every security level finishes in under a millisecond:
Parameter set generateKeys encapsulate decapsulate
ML-KEM-512 313 µs 326 µs 363 µs
ML-KEM-768 506 µs 545 µs 594 µs
ML-KEM-1024 781 µs 828 µs 886 µs
Repo: Rukioyuza/MLKEM
A full ML-KEM-768 key exchange costs about 1.1 ms. That is competitively fast by any standard, from a VM that was never meant to do this. Getting there was the hardest programming I've done, and this post walks through all of it.
What you're up against
ML-KEM needs two things from a runtime, and it needs them fast.
Keccak.…