Skip to content

Add fwtpm SPDM support#510

Merged
dgarske merged 1 commit into
wolfSSL:masterfrom
aidangarske:spdm-ftpm
Jun 3, 2026
Merged

Add fwtpm SPDM support#510
dgarske merged 1 commit into
wolfSSL:masterfrom
aidangarske:spdm-ftpm

Conversation

@aidangarske
Copy link
Copy Markdown
Member

@aidangarske aidangarske commented May 23, 2026

SPDM 1.8.4 responder in fwtpm_server (TCG cert + DSP0274 PSK) so the
SPDM stack can be tested end-to-end without real silicon. New CI
spdm-test.yml to replaces the self-hosted-Pi
gate for simulator coverage; existing hw-spdm-test.yml stays for real
hardware.

Configure: --enable-fwtpm --enable-spdm --enable-tcg --enable-psk.
Vendor flags optional (--enable-nuvoton, --enable-nations for
vendor wire-format adapters). Spec code gated on spec flags, vendor
adapters on vendor flags.

Test plan

  • spdm-test.yml: 8 build-only + 2 e2e (fwtpm-tcg, fwtpm-psk)
  • hw-spdm-test.yml still green on real Nuvoton + Nations
  • fwtpm-test.yml unchanged

Copilot AI review requested due to automatic review settings May 23, 2026 04:50

This comment was marked as resolved.

aidangarske added a commit to aidangarske/wolfTPM that referenced this pull request May 23, 2026
- fwtpm_main: identity-key gen zero+left-pads ECC export buffers (wc_ecc
  may trim leading zeros), use wc_ForceZero on tmp scratch.
- spdm_responder: move static 4KB working buffers (plain/respPlain,
  payload/respPayload) into WOLFSPDM_RESP_CTX so concurrent contexts
  don't share working memory.
- spdm_responder: hoist 'derivedAppKeys' out of mid-block declaration
  (C89 violation on stricter toolchains).
- fwtpm_io: WOLFSPDM_E_FRAMING return now drops the TCP connection per
  the responder API contract, instead of swallowing it as TPM_RC_FAILURE.
- fwtpm_io: trim SPDMONLY-lock comment to match actual allowlist
  (GetCapability only).
- configure.ac: reject --enable-psk --disable-tcg (PSK uses TCG framing).
- spdm-test.yml: drop spdm-psk-only build entry — now intentionally
  rejected by configure.
@aidangarske aidangarske self-assigned this May 23, 2026
@aidangarske aidangarske marked this pull request as ready for review May 26, 2026 18:04
@aidangarske aidangarske requested a review from dgarske May 26, 2026 18:26
@dgarske dgarske self-assigned this May 27, 2026
Copy link
Copy Markdown
Member

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work!

  1. BLOCKER (ASCII rule): ~31 added lines across 15 files have Unicode em-dashes/arrows in comments (spdm_responder.c ×8, fwtpm_main.c ×5, …). Mechanical fix; violates your RULES.md.
  2. Doc: "SPDM 1.8.4" — the PR title and both READMEs say "SPDM 1.8.4 responder," but the code negotiates protocol 1.3 (SPDM_VERSION_13); 1.8.4 isn't a valid SPDM version. The exploration had repeated "1.8.4" uncritically.
  3. LOW (recommended): PSK_CLR auth compare at spdm_responder.c:957 uses XMEMCMP (plain memcmp) while the sibling HMAC paths use a constant-time XOR loop. The exploration claimed this line was constant-time — it isn't. Low severity (digest compare) but inconsistent with the project rule.

Plus two smaller doc items: README says "8" CI permutations but there are 7 (fwtpm/README.md:177), and the root README omits SPDM entirely despite it being a v4.0.0 headline alongside fwTPM/PQC.

@dgarske dgarske removed their assignment Jun 3, 2026
@dgarske dgarske merged commit 0b75b92 into wolfSSL:master Jun 3, 2026
153 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants