Fox Red Labs / Builds / Security (post-quantum)
Post-quantum key exchange on a LaunchPad
A TI board and a Mac 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)
Parts and steps
You need
- LP-CC1354P10-1 LaunchPad development kit makes the key pair and finishes the key
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 Mac 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.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 Mac's line. The script ends withREADBACK MATCHES BACKUP.
Or hand it to a coding assistant
Paste this in a terminal. It hands off to an AI assistant.
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 claudeIt runs the steps above and reports what it saw.
Not Claude Code? Copy this prompt instead.
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.
What to build next
Every build. The code for all of them is in the GitHub repository.
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 Mac and decrypts its line. Ran on 1 board. Results, sources, timing and limits.
Expected result: The board and the Mac 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
- MSPM0G3507ran another way
- MSPM0L1306, CC2340R5, F2800137
- 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
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
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
- Post-quantum secure join: the board-independent C code (MSPM0 G3507)
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 the LP-CC1354P10-1 Works ML-KEM-768 key exchange and ML-DSA-44 signatures pass NIST's known-answer vectors on the CC1354P10-1.
Get the code and tell us how it wentThe clone command, the board folder with its AGENTS.md, reports from others, and the three report forms.
Get the code
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 1 board folder
- 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-CC1354P10-1: 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.