Commit Graph

41 Commits (6fbb49a94f2ba4048b69d03ea3d2add02e2a7543)

Author SHA1 Message Date
David Garske 6fbb49a94f wolfTPM Release v3.9.0. Updated copyright and version. 2025-05-14 15:31:07 -07:00
David Garske 5a5a7e2d25 Fix issue with possible handle leak in bench example. Reported in #411. 2025-05-02 15:31:06 -07:00
David Garske 3617abca97 Fix warning: `cannot convert argument of incomplete type 'void *' to 'WOLFTPM2_KEY *'`. Fix `extend.c:158:9: warning: Value stored to 'rc' is never read`. Fix `src/tpm2_wrap.c:2193:5: warning: Value stored to 'sensSz' is never read`. 2024-11-05 11:34:54 -08:00
David Garske 026c82f799 Fixes and new tests for building wolfCrypt/wolfTPM without ECC or RSA. Fixes ZD 18470. Improved smallstack (eliminated `WOLFTPM2_MAX_BUFFER`). Fixes for building with NO_ASN. 2024-08-19 09:55:15 -07:00
David Garske c98ee9a71e Update copyright date. 2024-04-24 10:42:27 -07:00
David Garske b395b65287 Fix for config.h, which should only be included from .c files, not headers. ZD 17473 2024-02-07 14:28:33 -08:00
David Garske 97d8845c6f Added CI tests for all examples and additional build tests. 2023-08-30 15:11:24 -07:00
David Garske 0ceeebeaf7 Fix for building with no PEM to DER. Fix for building with static library and no debug, due to missing stdio in examples. Fix for TLS examples missing WOLFCRYPT_ONLY check. Fix for building with WC_NO_RNG. Fix for RSA salt with RNG using crypto cb. 2023-05-02 16:18:21 -07:00
David Garske c05bf659c2 Fix broken paths with HAL refactor. Update TLS examples to use latest TLS version (allowing downgrade). 2023-01-20 08:29:53 -08:00
David Garske 41e5750ff2 Peer review fixes. Cleanups for return code checking, stdlib functions, unknown args and coding standards. 2022-10-04 13:19:51 -07:00
David Garske d491437e08 Use `strcmp` since `argv` is guaranteed to be NULL terminated. Fix keygen example whitespace alignment. 2022-10-04 11:44:16 -07:00
David Garske 3f84b2efbc wolfTPM v2.5.0 release prep 2022-07-22 09:32:57 -07:00
Elms 084ef170b7 cmake: windows fixes and spell fixes
* Examples working on Windows and SWTPM
 * Check command availability (including for windows blocking it).
 * update unseal to work without persistent NV storage
* cleanup cmake from review
* fix a few spelling mistakes
2022-04-07 10:55:11 -07:00
David Garske 2b8cfb8692 wolfTPM Release v2.1.0 preparation.
* Updated copyright
* Fixed minor cast warning.
* Fixed minor scan-build warnings.
* Cleanup print public and fix possible print of uninitialized field.
2021-03-17 10:13:50 -07:00
David Garske 845b3d1da2 Release fixes and cleanups. Fixes for init of `WOLFTPM2_HASH` in `wolfTPM2_HashStart`. Fix for for various build configurations (--disable-wrapper). Fix for Microchip "sign" bit on symmetric keys. Fix for scan-build warnings. Cleanup whitespace. 2020-12-07 11:01:02 -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
David Garske 409fd96502 Fixes for response decryption. Nonce from TPM captured correctly now. Added support for args to all examples. 2020-11-24 16:44:20 -08:00
David Garske dbd8e41b47 Refactor of the session authentication. Added "-e" option to some examples to enable parameter encryption and removed the _paramenc.c files. Fixup for the `getPrimaryStoragekey` to allow persisting if not `WOLFTPM_WINAPI`. Improve command line options. Added calculation of command hash and HMAC for sessions. 2020-11-20 16:47:14 -08:00
David Garske 675f7deb22 Fixes for a couple minor build errors and warnings. Found using scan-build, CC=g++ and `NO_FILESYSTEM`. 2020-11-13 15:57:03 -08:00
Elms 3ce0a6871c Rebase and leverage new API with KEYBLOB 2020-11-12 14:08:13 -08:00
Elms 045800ccf5 examples: factor out common key setup steps 2020-11-12 14:04:00 -08:00
David Garske 6d46b26bde Added dynamic module detection at run-time when using internal TIS. 2020-07-13 09:55:36 -07:00
Chris Conlon 91ef0b0e6e update copyright to 2020 2020-01-03 15:31:27 -08:00
David Garske 7887130287 wolfTPM v1.7 Release 2019-12-27 14:43:30 -08:00
David Garske 3e9d70c159 Fix to better handle chip detection. Added stdio printf include for TPM benchmark. Added C++ support. 2019-05-07 10:39:17 -07:00
David Garske d21ba091b4 Cleanup to combine benchmark time code and allow override using `WOLFSSL_USER_CURRTIME`. Benchmark modes can be disabled using `NO_TPM_BENCH`. Fix a few minor warnings. 2019-02-12 10:29:22 -08:00
David Garske 19bfc49d4e Fix for polling timeout issue on RSA key gen. Improved performance for SLB9670 by adding 10us delay between polling. Tuned max SPI clock and performance for supported TPM 2.0 chips. Cleanups for the configure automake output. Updated benchmarks and console output for examples in README.md. Added self test wrapper and call to it in wrapper init to resolve ATTPM20 issue (can also be enabled using `WOLFTPM_PERFORM_SELFTEST`). 2019-02-08 17:29:34 -08:00
David Garske b380020475 Fix spelling error. Extend the TLS benchmark time support. 2019-02-07 15:46:53 -08:00
David Garske 70b354677e Implemented workaround for TPM2_EncryptDecrypt. Improved ATTPM20 workarounds for backwards compatibility. Added README.md notes for ATTPM20. 2019-02-01 11:01:40 -08:00
David Garske 6090e4bff6 Implemented workarounds for known ATTPM20 issues. Changes the default algo for PCR read to SHA1. Clear the sign obj attrib on symmetric key creation template (both sign and decrypt cannot be set at same time). 2019-02-01 10:28:11 -08:00
David Garske b49454b130 Increased IO max to min 33MHz. Disabled Symmetric key creation in benchmark for mchp. 2019-01-31 09:08:06 -08:00
David Garske 148b36bf1e Fix for handling unsupported symmetric algorithms on benchmark. 2019-01-02 08:36:02 -08:00
David Garske e38413fa03 Improved EncryptDecrypt wrapper to allow larger block for better performance. Fixes for AES/Hashing benchmarks.
Results on ST33TP SPI at 1MHz:

```
RNG                  8 KB took 1.124 seconds,    7.117 KB/s
AES-128-CBC-enc     88 KB took 1.023 seconds,   86.014 KB/s
AES-128-CBC-dec     88 KB took 1.020 seconds,   86.234 KB/s
AES-256-CBC-enc     90 KB took 1.023 seconds,   88.008 KB/s
AES-256-CBC-dec     90 KB took 1.022 seconds,   88.037 KB/s
AES-128-CTR-enc     82 KB took 1.021 seconds,   80.350 KB/s
AES-128-CTR-dec     78 KB took 1.004 seconds,   77.682 KB/s
AES-256-CTR-enc     78 KB took 1.012 seconds,   77.110 KB/s
AES-256-CTR-dec     78 KB took 1.014 seconds,   76.915 KB/s
AES-128-CFB-enc     84 KB took 1.012 seconds,   82.983 KB/s
AES-128-CFB-dec     84 KB took 1.019 seconds,   82.407 KB/s
AES-256-CFB-enc     84 KB took 1.021 seconds,   82.312 KB/s
AES-256-CFB-dec     84 KB took 1.020 seconds,   82.357 KB/s
SHA1                22 KB took 1.000 seconds,   21.995 KB/s
SHA256              22 KB took 1.046 seconds,   21.043 KB/s
RSA     2048 key gen        1 ops took 10.927 sec, avg 10926.749 ms, 0.092 ops/sec
RSA     2048 Public        63 ops took 1.002 sec, avg 15.903 ms, 62.880 ops/sec
RSA     2048 Private        4 ops took 1.020 sec, avg 255.000 ms, 3.922 ops/sec
RSA     2048 Pub  OAEP     62 ops took 1.013 sec, avg 16.345 ms, 61.182 ops/sec
RSA     2048 Priv OAEP      4 ops took 1.027 sec, avg 256.824 ms, 3.894 ops/sec
ECC      256 key gen        5 ops took 1.156 sec, avg 231.156 ms, 4.326 ops/sec
ECDSA    256 sign          23 ops took 1.027 sec, avg 44.660 ms, 22.391 ops/sec
ECDSA    256 verify        14 ops took 1.069 sec, avg 76.354 ms, 13.097 ops/sec
ECDHE    256 agree          5 ops took 1.244 sec, avg 248.865 ms, 4.018 ops/sec
```
2018-12-28 16:00:13 -08:00
David Garske c02d096ff6 Added TPM benchmark support for AES (ECB, CTR, CBC, CFB) 128/256 and SHA-1, SHA-256, SHA-384 and SHA-512. 2018-12-28 15:30:32 -08:00
David Garske d28e63c72f Added TPM2 wrappers for symmetric AES encrypt and decrypt. Moved common test parameters into examples/tpm_test.h. 2018-12-28 12:15:58 -08:00
David Garske 6132965a55 Added symmetric benchmark support. Started with RNG. 2018-12-23 16:31:20 -08:00
David Garske 0cfe8dd789 Decoupled the fixed algorithms sizes and build options from wolfCrypt. Now wolfCrypt can be built with algos like SHA256 and AES disabled, but they can still be supported in wolfTPM. Updated the README.md with a few additional build details. 2018-09-13 18:41:03 -07:00
David Garske 7f768a2afa Further cleanup of the I2C busy handling to avoid delay and added additional code comments. Added key gen to benchmark. Updated README.md. Configure check to ensure advanced IO is enabled for I2C. 2018-09-05 19:28:09 -07:00
David Garske 6fe075911a * Added advanced IO callback support (enabled using `--enable-advio` or `#define WOLFTPM_ADV_IO`).
* Added ST33 TPM 2.0 support (`--enable-st33` or `#define WOLFTPM_ST33`). Only SPI version is tested and verified.
* Experimental TIS I2C support (`--enable-i2c` or `#define WOLFTPM_I2C`).
* Cleanup of the IO callback examples.
* Added support for Atmel ASF SPI.
2018-08-22 16:40:33 -07:00
David Garske f1e82ac0e4 Added PKCS7, CSR and TLS Client examples using the TPM. Added builtin wrapper support for `WOLF_CRYPT_DEV`, which enables wolfCrypt PK type callbacks for RSA and ECC. Moved some of the example configuration into `./examples/tpm_io.h`. TLS Client example is not complete. 2018-07-18 16:28:50 -07:00
David Garske 3e462b0172 Added TPM bechmarking support. 2018-05-25 11:59:55 -07:00