Commit Graph

47 Commits (c98ee9a71e7753fc7bcf27266602e8dcaa16c89d)

Author SHA1 Message Date
David Garske 892726e6b5 Added support for Infineon SLB9672/SLB9673 Firmware upgrade (see examples/firmware/README.md)
Added Infineon Modus Toolbox support. See `wolfssl/IDE/Infineon/README.md` for setup instructions.
Added support for Infineon CyHal I2C support.
Added Firmware extraction tool
Added Firmware update example application `examples/firmware/ifx_fw_update`.
Added support for vendor capabilities `TPM_CAP_VENDOR_PROPERTY`.
Added `XSLEEP_MS` macro for firmware update delay.
Added support for getting key group id, operational mode and update counts.
Added support for abandoning an update.
Added support for firmware update done, but not finalized
Fix auto-detect to not define SLB9672/SLB9673.
2024-04-01 17:21:18 -07:00
David Garske 65e03e15e6 Added Windows Visual Studio project for wolfTPM. 2023-12-06 15:10:44 -08:00
David Garske 31cd20e645 Added new policy_nv example. 2023-09-11 14:37:12 -07:00
David Garske a15260342f wolfTPM Support for sealing/unsealing based on a PCR that is signed externally. Use an external key to sign a PCR digest. Allows a new signed policy to be sent with updates to continue allowing a sealed secret to be unsealed when PCR's change. This resolves the issue with PCR brittleness. 2023-08-29 18:47:18 -07:00
David Garske 14a331d648 Example for secure boot solution to store root of trust in NV. Provides authentication and tamper protection. Fixed uses of arg= in examples. 2023-08-07 11:08:02 -07:00
David Garske ae6bac26c5 Added documentation and tests. 2023-07-19 13:28:50 -07:00
John Bland 6678ea7c4b add external nvram policy sealing example, fix wolfTPM2_SealWithAuthSigNV
wolfTPM2_SealWithAuthSigNV needs to have PolicyPCR called as a part of its logic since it uses wolfTPM2_SetAuthPassword, which interferes with the policy digest
2023-04-17 18:29:18 -04:00
John Bland b4a8ba698e
Sealing secrets with PolicyPCR and PolicyAuthorize (#261)
* Support for PCR with policy. Issue #109

* Progress on PCR policy. Work from John Bland.

* add wrapper functions to seal secrets the NVM with policy authorization

fix the seal and unseal with policy functions to work with non trial policies

update policy examples to allow multiple pcr indicies to be used, currently only 2 can be used because TPML_PCR_SELECTION only allows 2 pcr sellections, may need to be refactored but I didn't want to blow that part of the codebase up

* fix TPM2_SetupPCRSel to correctly use hash type banks

* update policy functions and examples based on pr comments

fixed rsa keys not working due to null default signing algorithm, seal_policy_auth can now be called with no arguments and will pick defaults

* update policy examples based on pcr comments

added error codes and htons macro for use when wolfcrypt is not available

* added policySigned logic to policy seal with nv functions

currently the policy seal with auth nv example is broken due to strange session issues

* Improvements to the session authentication for policy sessions.

* update the sealNV functions, add PolicyRestart and manual htnos

wolfTPM2_SealWithAuthSigNV allows for sealing secrets to NV with just the public part of the sealing key and a pre signed signature so that the private part of the key can be kept off the system. PolicyRestart was added to make reseting the policyDigest easy and a manual htnos function was added for use in wolfBoot

* update policy code based on pr comments

* reconfigure wolfTPM after setting up ibm simulator

* define XREWIND in wolfTPM since it is no longer in wolfssl

* fix scan-build warnings

* remove RSA_SIG_SZ

* use signed char in HexCharToByte for strict build options

* update based on pr comments

---------

Co-authored-by: David Garske <david@wolfssl.com>
2023-04-13 11:24:37 -07:00
David Garske fac51233c3 Added example for NV counter increment. Fixes for NV auth handling. 2022-10-04 13:09:05 -07:00
David Garske b41a14689f Add create primary key example. Add support for using a unique template with create and create primary. 2022-06-28 16:40:46 -07:00
David Garske 0ce7038863 Add `wolfTPM2_SetAuthSession` and `wolfTPM2_NVStoreKey`. 2022-05-23 13:51:28 -07:00
Elms a37d2387e0 cmake: fix `unseal` warning and add build to ignore 2022-04-07 12:01:13 -07:00
Elms 56a827ae44 Fix `make install` by renaming pcr example `read.c`
example files are installed into the same directory and must have
unique names.
2021-11-18 10:22:15 -08:00
Dimitar Tomov 5dfa13ec75 Added PCR Read example
Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2021-07-28 14:48:58 +03:00
David Garske c83088decf Release for wolfTPM v2.2.0 preparation. 2021-07-13 11:26:12 -07:00
David Garske 8455beaae4 Fixes for Public PEM functions. Cleanups. 2021-07-12 17:12:22 -07:00
David Garske aa71cfd73d Minor cleanups. 2021-07-12 15:07:45 -07:00
David Garske 9b6791657b Fixes to support "make dox". 2021-06-02 10:20:00 -07:00
Dimitar Tomov 009a5df963 Added examples to create a remote attestation credential
Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2021-04-29 23:26:24 +03:00
Dimitar Tomov ef4925a094 Updated gitignore to include binaries from the new gpio and seal examples
Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2021-04-26 17:04:32 +03:00
David Garske 197754b109 Minor cleanups. 2021-03-12 15:10:58 -08:00
David Garske 4b0b70861c Added parameter encryption support to more examples. Fix to not set "encrypt" or "decrypt" if command doesn't allow it. Updated documentation. 2020-11-30 12:00:54 -08:00
Dimitar Tomov 23e5b629fb Added keyload with parameter encryption example
Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2020-11-19 15:08:30 +02:00
Dimitar Tomov 24a49de385 Added AES CFB parameter support, salted TPM session, fixed KDFa and examples
* Added key generation example with parameter encryption
* Fixes and cleanups for KDFa
* Added KDFa unit test (passes)
* Added AES CFB support
* Fix for nonceTPM
* Added support for encrypted RSA salt and salted-unbounded session
* Removed unsalted-unbounded specific code for authValueKDF from KDFa
* Add innerWrap support
* Add missing wolfcrypt header for AES CFB
* Fixes for casting when calling KDFa for AES CFB parameter encryption
* Add outerWrap support

Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2020-11-19 15:08:30 +02:00
David Garske b48f53f5e7 Improvements to the example tls_server to accept "RSA" or "ECC". Improvement to TLS examples to old load keys/certs that are needed (reduces max handle load count). Added missing `scripts/tls_setup.sh` to automake. 2020-11-13 16:33:14 -08:00
David Garske 961710de63 Added support for importing external private key to get a key blob for easy re-loading. 2020-11-02 14:23:47 -08:00
David Garske 21daf5a21c Key generation and loading examples using disk to store the key. Leverage wolfSSL filesystem abstraction. 2020-10-26 15:49:51 -07:00
Dimitar Tomov 9770252a20 Add flush tool for clearing transient TPM objects like keys and auth sessions
Signed-off-by: Dimitar Tomov <dimi@designfirst.ee>
2020-10-01 00:36:25 +03:00
Dimitar Tomov 3ff97f675b Add TPM2.0 Quote example with Parameter Encryption over the user data
Signed-off-by: Dimitar Tomov <dimi@designfirst.ee>
2020-10-01 00:36:25 +03:00
Dimitar Tomov 0e2837b60d Add TPM2.0 parameter encryption using XOR obfuscation
Signed-off-by: Dimitar Tomov <dimi@designfirst.ee>
2020-10-01 00:36:25 +03:00
David Garske ebfbd4dd2d Moved the new clock_set example into the existing timestamp examples directory. Minor cleanups and fix for printf warning. 2020-09-02 11:46:12 -07:00
Dimitar Tomov 32d423cf71 Add TPM clock increment example
Signed-off-by: Dimitar Tomov <dimi@designfirst.ee>
2020-09-02 11:46:12 -07:00
Dimitar Tomov be3f9b7385 Cleanups based on peer review. Updated gitignore.
Signed-off-by: Dimitar Tomov <dimi@designfirst.ee>
2020-07-22 00:17:50 +03:00
Dimitar Tomov c4339fbb5a Add example of generating a TPM2.0 Quote using wolfTPM
Signed-off-by: Dimitar Tomov <dimi@designfirst.ee>
2020-07-16 17:09:46 +03:00
Dimitar Tomov f96217ead7 Add timestamp example source code
Signed-off-by: Dimitar Tomov <dimi@designfirst.ee>
2020-05-27 01:35:42 +03:00
David Garske e2f5721a83 Added `pkcs7tpmsignedex.p7s` to git ignore. 2019-07-29 15:36:37 -07:00
David Garske a4cf30838d Added support for keeping an HMAC key loaded on finish to allow using the same key for additional HMAC operations. 2019-07-25 08:52:56 -07:00
David Garske aaafa78624 Enhancement to the TLS clients to support better throughput benchmarking. Improved the read elapsed time for more accurate RX benchmarking. Added a simple non-TPM TLS example that integrates with the wolfTPM environment. 2019-02-12 13:37:55 -08:00
David Garske d8b2ea6309 Added TLS server example for wolfTPM. Added `examples/README.md`. 2018-11-13 15:45:39 -08:00
David Garske 1653b2dfa9 Example for IAR EWARM. Shows building the wolfTPM library and using the wrapper API's. The hardware interface is not implemented and marked with a TODO flag. Requires fixes in PR #26. 2018-08-17 10:11:34 -07:00
David Garske 19ef638dc0 Fix for timeout checking. Fixes for OpenSTM32 project example. Started on ST33 support. Updated README.md and release note for v1.3 prep. 2018-07-19 15:45:49 -07:00
David Garske f3559d1171 Added save of the PKCS7 example generated data to file `./examples/pkcs7/pkcs7tpmsigned.p7s`. Added some items to the .gitignore. 2018-07-18 16:28:50 -07:00
David Garske dfe634be13 Fix to handle `CFLAGS`. Added generation of configuration options in `wolftpm/options.h`. Cleanup of the `configure.ac`. 2018-05-23 13:32:09 -07:00
David Garske db49e917ac Split the native and wrapper test code into separate applications. Moved some of the utility wrapper functions into native area to support `WOLFTPM2_NO_WRAPPER`. Fix for storageKey auth in case when it used from NV. 2018-05-01 15:59:54 -07:00
David Garske 156fc9b521 Added Linux SPI stdio support for running on Rasberry Pi. Cleanups for wolfTPM. 2018-02-08 12:21:39 -08:00
David Garske 35a585828b Updates to the IDE example for STM32. 2018-02-07 15:28:31 -08:00
David Garske 8bf8ae340f wolfTPM v1.0 TPM 2.0 support:
* Support for all TPM2 API's using TIS and SPI IO callback.
* Helper for getting TPM return code string `TPM2_GetRCString`.
* TPM 2.0 demo code in `examples/tpm/tpm2_demo.c` with support for STM32 CubeMX SPI as reference.

Requires wolfSSL (https://github.com/wolfSSL/wolfssl/pull/1344)
2018-02-06 16:27:50 -08:00