@@ -10,21 +10,42 @@ source.
1010
1111The SPDM code lives in the [ wolfSPDM] ( https://github.com/wolfSSL/wolfSPDM )
1212library, included as the ` lib/wolfSPDM ` submodule and compiled into libwolftpm
13- in its TPM profile. Clone with ` git clone --recursive ` , or run
14- ` git submodule update --init ` in an existing checkout. wolfSPDM also builds
15- standalone as a DMTF SPDM 1.2-1.4 requester with PQC for spdm-emu testing.
13+ in its TPM profile. Because SPDM is a submodule, any wolfTPM checkout that will
14+ use SPDM must be cloned with ` --recursive ` (see [ Building] ( #building ) step 1).
15+ Without the submodule, ` ./configure --enable-spdm ` stops with: `--enable-spdm
16+ needs the wolfSPDM submodule: run git submodule update --init lib/wolfSPDM`.
17+
18+ Building inside wolfTPM selects wolfSPDM's ** TPM profile** automatically. A TPM
19+ speaks only the TCG SPDM Binding, so this profile compiles out the DMTF standard
20+ requester, measurements, challenge, chunking, heartbeat, key update, and the
21+ MCTP application-data API. You do not pass ` --disable-mctp ` here; ` --enable-spdm `
22+ is enough. See [ The wolfTPM SPDM profile] ( #the-wolftpm-spdm-profile ) . The same
23+ wolfSPDM tree also builds standalone as a DMTF SPDM 1.2-1.4 requester with PQC
24+ and full MCTP for spdm-emu testing.
1625
1726## Quick Start
1827
28+ ### Get the source
29+
30+ ``` bash
31+ # SPDM lives in the lib/wolfSPDM submodule, so clone wolfTPM recursively
32+ git clone --recursive https://github.com/wolfSSL/wolfTPM.git
33+ git clone https://github.com/wolfSSL/wolfssl.git # sibling checkout
34+ cd wolfTPM
35+ ```
36+
37+ Already cloned without ` --recursive ` ? Run `git submodule update --init
38+ lib/wolfSPDM` once inside the checkout.
39+
1940### Nuvoton NPCT75x
2041
2142``` bash
22- # Build wolfSSL
23- pushd ../wolfssl && ./autogen.sh && \
43+ # Build wolfSSL (in the sibling checkout, then return here)
44+ cd ../wolfssl && ./autogen.sh && \
2445./configure --enable-wolftpm --enable-ecc --enable-sha384 --enable-aesgcm --enable-hkdf --enable-sp && \
25- make && sudo make install && sudo ldconfig && popd
46+ make && sudo make install && sudo ldconfig && cd -
2647
27- # Build wolfTPM
48+ # Build wolfTPM (submodule already present from the recursive clone)
2849./autogen.sh && ./configure --enable-spdm --enable-nuvoton && make
2950
3051# Enable SPDM (one-time), reset, connect
@@ -39,12 +60,12 @@ full instructions.
3960### Nations NS350
4061
4162``` bash
42- # Build wolfSSL
43- pushd ../wolfssl && ./autogen.sh && \
63+ # Build wolfSSL (in the sibling checkout, then return here)
64+ cd ../wolfssl && ./autogen.sh && \
4465./configure --enable-wolftpm --enable-ecc --enable-sha384 --enable-aesgcm --enable-hkdf --enable-sp && \
45- make && sudo make install && sudo ldconfig && popd
66+ make && sudo make install && sudo ldconfig && cd -
4667
47- # Build wolfTPM
68+ # Build wolfTPM (submodule already present from the recursive clone)
4869./autogen.sh && ./configure --enable-spdm --enable-nations && make
4970
5071# Connect (identity key is factory default)
@@ -150,26 +171,42 @@ establishes the encrypted session regardless of the cleartext startup result.
150171See [ How Auto-SPDM Works] ( #how-auto-spdm-works ) for details.
151172
152173** Reset method differs by vendor:**
153- - ** Nuvoton:** GPIO reset — ` gpioset gpiochip0 4=0 && sleep 0.1 && gpioset gpiochip0 4=1 && sleep 2 `
174+ - ** Nuvoton:** GPIO reset: ` gpioset gpiochip0 4=0 && sleep 0.1 && gpioset gpiochip0 4=1 && sleep 2 `
154175- ** Nations:** Full power cycle required (GPIO 4 is not wired to TPM_RST on NS350 daughter boards)
155176
156177## Building
157178
158- ### wolfSSL
179+ ### 1. Clone with the wolfSPDM submodule
180+
181+ SPDM is built from the ` lib/wolfSPDM ` submodule, so clone wolfTPM recursively:
182+
183+ ``` bash
184+ git clone --recursive https://github.com/wolfSSL/wolfTPM.git
185+ git clone https://github.com/wolfSSL/wolfssl.git # sibling checkout for wolfSSL
186+ cd wolfTPM
187+ ```
188+
189+ Already cloned wolfTPM without ` --recursive ` ? Pull the submodule in:
159190
160191``` bash
161- pushd ../wolfssl
192+ git submodule update --init lib/wolfSPDM
193+ ```
194+
195+ ### 2. wolfSSL
196+
197+ ``` bash
198+ cd ../wolfssl
162199./autogen.sh
163200./configure --enable-wolftpm --enable-ecc --enable-sha384 \
164201 --enable-aesgcm --enable-hkdf --enable-sp
165202make
166203sudo make install && sudo ldconfig
167- popd
204+ cd - # back to the wolfTPM checkout
168205```
169206
170207Both Nuvoton and Nations use the same wolfSSL flags above.
171208
172- ### wolfTPM
209+ ### 3. wolfTPM
173210
174211``` bash
175212./autogen.sh
@@ -179,6 +216,29 @@ Both Nuvoton and Nations use the same wolfSSL flags above.
179216make
180217```
181218
219+ ### The wolfTPM SPDM profile
220+
221+ ` --enable-spdm ` defines ` WOLFTPM_SPDM ` , which auto-selects wolfSPDM's
222+ ` WOLFSPDM_PROFILE_TPM ` . A TPM speaks only the TCG SPDM Binding, so this profile
223+ is a lean, TCG-focused build. Compiled out automatically:
224+
225+ - the ** DMTF standard requester** : ` GET_CAPABILITIES ` , ` NEGOTIATE_ALGORITHMS ` ,
226+ ` GET_DIGESTS ` , ` GET_CERTIFICATE ` , and certificate-chain validation
227+ - ** measurements** , ** challenge** , and ** chunking** (they ride the cert flow)
228+ - ** heartbeat** and ** key update**
229+ - the ** MCTP application-data API** (secured messages use the TCG 16-byte pad)
230+
231+ There is no ` --disable-mctp ` option on wolfTPM's ` configure ` , and you should not
232+ try to add one. The lean profile is automatic with ` --enable-spdm ` , and
233+ wolfSPDM's downstream CI asserts the standard-requester symbols above are absent
234+ from ` libwolftpm ` .
235+
236+ The profile does not define ` WOLFSPDM_NO_MCTP ` , so the MCTP secured-message
237+ framing stays compiled, though a TCG-only TPM never exercises it. Building
238+ wolfSPDM ** standalone** with ` --disable-mctp ` (which requires ` --enable-tcg ` )
239+ additionally strips that path for a pure-TCG requester. That flag belongs to
240+ wolfSPDM's own ` configure ` , never wolfTPM's.
241+
182242### Configure Options
183243
184244| Option | Description |
@@ -250,7 +310,7 @@ gpioset gpiochip0 4=0 && sleep 0.1 && gpioset gpiochip0 4=1 && sleep 2
250310
251311#### Nations
252312
253- Identity key mode is the factory default — no setup required. If previously
313+ Identity key mode is the factory default, no setup required. If previously
254314unset, restore with:
255315
256316``` bash
@@ -355,14 +415,14 @@ to verify. Using the wrong size makes PSK_CLEAR impossible.
355415### Running the Test Suite
356416
357417``` bash
358- # Nuvoton (identity key — includes GPIO resets between tests)
418+ # Nuvoton (identity key, includes GPIO resets between tests)
359419export SPDM_RESPONDER_PUBKEY=< trusted_p384_x_y_hex>
360420./examples/spdm/spdm_test.sh ./examples/spdm/spdm_ctrl nuvoton
361421
362- # Nations (identity key — no GPIO resets)
422+ # Nations (identity key, no GPIO resets)
363423./examples/spdm/spdm_test.sh ./examples/spdm/spdm_ctrl nations
364424
365- # Nations (PSK — full lifecycle: provision → connect → clear → restore)
425+ # Nations (PSK, full lifecycle: provision -> connect -> clear -> restore)
366426./examples/spdm/spdm_test.sh ./examples/spdm/spdm_ctrl nations-psk
367427```
368428
@@ -440,7 +500,7 @@ including SPDM session info.
440500
441501** Status Caveat:** On some NS350 firmware versions, ` --status ` may report
442502"Identity Key: not provisioned" even when the key is present. The ` --connect `
443- command is the definitive test — if the ECDHE handshake succeeds, the identity
503+ command is the definitive test: if the ECDHE handshake succeeds, the identity
444504key is provisioned.
445505
446506** ClearAuth:** Must be exactly 32 bytes. ` PSK_SET ` stores its SHA-384 digest
@@ -539,9 +599,9 @@ the TPM. `sudo reboot` is not sufficient as the 3.3V rail stays powered.
539599
540600For standard SPDM protocol support including session establishment with the
541601DMTF spdm-emu emulator, measurements, challenge authentication, heartbeat,
542- and key update, see the [ wolfSPDM] ( https://github.com/aidangarske /wolfSPDM )
602+ and key update, see the [ wolfSPDM] ( https://github.com/wolfSSL /wolfSPDM )
543603standalone library.
544604
545605## License
546606
547- GPLv3 — see COPYING file. Copyright (C) 2006-2026 wolfSSL Inc.
607+ GPLv3. See COPYING file. Copyright (C) 2006-2026 wolfSSL Inc.
0 commit comments