GitHub Digital Lab

Fox Red Labs / Builds / Security (post-quantum)

Post-quantum key exchange on a LaunchPad

A TI board and your computer agree on a secret key with ML-KEM-768, a method meant to stay safe against quantum computers, then swap one encrypted line. The same code also runs on four more boards.

HardNo wiringan hour once the tools are installed (estimate, not timed)

The CC1354P10-1 this build runs on, drawn from its user guide. Drag to turn it.

What you need

Works on this board
On Linux or WindowsThe steps were recorded on a Mac; paths and port names in them are the Mac ones.

macOS (recorded)

TI's tools
/Applications/ti, or ~/ti
Serial port
/dev/cu.usbmodem<serial>1
Probe access
nothing to do

Linux

TI's tools
~/ti (also searched: /opt/ti)
Serial port
/dev/ttyACM0 (by name: /dev/serial/by-id/*<serial>*-if00*)
Probe access
one udev rule, how

Windows

TI's tools
C:\ti (also searched: %USERPROFILE%\ti)
Serial port
COM<n>, named "XDS110 Class Application/User UART" in Device Manager
Probe access
the XDS110 USB driver from UniFlash or CCStudio

Your probe's serial on any system: python3 tools/frl/frl.py detect. Not run on a board under Linux or Windows. Everything else that differs: the full table.

Steps

  1. Run the host test.TERMINAL

    Build the board code for the Mac, run both sets of known-answer tests and the whole exchange against the computer side. No board is needed.

    portability/pqc-join/test/run.sh

    You should see: The last line is pqc-join host test: OK.

  2. Build the board image.TERMINAL

    Build at -O3, the timed build. It touches no hardware and takes about 20 seconds once SysConfig has run.

    cc1354p10/pqc-join/build.sh -O3

    You should see: The script ends with the path of the .out image.

  3. Load the board and run the exchange.TERMINAL

    Set UHUB to your hub and port, and RESTORE_IMG to the .out you want left on the board afterwards. The run takes about two and a half minutes: 22 s to back up the flash, 18 s on the board, then restore and read-back. Two lines name the bench's probe and must be changed to yours first (xdsdfu -e lists the serial): DEV= in cc1354p10/pqc-join/run.sh (a /dev/cu.usbmodem<serial>1 port) and the probe serial LS45013A in cc1354p10/CC1354P10.ccxml.

    Replace <your hub>, <port> and <path to the .out to leave running> before you run this.

    UHUB=<your hub>:<port> RESTORE_IMG=<path to the .out to leave running> cc1354p10/pqc-join/run.sh -O3

    You should see: The console shows board> KAT PASS, then key check Mac d01a2f61 board d01a2f61 MATCH, then board> DECRYPTED (76 bytes, tag ok) and the line your computer sent. The script ends with READBACK MATCHES BACKUP.

What to build next

Every build

If something goes wrong

It stops on the OpenSSL versionInstall OpenSSL 3.5 or later and put it first on your path.
SysConfig is not foundInstall it as mac-setup/README.md says and run the line again.
The exchange stops at join: making an ML-KEM-768 key pairThe image did not start the random generator; build from this repository's pqc_board.c, which calls TRNG_init() before TRNG_open().

Every fix for this board: the FAQ.

Get the code

Ran here, with steps. ML-KEM-768 key generation takes 997k cycles (21 ms at 48 MHz) and decapsulation 1.40 million (29 ms); ML-DSA-44 signs in 7.4 million cycles; known-answer vectors pass. How it ran on this board.

Start it

Paste this in a terminal. It hands off to an AI assistant with this board's notes.

./start.sh cc1354p10 post-quantum --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs ./start.sh cc1354p10 post-quantum --assistant claude
Not Claude Code? Copy this prompt instead.
Clone https://github.com/Fox-Red-Labs/fox-red-labs and read cc1354p10/AGENTS.md first. Then run Post-quantum on every board on my LP-CC1354P10-1. Tell me when to plug in the board and what you saw at each step.
Only the code for this board
git sparse-checkout set cc1354p10 cc2340r5/bench/lib portability/pqc-join third-party tools mac-setupgit clone --depth 1 --filter=blob:none --sparse https://github.com/Fox-Red-Labs/fox-red-labs.git cd fox-red-labs git sparse-checkout set cc1354p10 cc2340r5/bench/lib portability/pqc-join third-party tools mac-setup
Or take the whole repository
git clone https://github.com/Fox-Red-Labs/fox-red-labs.git
Reports from others, and the report forms

Clone the repository and open the board's folder below. AGENTS.md is a plain text file of notes for AI coding assistants, and llms.txt at the root indexes the site for one.

git clone https://github.com/Fox-Red-Labs/fox-red-labs.git

Code is BSD-3-Clause, writing is CC BY 4.0; third-party folders keep their own licenses.

Built it? Tell us

Built this, or got stuck? Report it on GitHub with a few short answers. Your report shows here in your words, marked as yours. A failure that repeats on the bench gets its fix here.

Evidence and limitsML-KEM-768 runs in 8 to 36 ms a step on five boards; the CC1354P10-1 also agrees a key with a computer and decrypts its line. Results, sources, timing and limits.

Expected result: The board and your computer end with the same 4-byte key check and the board prints the decrypted line.

What this shows

  • ML-KEM-768 takes 20.8, 24.0 and 29.1 ms on a 48 MHz Cortex-M33; ML-DSA-44 verifies in 50.5 ms and signs in 154 ms on average.
  • The board's own work in the exchange is about 73 ms; the wire at 115,200 baud takes about 420 ms.
  • The same portable C, unmodified mlkem-native 2.0.0 and mldsa-native 2.0.0, runs on four more boards (the other rows below).
What this does not establish, and limits

What this does not establish

  • The exchange with a Mac ran on this board only. On the other four boards the algorithms ran and passed their vectors; no exchange was run.
  • No protection against power or fault attacks is claimed. This is a demonstration of the math and its cost. Do not use it for real keys.

Limits to keep in mind

  • Signing needs 50 kB of stack, so a board needs about 64 kB of RAM for ML-DSA-44; the MSPM0 G5187 (32 kB) runs ML-KEM-768 only.
  • Signing time varies from 77 to 361 ms with the message, because a candidate signature is sometimes thrown away and retried.

Sources

Versions, sizes and timing

ML-KEM-768 at 48 MHz997k / 1.15M / 1.4M cycles for key pair, encapsulate, decapsulatethe data (CSV)
ML-DSA-44 at 48 MHz2.37M cycles key pair, 2,421,949 verify, 7,406,767 mean sign over 16 messagesthe data (CSV)
FlashML-KEM 82.4 kB and ML-DSA 109 kB at -O3; 9.7 kB and 13.6 kB at -Osthe data (CSV)

Evidence

  • On 2026-10-08 the board made its key pair from its hardware random generator, agreed a key with the Mac (key check d01a2f61 on both sides, MATCH) and decrypted the Mac's 76-byte AES-128-GCM line.
  • Every step passes NIST's known-answer vectors on the board before timing: ACVP key generation, two signing vectors, one valid and one invalid signature. README notes

Other boards

  • AM13E230Should work Works on the LP-MSPM33C321A
  • AM62L32Should work Works on the SK-TDA4VM
  • MSPM0G3507, TDA4VMran another way
  • CC2340R5ML-KEM-768 42 to 61 ms and ML-DSA-44 sign 514 ms ran; no exchange with a Mac
  • MSPM33C321AML-KEM-768 8.1 to 11.3 ms and ML-DSA-44 sign 39 ms ran; no exchange with a Mac
  • MSPM0G3519ML-KEM-768 24.6 to 35.6 ms and ML-DSA-44 sign 317 ms ran; no exchange with a Mac
  • MSPM0G5187ML-KEM-768 24.9 to 36.4 ms ran; ML-DSA-44 does not fit 32 kB of RAM
  • CC2755P10ML-KEM-768 10.0 to 14.1 ms and ML-DSA-44 sign 49.7 ms ran; no exchange with a Mac
  • AM2434ML-KEM-768 0.95 to 1.34 ms and ML-DSA-44 sign 5.2 ms ran; no exchange with a Mac
  • MSPM0L1306, MSPM0C1104Not for this chip not enough RAM
  • F2800137Not for this chip can't run it
What the status words mean

Works ran here and did what it shouldCould work some of it ran; real porting effort is left; hover for whatNot for this chip the chip or its vendor software cannot; hover for why

Result grid

Project
LP-MSPM0G3507MSPM0G3507 chip
LP-MSPM0L1306MSPM0L1306 chip
LP-EM-CC2340R5CC2340R52 chip
LAUNCHXL-F2800137TMS320F2800137 chip
Post-quantum on every board
LP-MSPM0G3507Should workML-KEM-768 links for this board in 31.4 kB of flash and 28.4 kB of RAM with a 12 kB stack. It was never flashed Post-quantum secure join: the board-independent C code
LP-MSPM0L1306
LP-EM-CC2340R5WorksBoth algorithms with the same code, every step passes NIST's known-answer vectors, in 36 kB of RAM.
DetailsML-KEM-768 takes 42.0, 49.9 and 60.8 ms at -Os; ML-DSA-44 key pair 141 ms, verify 164 ms, sign 514 ms (reduced-RAM build, 15 kB of stack at most). Random bytes come from a fixed-seed generator: the chip's RNG driver did not link. No exchange with a Mac was run
Port
LAUNCHXL-F2800137Not for this chipThe C28x core has 16-bit chars and the libraries assume 8-bit bytes:
Detailsboth compile once uint8_t is supplied as a 16-bit type, but ML-KEM-768 key generation overruns the largest stack the 36 kB of RAM allows (21.9 kB) and ML-DSA-44 signing lists 44.7 kB of allocations; no known-answer test ran
Port

Works ran here and did what it shouldShould work it builds; only naming, packaging or build glue is in the way; hover for whichCould work some of it ran; real porting effort is left; hover for whatNot for this chip the chip or its vendor software cannot; hover for why

Source files

Code brought from elsewhere

This project uses code that was written for other chips or tools. Each links to how to get it running.

Start with your code, and the prompt to port your own