Skip to content

Fix v185 spec compliance authenticate object context blobs on ContextSave/Load - #568

Merged
dgarske merged 1 commit into
wolfSSL:masterfrom
aidangarske:fenrir-9205-contextload-object-integrity
Aug 10, 2026
Merged

Fix v185 spec compliance authenticate object context blobs on ContextSave/Load#568
dgarske merged 1 commit into
wolfSSL:masterfrom
aidangarske:fenrir-9205-contextload-object-integrity

Conversation

@aidangarske

Copy link
Copy Markdown
Member
F-9205

Copilot AI lite review requested due to automatic review settings August 10, 2026 16:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR strengthens fwTPM ContextSave/ContextLoad spec compliance by authenticating object context blobs (not just session contexts) and adding domain separation so object/session blobs cannot be cross-verified.

Changes:

  • Add a context “type” tag bound into the context-blob HMAC (session vs object) to enforce domain separation.
  • Wrap/unwrap object context blobs using the existing encrypt-then-MAC scheme so forged plaintext object blobs fail integrity checks.
  • Add unit tests covering forged-object rejection, object roundtrip, and domain separation behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
wolftpm/fwtpm/fwtpm_crypto.h Extends context wrap/unwrap API with a context-type parameter and defines type tags.
src/fwtpm/fwtpm_crypto.c Binds ctxType into the HMAC for wrapped context blobs.
src/fwtpm/fwtpm_command.c Updates ContextSave/Load to wrap object blobs and enforce type-specific unwrap behavior.
tests/fwtpm_unit_tests.c Adds tests for forged-object blob rejection, object context roundtrip, and domain separation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/fwtpm/fwtpm_command.c
@aidangarske
aidangarske force-pushed the fenrir-9205-contextload-object-integrity branch from b51b33d to 5d3ebba Compare August 10, 2026 17:03
@aidangarske
aidangarske requested review from dgarske and removed request for wolfSSL-Fenrir-bot August 10, 2026 17:04
@aidangarske
aidangarske marked this pull request as ready for review August 10, 2026 17:04
@dgarske dgarske self-assigned this Aug 10, 2026
@dgarske
dgarske merged commit c7433c1 into wolfSSL:master Aug 10, 2026
236 of 240 checks passed
@aidangarske
aidangarske deleted the fenrir-9205-contextload-object-integrity branch August 10, 2026 23:15
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