Skip to content

Commit dc2b91d

Browse files
committed
Fixes for latest ST33KTPM IAK/IDevID provisioning. Added documentation for build options.
1 parent fb7e321 commit dc2b91d

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,14 @@ Connection: close
822822
</html>
823823
```
824824

825+
## Device Identity and Attestation Keys
826+
827+
The TCG published a specification for TPM manufacture guidance on setting up keys that can be used for device identiy and attestation.
828+
829+
This feature has been tested with the ST33KTPM and is enabled with `WOLFTPM_MFG_IDENTITY`. The ST33KTPM samples are provisioned with a default master password enabled with `TEST_SAMPLE`. To define your own master password use `TPM2_IAK_SAMPLE_MASTER_PASSWORD`. The master password is hashed along with the device serial number to produce authentication for accessing these keys.
830+
831+
The default keys are ECDSA SECP384R1 with SHA2-384 and stored in NV Index defined by `TPM2_IAK_KEY_HANDLE`, `TPM2_IAK_CERT_HANDLE`, `TPM2_IDEVID_KEY_HANDLE` and `TPM2_IDEVID_CERT_HANDLE`.
832+
825833

826834
## Todo
827835

wolftpm/tpm2_wrap.h

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3718,16 +3718,27 @@ WOLFTPM_API int wolfTPM2_PolicyAuthValue(WOLFTPM2_DEV* dev,
37183718

37193719

37203720

3721-
/* pre-provisioned IAK and IDevID key/cert from TPM vendor */
3721+
/* Pre-provisioned IAK and IDevID key/cert from TPM vendor */
3722+
/* Tested with ST33KTPM devices */
3723+
/* Default assumes: ECDSA SECP384R1, SHA2-384 */
37223724
#ifdef WOLFTPM_MFG_IDENTITY
37233725

3724-
/* Initial attestation key (IAK) and an initial device ID (IDevID) */
3725-
/* Default is: ECDSA SECP384P1, SHA2-384 */
3726-
#define TPM2_IAK_KEY_HANDLE 0x81080000
3727-
#define TPM2_IAK_CERT_HANDLE 0x1C20100
3728-
3729-
#define TPM2_IDEVID_KEY_HANDLE 0x81080001
3730-
#define TPM2_IDEVID_CERT_HANDLE 0x1C20101
3726+
/* Initial Attestation Key (IAK):
3727+
* Restrictive: Can only sign data generated by the TPM like a TPM2_Quote */
3728+
#ifndef TPM2_IAK_KEY_HANDLE
3729+
#define TPM2_IAK_KEY_HANDLE 0x81020001
3730+
#endif
3731+
#ifndef TPM2_IAK_CERT_HANDLE
3732+
#define TPM2_IAK_CERT_HANDLE 0x1C90100
3733+
#endif
3734+
/* Initial Device ID (IDevID):
3735+
* Non-Restrictive: Can sign external data */
3736+
#ifndef TPM2_IDEVID_KEY_HANDLE
3737+
#define TPM2_IDEVID_KEY_HANDLE 0x81020000
3738+
#endif
3739+
#ifndef TPM2_IDEVID_CERT_HANDLE
3740+
#define TPM2_IDEVID_CERT_HANDLE 0x1C90200
3741+
#endif
37313742

37323743
WOLFTPM_API int wolfTPM2_SetIdentityAuth(WOLFTPM2_DEV* dev, WOLFTPM2_HANDLE* handle,
37333744
uint8_t* masterPassword, uint16_t masterPasswordSz);

0 commit comments

Comments
 (0)