Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
An allowed fast-math RSA configuration fails to build without key generation, and misleading NV-format documentation risks downgrades that lose TPM state.
2 open issues
What changed in this PR
Reduces wolfTPM client and fwTPM memory usage for 5.0.0, while adding power-loss recovery for custom NV storage backends.
Changes:
- Introduces compact PCR storage, shared memory pools, one-prime RSA storage, and revised small-stack sizing.
- Adds format 5 NV journals, migration support, and two-region OP-TEE storage.
- Updates ABI versions, documentation, regression tests, and CI coverage.
| File | Description |
|---|---|
wolftpm/version.h |
Bumps version to 5.0.0. |
wolftpm/tpm2.h |
Separates RSA private-buffer sizing. |
wolftpm/tpm2_types.h |
Defines RSA limits and conditional buffer sizes. |
wolftpm/fwtpm/fwtpm.h |
Adds compact storage, pools, and journal state. |
wolftpm/fwtpm/fwtpm_optee.h |
Defines dual-object NV storage. |
wolftpm/fwtpm/fwtpm_nv.h |
Defines format 5 journal records. |
wolftpm/fwtpm/fwtpm_crypto.h |
Updates RSA and response helper interfaces. |
tests/unit_tests.c |
Expands RSA and no-strings coverage. |
tests/optee/tee_internal_api.h |
Adds the mock overwrite flag. |
tests/optee/README.md |
Describes expanded storage tests. |
tests/optee/optee_core_tests.c |
Tests migration and power-loss recovery. |
tests/optee/mock_tee.h |
Exposes storage fault-injection controls. |
tests/optee/mock_tee.c |
Implements snapshots and simulated power cuts. |
tests/optee/fwtpm_optee_port_tests.c |
Tests dual-region storage operations. |
tests/fwtpm_check.sh |
Enables small-stack RSA examples. |
src/fwtpm/ports/optee/README.md |
Documents storage recovery and compatibility. |
src/fwtpm/ports/optee/fwtpm_optee_nv.c |
Implements dual-object NV access. |
src/fwtpm/fwtpm.c |
Implements pools and persistent-key expansion. |
src/fwtpm/fwtpm_crypto.c |
Implements one-prime RSA conversion. |
examples/keygen/keygen.c |
Adjusts public-key PEM buffer sizing. |
docs/release-notes.md |
Summarizes sizing and client changes. |
docs/fwtpm/usage.md |
Documents key blobs and test configurations. |
docs/fwtpm/hal-and-porting.md |
Explains journal formats and recovery guarantees. |
docs/fwtpm/building.md |
Documents pools and memory costs. |
docs/build-options.md |
Documents new sizing and string options. |
configure.ac |
Updates versions and small-stack definitions. |
CMakeLists.txt |
Updates version and buffer configuration. |
ChangeLog.md |
Records ABI and memory changes. |
.github/workflows/make-test-swtpm.yml |
Adds no-strings testing. |
.github/workflows/fwtpm-test.yml |
Expands journal, pool, and small-stack testing. |
Review effort: Balanced
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.


This PR cuts static RAM, stack and flash in the client library and the firmware TPM (fwTPM), adds a power-loss safe fwTPM NV journal, and bumps the version to 5.0.0 for the ABI changes. Key changes include:
FWTPM_FULL_POOLSto keep the full-size pools.WOLFTPM_NO_STRINGSto compile out the name and response code tables.TPM2B_PUBLIC_KEY_RSAsized at the modulus of a new public RSA limit,MAX_RSA_PUB_KEY_BITS(default 4096);MAX_RSA_KEY_BITSkeeps its meaning and default.ABI and compatibility:
FWTPM_FULL_POOLS. A journal written by this release does not load in an older one.Testing:
FWTPM_TEST_NV_CUT_ALL), whole-key blob and journal conversion, and RSA 4096 in small-stack builds.Resolves F-18944