Commit Graph

483 Commits (c96ffb9ad1910106bb52af1c74d814dcf5a4d31e)

Author SHA1 Message Date
David Garske e58c950a70 Completed new TPM2 wrappers and example code. New functions: `wolfTPM2_LoadPublicKey`, `wolfTPM2_ReadPublicKey`, `wolfTPM2_VerifyHash`, `wolfTPM2_ECDHGen`, `wolfTPM2_RsaEncrypt`, `wolfTPM2_RsaDecrypt`, `wolfTPM2_GetCurveSize`. 2018-03-08 17:07:52 -08:00
David Garske c681164cef Added WOLFTPM2_DEV context. New init/cleanup for wrappers. Added `wolfTPM2_SignHash` function. 2018-03-03 19:49:09 -05:00
David Garske 1426f76e4c New WOLFTPM2 types for handle, session and key. New wrappers for starting session and creating/loading keys. Changed `TPM2_GetNonce` to use current ctx and not use arg. Cleanup of bad arg return code. 2018-03-03 18:49:53 -05:00
David Garske fca0af99a8 Progress with refactor to support parameter encryption/decryption using both session auth and object auth. Cleanup with the response parsing to reduce code / simplify. 2018-03-03 05:03:14 -08:00
David Garske 98181f573a Cleanups based on peer review. Changed the IO callback return type to int. 2018-03-02 09:22:36 +01:00
David Garske 5364c711f0 Fixes after refactor. Further fixes for error code string lookup. 2018-02-28 07:58:27 +01:00
David Garske 85cd1a5b68 Initial progress on supporting encrypt/decrypt for TPM commands. Moved the software RNG support into TPM code. Added new `TPM2_Cleanup` function for making sure resources are free'd and global ctx released. 2018-02-27 23:49:07 +01:00
David Garske fa0d94fbb3 Refactor TIS and Packet code into separate files. Updates to README.md. Increased the Raspberry Pi SPI clock to 33Mhz. 2018-02-27 23:45:41 +01:00
David Garske 5cd7d3cc50 Progress with getting NV working. 2018-02-26 23:53:42 +01:00
David Garske b84396b8e3 Fixes for RSA Decrypt test. Updates to README.md. 2018-02-26 12:15:56 +01:00
David Garske c2d23f927e Fixes for parsing/appending `TPMT_SIGNATURE`. Added tests for `TPM2_ECDH_KeyGen`, `TPM2_ECC_Parameters`, `TPM2_VerifySignature` and `TPM2_NV_UndefineSpace`. 2018-02-26 01:28:40 +01:00
David Garske 40c7a7b4b7 Added test for `TPM2_Sign`. 2018-02-24 23:47:15 -08:00
David Garske c560170ee6 Added tests for `TPM2_RSA_Encrypt` and `TPM2_RSA_Decrypt`. 2018-02-24 22:55:44 -08:00
David Garske ce759b416a Added tests for `TPM2_NV_DefineSpace` and `TPM2_NV_ReadPublic`. 2018-02-24 22:33:54 -08:00
David Garske 99afd8f0d5 Added way to set the auth resp using `TPM2_SetSessionAuth`. 2018-02-24 21:25:31 -08:00
David Garske 69eea6f034 Fixes for TPM2 commands expecting TPM_ST_SESSIONS. Added tests for TPM2_ReadPublic, TPM2_MakeCredential, TPM2_PolicyCommandCode, TPM2_ObjectChangeAuth. 2018-02-24 21:18:49 -08:00
David Garske 2d8e3b3eb7 Added TPM2_StirRandom, TPM2_PolicyRestart, TPM2_LoadExternal and TPM2_EvictControl. Fix for CC value typo. Updates to README.md. 2018-02-24 19:30:18 -08:00
David Garske b5533de7fb Working ECC and HMAC key gen. Working SHA256 example. FIxes for ECC public params. 2018-02-24 18:06:29 -08:00
David Garske ff1315892b Added some hashing tests. Fixes for creating keys. 2018-02-24 12:54:42 -08:00
David Garske 986fd398b7 Progress with creating keys. Able to create storage (platform) and endorsement primary keys. Still working on creating ECC key. 2018-02-23 12:18:43 -08:00
David Garske 524ec381c2 More progress with creating ECC key. 2018-02-21 16:15:35 -08:00
David Garske 47e7bfdf50 More progress on creating an ECC key. 2018-02-20 20:10:39 -08:00
David Garske 6c901be08a Progress with creating an ECC key. 2018-02-19 16:35:03 -08:00
David Garske f4cd4028d5 Fixes for session auth information and getting CreatePrimary working. 2018-02-16 12:22:34 -08:00
David Garske e02518dc3e Added `TPM2_CreatePrimary` test. 2018-02-15 15:45:15 -08:00
David Garske 78876923cc Adds wrapper code. Adds tests for `TPM2_PolicyPCR` and `TPM2_FlushContext`. 2018-02-15 10:20:19 -08:00
David Garske e9ffa0b32a Added `TPM2_PolicyGetDigest` test. 2018-02-14 14:59:49 -08:00
David Garske 43b0682dd8 Fixes for proper handling of `TPMT_SYM_DEF` or `TPMT_SYM_DEF_OBJECT` when `TPM_ALG_NULL` (don't append keyBits and mode). Refactor of the param details and scheme. Refactor of the session information into TPM context. 2018-02-14 14:11:01 -08:00
David Garske 4cb379ae43 Progress on `TPM2_StartAuthSession`. Enhancements for debugging. 2018-02-09 11:39:50 -08:00
David Garske e726f145ca Fixes for the STM32 and Raspberry Pi demo platforms. 2018-02-08 14:52:59 -08: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 9036e7bdec Fixes for building TPM2 demo project. 2018-02-07 16:25:24 -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