Add SPDM 1.2 CHUNK_GET message chunking and enable ML-DSA-87 over the wire#17
Merged
Conversation
…-path hook fix, adversarial tests
…rd coverage, doc accuracy
…ustom MTU) in build matrix
…IZE guard, drop stale comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the SPDM 1.2 large-response chunking engine (CHUNK_GET reassembly) and turns ML-DSA-87 on over the wire — the second item of #10. ML-DSA-87's KEY_EXCHANGE_RSP / CHALLENGE_AUTH / signed MEASUREMENTS (~4.7–4.8 KB) exceed the common DataTransferSize (spdm-emu = 4608 B), so the responder splits them; this reassembles them.
Design (per the lightweight / zero-alloc / fine-grained-macro brief)
wolfSPDM_SendReceive(cleartext KEY_EXCHANGE / CHALLENGE) andwolfSPDM_SecuredExchange(encrypted MEASUREMENTS) — so every parser sees a complete logical message and the transcript stays correct.chunkBuf[WOLFSPDM_CHUNK_BUF_SIZE]in the context holds a single CHUNK_RESPONSE; the reassembled message lands in the caller's existing buffer (no new buffers grow; ctx 72496 B < the 73728 B cap).WOLFSPDM_HAVE_CHUNK(--disable-chunking),WOLFSPDM_CHUNK_BUF_SIZE(MTU/transport size — lower it for constrained devices),WOLFSPDM_CHUNK_NO_SECURED(drop just the encrypted path),WOLFSPDM_CHUNK_MAX_CHUNKS.CHUNK_GET=0x86,CHUNK_RESPONSE=0x06,CHUNK_CAP=0x00020000,ERROR(LargeResponse)=0x0F, Handle at byte 4, u16-vs-u32 ChunkSeqNo by version.Testing
make check: 70 (ML-DSA + chunk) / 65 (chunk, no ML-DSA) / 64 (both disabled) — the gates compile cleanly in/out. Newtest_chunk_reassembledrives the reassembler with a mock multi-chunk transport and a negative (oversized) case.-Wall -Wextra -Wpedantic -Werror -Wconversion -Wshadow); zero allocations insrc/spdm_chunk.c; no bare-scope blocks.New file / docs
src/spdm_chunk.c(the reassembler) + a Message Chunking wiki page; ML-DSA-87 docs updated (no longer "follow-on").