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
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
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.shYou should see: The last line is
pqc-join host test: OK.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 -O3You should see: The script ends with the path of the
.outimage.Load the board and run the exchange.TERMINAL
Set
UHUBto your hub and port, andRESTORE_IMGto the.outyou 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 -elists the serial):DEV=incc1354p10/pqc-join/run.sh(a/dev/cu.usbmodem<serial>1port) and the probe serialLS45013Aincc1354p10/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 -O3You should see: The console shows
board> KAT PASS, thenkey check Mac d01a2f61 board d01a2f61 MATCH, thenboard> DECRYPTED (76 bytes, tag ok)and the line your computer sent. The script ends withREADBACK MATCHES BACKUP.
What to build next
If something goes wrong
| It stops on the OpenSSL version | Install OpenSSL 3.5 or later and put it first on your path. |
| SysConfig is not found | Install it as mac-setup/README.md says and run the line again. |
The exchange stops at join: making an ML-KEM-768 key pair | The 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.
git 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 claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
py start.py cc1354p10 post-quantum --assistant claudeNot Claude Code? Copy this prompt instead.
Only the code for this board
git 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-setupRan here. ML-KEM-768 key generation takes 1.29 million cycles (8 ms at 160 MHz) and ML-DSA-44 signs in 9.3 million (58 ms); known-answer vectors pass.
Start it
Paste this in a terminal. It hands off to an AI assistant with this board's notes. There are no written steps for this board yet.
git clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
./start.sh mspm33c321a post-quantum --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
py start.py mspm33c321a post-quantum --assistant claudeNot Claude Code? Copy this prompt instead.
Only the code for this board
git 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 mspm33c321a/bench/pqc mspm33c321a/tools mspm33c321a/bench/logs/speed-run-2026-10-17 portability/pqc-joinEverything for this build
Adds the board's own folder (its notebook, fixes and assistant notes) and the shared code this build draws on. Notes for an AI assistant: mspm33c321a/AGENTS.md.
git 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 portability/pqc-join mspm33c321a third-party tools mac-setupRan here. ML-KEM-768 key generation takes 1.97 million cycles (25 ms at 80 MHz) and ML-DSA-44 signs in 25.4 million (317 ms); known-answer vectors pass.
Start it
Paste this in a terminal. It hands off to an AI assistant with this board's notes. There are no written steps for this board yet.
git clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
./start.sh mspm0g3519 post-quantum --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
py start.py mspm0g3519 post-quantum --assistant claudeNot Claude Code? Copy this prompt instead.
Only the code for this board
git 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 portability/boards/mspm0g3519 portability/pqc-joinEverything for this build
Adds the board's own folder (its notebook, fixes and assistant notes) and the shared code this build draws on. Notes for an AI assistant: mspm0g3519/AGENTS.md.
git 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 portability/boards/mspm0g3519 portability/pqc-join mspm0g3519 third-party tools mac-setupRan in part. ML-KEM-768 key generation takes 1.995 million cycles (25 ms at 80 MHz); ML-DSA-44 key generation (84 ms) and verification (99 ms) run in a low-RAM build, but signing fails its known-answer tests.
Start it
Paste this in a terminal. It hands off to an AI assistant with this board's notes. There are no written steps for this board yet.
git clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
./start.sh mspm0g5187 post-quantum --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
py start.py mspm0g5187 post-quantum --assistant claudeNot Claude Code? Copy this prompt instead.
Only the code for this board
git 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 mspm0g5187/bench/pqc portability/pqc-joinEverything for this build
Adds the board's own folder (its notebook, fixes and assistant notes) and the shared code this build draws on. Notes for an AI assistant: mspm0g5187/AGENTS.md.
git 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 portability/pqc-join mspm0g5187 third-party tools mac-setupRan here. ML-KEM-768 key generation takes 961k cycles (10 ms at 96 MHz) and ML-DSA-44 signs in 4.77 million cycles (50 ms); known-answer vectors pass.
Start it
Paste this in a terminal. It hands off to an AI assistant with this board's notes. There are no written steps for this board yet.
git clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
./start.sh cc2755p10 post-quantum --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
py start.py cc2755p10 post-quantum --assistant claudeNot Claude Code? Copy this prompt instead.
Only the code for this board
git 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 cc2755p10/pqc portability/pqc-joinEverything for this build
Adds the board's own folder (its notebook, fixes and assistant notes) and the shared code this build draws on. Notes for an AI assistant: cc2755p10/AGENTS.md.
git 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 portability/pqc-join cc2755p10 third-party tools mac-setupRan here. Both algorithms in one image, default build, 96 kB stack, pass the known-answer tests in three RAM loads: ML-KEM-768 0.95, 1.08 and 1.34 ms; ML-DSA-44 key pair 2.4 ms, sign 5.2 ms, verify 2.5 ms. 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. There are no written steps for this board yet.
git clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
./start.sh am243x post-quantum --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
py start.py am243x post-quantum --assistant claudeNot Claude Code? Copy this prompt instead.
Only the code for this board
git 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 am243x/bench/pqc portability/pqc-joinEverything for this build
Adds the board's own folder (its notebook, fixes and assistant notes) and the shared code this build draws on. Notes for an AI assistant: am243x/AGENTS.md.
git 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 portability/pqc-join am243x third-party tools mac-setupBuilds, never flashed. ML-KEM-768 links for this board in 31.4 kB of flash and 28.4 kB of RAM with a 12 kB stack. 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. There are no written steps for this board yet.
git clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
./start.sh mspm0g3507 post-quantum --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
py start.py mspm0g3507 post-quantum --assistant claudeNot Claude Code? Copy this prompt instead.
Only the code for this board
git 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 portability/pqc-joinEverything for this build
Adds the board's own folder (its notebook, fixes and assistant notes) and the shared code this build draws on. Notes for an AI assistant: mspm0g3507/AGENTS.md.
git 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 portability/pqc-join mspm0g3507 third-party tools mac-setupRan here. Both algorithms with the same code, every step passes NIST's known-answer vectors, in 36 kB of RAM. 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. There are no written steps for this board yet.
git clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
./start.sh cc2340r5 post-quantum --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
py start.py cc2340r5 post-quantum --assistant claudeNot Claude Code? Copy this prompt instead.
Only the code for this board
git 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 cc2340r5/bench/pqc portability/pqc-joinEverything for this build
Adds the board's own folder (its notebook, fixes and assistant notes) and the shared code this build draws on. Notes for an AI assistant: cc2340r5/AGENTS.md.
git 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 portability/pqc-join cc2340r5 third-party tools mac-setupRan here. ML-KEM-768 key generation takes 149k cycles (about 74 µs at 2 GHz) and ML-DSA-44 signs in 1.18 million, on a Cortex-A72 core under Linux.
Start it
Paste this in a terminal. It hands off to an AI assistant with this board's notes. There are no written steps for this board yet.
git clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
./start.sh tda4 post-quantum --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs
py start.py tda4 post-quantum --assistant claudeNot Claude Code? Copy this prompt instead.
Only the code for this board
git 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 tda4/night portability/pqc-joinEverything for this build
Adds the board's own folder (its notebook, fixes and assistant notes) and the shared code this build draws on. Notes for an AI assistant: tda4/AGENTS.md.
git 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 portability/pqc-join tda4 third-party tools mac-setupOr take the whole repository
git clone https://github.com/Fox-Red-Labs/fox-red-labs.gitReports 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
- LP-MSPM0G3507: folder
mspm0g3507/.- README: the board's lab notebook (what was run, in order)
- Notes for an AI coding assistant working in this repository: notes for an AI assistant; copy it into your own project if you use one
- FAQ: errors and fixes
The other 2 board folders
- LP-EM-CC2340R5: folder
cc2340r5/.- README: the board's lab notebook (what was run, in order)
- Notes for an AI coding assistant working in this repository: notes for an AI assistant; copy it into your own project if you use one
- FAQ: errors and fixes
- LP-CC1354P10-1: folder
cc1354p10/.- README: the board's lab notebook (what was run, in order)
- Notes for an AI coding assistant working in this repository: notes for an AI assistant; copy it into your own project if you use one
- FAQ: errors and fixes
- LP-EM-CC2340R5: folder
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 MHz | 997k / 1.15M / 1.4M cycles for key pair, encapsulate, decapsulate | the data (CSV) |
|---|---|---|
| ML-DSA-44 at 48 MHz | 2.37M cycles key pair, 2,421,949 verify, 7,406,767 mean sign over 16 messages | the data (CSV) |
| Flash | ML-KEM 82.4 kB and ML-DSA 109 kB at -O3; 9.7 kB and 13.6 kB at -Os | the 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
Details
ML-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 runDetails
both 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 ranWorks 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
- Post-quantum secure join: the board-independent C code (MSPM0 G3507)
- Port (CC2340R5)
Code brought from elsewhere
This project uses code that was written for other chips or tools. Each links to how to get it running.
- Post-quantum key exchange and signatures on seven boards: LP-CC1354P10-1, LP-EM-CC2340R5, LP-AM243, LP-MSPM0G3519, LP-MSPM33C321A, LP-EM-CC2755P10 and LP-MSPM0G5187 Works ML-KEM-768 key exchange and ML-DSA-44 signatures pass NIST's known-answer vectors on seven boards, from a 36 kB Cortex-M0+ to an 800 MHz Cortex-R5F; the CC1354P10-1 also agrees a key with a Mac.
