Fix v185 spec compliance authenticate object context blobs on ContextSave/Load - #568
Merged
dgarske merged 1 commit intoAug 10, 2026
Conversation
aidangarske
commented
Aug 10, 2026
Member
There was a problem hiding this comment.
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.
aidangarske
force-pushed
the
fenrir-9205-contextload-object-integrity
branch
from
August 10, 2026 17:03
b51b33d to
5d3ebba
Compare
aidangarske
requested review from
dgarske
and removed request for
wolfSSL-Fenrir-bot
August 10, 2026 17:04
aidangarske
marked this pull request as ready for review
August 10, 2026 17:04
dgarske
approved these changes
Aug 10, 2026
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.