This is a major change to the go-tpm library. It introduces the API that was proposed in 2022 as "TPMDirect", which maps TPM commands to Go structs instead of funcs, allowing greater composability. Stay tuned for more information about this change and how to get started.
If you want to update to this release of go-tpm, you don't have to rewrite all your code! You can start using the new API at your leisure. Simply use the old API at its new path by changing from github.com/google/go-tpm/tpm2 to github.com/google/go-tpm/legacy/tpm2 in your code's import statements:
import github.com/google/go-tpm/tpm2to
import github.com/google/go-tpm/legacy/tpm2What's Changed
- Update tpmdirect with latest changes from master by @chrisfenner in https://github.com/google/go-tpm/pull/269
- Introduce Direct TPM2 API by @chrisfenner in https://github.com/google/go-tpm/pull/266
- Update README.md by @chrisfenner in https://github.com/google/go-tpm/pull/270
- Add a lot of policy and NV commands to TPMDirect by @chrisfenner in https://github.com/google/go-tpm/pull/272
- Implemented and Tested ReadPublic by @matt-tsai in https://github.com/google/go-tpm/pull/279
- Implemented and Tested GetRandom by @matt-tsai in https://github.com/google/go-tpm/pull/277
- Implemented and Tested Sign by @matt-tsai in https://github.com/google/go-tpm/pull/282
- Implemented and Tested Hash, HashSequenceStart, SequenceUpdate, and SequenceComplete by @matt-tsai in https://github.com/google/go-tpm/pull/284
- Supporting functionalities for direct migration by @matt-tsai in https://github.com/google/go-tpm/pull/283
- Define the structure related to ECDAA by @akakou in https://github.com/google/go-tpm/pull/288
- Implemented and Tested PolicyPCR by @matt-tsai in https://github.com/google/go-tpm/pull/289
- Implemented and Tested ContextSave, ContextLoad by @matt-tsai in https://github.com/google/go-tpm/pull/280
- Implemented and Tested Certify by @matt-tsai in https://github.com/google/go-tpm/pull/293
- Implemented and Tested CertifyCreation by @matt-tsai in https://github.com/google/go-tpm/pull/297
- Implemented and Tested pcrReset. by @matt-tsai in https://github.com/google/go-tpm/pull/295
- Adding comments to TestReadPublicKey by @matt-tsai in https://github.com/google/go-tpm/pull/299
- Implement TPM2_Commit by @akakou in https://github.com/google/go-tpm/pull/296
- rename tpmdirect to tpm2 and rename existing tpm2 as legacy/tpm2 by @chrisfenner in https://github.com/google/go-tpm/pull/304
- add several commands needed by Google PINT by @chrisfenner in https://github.com/google/go-tpm/pull/305
- Add type of ECDAA signature by @chrisfenner in https://github.com/google/go-tpm/pull/306
- flatten the new API to just tpm2 by @chrisfenner in https://github.com/google/go-tpm/pull/308
- Use generics to simplify the TPMDirect interface by @chrisfenner in https://github.com/google/go-tpm/pull/310
- make two transcription fixes by @chrisfenner in https://github.com/google/go-tpm/pull/316
- support go generate for constants by @chrisfenner in https://github.com/google/go-tpm/pull/317
- fix reflection on cmd structs not to use elem by @chrisfenner in https://github.com/google/go-tpm/pull/329
- Replay google/master work since the start of tpmdirect by @chrisfenner in https://github.com/google/go-tpm/pull/330
- get rid of adapter.go and rename Startup_ and Shutdown_ by @chrisfenner in https://github.com/google/go-tpm/pull/331
- rely on go-tpm-tools @ 4639ecce2abad383ae6c5cbbc0eba5ba37abb05a by @chrisfenner in https://github.com/google/go-tpm/pull/332
New Contributors
- @matt-tsai made their first contribution in https://github.com/google/go-tpm/pull/279
- @akakou made their first contribution in https://github.com/google/go-tpm/pull/288
Full Changelog: https://github.com/google/go-tpm/compare/v0.3.3...v0.9.0