GitHub

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

  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 Mac 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.

    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 Mac's line. The script ends with READBACK 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 claude

It runs the steps above and reports what it saw.

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, following docs/builds/post-quantum.md. Tell me when to plug in a board and what you saw at each step.

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.

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 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

  • 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

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-CC2340R5
LAUNCHXL-F2800137

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

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

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.