3
TMP defines basically extracted from TCPA Main Specification V1.1
7
#ifndef __TCPA_DEFINES_H__
8
#define __TCPA_DEFINES_H__
11
//////////////////////////////////////////////////////////////////////
12
// Parameter List Tag Identifiers
13
// A command with no authentication
14
#define TPM_TAG_RQU_COMMAND (UINT16)(0x00C1)
16
// An authenticated command with one authentication handle
17
#define TPM_TAG_RQU_AUTH1_COMMAND (UINT16)(0x00C2)
19
//An authenticated command with two authentication handles
20
#define TPM_TAG_RQU_AUTH2_COMMAND (UINT16)(0x00C3)
22
// A response from a command with no authentication
23
#define TPM_TAG_RSP_COMMAND (UINT16)(0x00C4)
25
// An authenticated response with one authentication handle
26
#define TPM_TAG_RSP_AUTH1_COMMAND (UINT16)(0x00C5)
28
// An authenticated response with two authentication handles
29
#define TPM_TAG_RSP_AUTH2_COMMAND (UINT16)(0x00C6)
31
//////////////////////////////////////////////////////////////////////
34
#define TCPA_Vendor_Specific32 0x00000400
35
#define TCPA_Vendor_Specific8 0x80
37
//////////////////////////////////////////////////////////////////////
38
// section 4.10 - key usage values - TPM_KEY_USAGE
39
#define TPM_KEY_SIGNING (UINT16)(0x0010)
40
#define TPM_KEY_STORAGE (UINT16)(0x0011)
41
#define TPM_KEY_IDENTITY (UINT16)(0x0012)
42
#define TPM_KEY_AUTHCHANGE (UINT16)(0x0013)
43
#define TPM_KEY_BIND (UINT16)(0x0014)
44
#define TPM_KEY_LEGACY (UINT16)(0x0015)
46
//////////////////////////////////////////////////////////////////////
47
// section 4.11 - auth data usage values - TPM_AUTH_DATA_USAGE
48
#define TPM_AUTH_NEVER (BYTE)(0x00)
49
#define TPM_AUTH_ALWAYS (BYTE)(0x01)
51
//////////////////////////////////////////////////////////////////////
52
// section 4.14 - payload type values - TPM_PAYLOAD_TYPE
53
#define TCPA_PT_ASYM 0x01
54
#define TCPA_PT_BIND 0x02
55
#define TCPA_PT_MIGRATE 0x03
56
#define TCPA_PT_MAINT 0x04
57
#define TCPA_PT_SEAL 0x05
59
//////////////////////////////////////////////////////////////////////
60
// section 4.15 - TPM_ENTITY_TYPE values
61
#define TCPA_ET_KEYHANDLE (UINT16)(0x0001)
62
#define TCPA_ET_OWNER (UINT16)(0x0002)
63
#define TCPA_ET_DATA (UINT16)(0x0003)
64
#define TCPA_ET_SRK (UINT16)(0x0004)
65
#define TCPA_ET_KEY (UINT16)(0x0005)
67
// The entity type TPM_ET_OWNER and TPM_ET_SRK are associated with
68
// specific key handles
69
// Errata: Not in spec
70
#define TPM_KEYHND_OWNER (0x40000001)
71
#define TPM_KEYHND_SRK (0x40000000)
73
//////////////////////////////////////////////////////////////////////
74
// section 4.17 - TPM_PROTOCOL_ID values
75
#define TCPA_PID_OIAP (UINT16)(0x0001)
76
#define TCPA_PID_OSAP (UINT16)(0x0002)
77
#define TCPA_PID_ADIP (UINT16)(0x0003)
78
#define TCPA_PID_ADCP (UINT16)(0x0004)
79
#define TCPA_PID_OWNER (UINT16)(0x0005)
81
//////////////////////////////////////////////////////////////////////
82
// section 4.18 - algorithm identifiers
83
#define TCPA_ALG_RSA (UINT32)(0x00000001)
84
#define TCPA_ALG_DES (UINT32)(0x00000002)
85
#define TCPA_ALG_3DES (UINT32)(0x00000003)
86
#define TCPA_ALG_SHA (UINT32)(0x00000004)
87
#define TCPA_ALG_HMAC (UINT32)(0x00000005)
88
#define TCPA_ALG_AES (UINT32)(0x00000006)
90
//////////////////////////////////////////////////////////////////////
91
// section 4.19 - TPM_PHYSICAL_PRESENCE values
92
#define TCPA_PHYSICAL_PRESENCE_LIFETIME_LOCK 0x0080
93
#define TCPA_PHYSICAL_PRESENCE_HW_ENABLE 0x0040
94
#define TCPA_PHYSICAL_PRESENCE_CMD_ENABLE 0x0020
95
#define TCPA_PHYSICAL_PRESENCE_NOTPRESENT 0x0010
96
#define TCPA_PHYSICAL_PRESENCE_PRESENT 0x0008
97
#define TCPA_PHYSICAL_PRESENCE_LOCK 0x0004
99
//////////////////////////////////////////////////////////////////////
100
// section 4.31 - capability identifiers
101
#define TCPA_CAP_ORD (UINT32)(0x00000001)
102
#define TCPA_CAP_ALG (UINT32)(0x00000002)
103
#define TCPA_CAP_PID (UINT32)(0x00000003)
104
#define TCPA_CAP_FLAG (UINT32)(0x00000004)
105
#define TCPA_CAP_PROPERTY (UINT32)(0x00000005)
106
#define TCPA_CAP_VERSION (UINT32)(0x00000006)
107
#define TCPA_CAP_KEY_HANDLE (UINT32)(0x00000007)
108
#define TCPA_CAP_CHECK_LOADED (UINT32)(0x00000008)
110
//////////////////////////////////////////////////////////////////////
111
// section 8.11.1 - IDL Definitions of subCap
112
#define TPM_CAP_PROP_PCR (UINT32)(0x00000101)
113
#define TPM_CAP_PROP_DIR (UINT32)(0x00000102)
114
#define TPM_CAP_PROP_MANUFACTURER (UINT32)(0x00000103)
115
#define TPM_CAP_PROP_SLOTS (UINT32)(0x00000104)
117
//////////////////////////////////////////////////////////////////////
118
// section 4.33 - command ordinals
119
#define TCPA_PROTECTED_COMMAND (UINT32)(0x00000000)
120
#define TCPA_UNPROTECTED_COMMAND (UINT32)(0x80000000)
121
#define TCPA_CONNECTION_COMMAND (UINT32)(0x40000000)
122
#define TCPA_VENDOR_COMMAND (UINT32)(0x20000000)
124
#define TCPA_MAIN (UINT16)(0x0000) // Command is from the main specification
125
#define TCPA_PC (UINT16)(0x0001) // Command is specific to the PC
126
#define TCPA_PDA (UINT16)(0x0002) // Command is specific to a PDA
127
#define TCPA_CELL_PHONE (UINT16)(0x0003) // Command is specific to a cell phone
129
#define TCPA_PROTECTED_ORDINAL (TCPA_PROTECTED_COMMAND | TCPA_MAIN)
130
#define TCPA_UNPROTECTED_ORDINAL (TCPA_UNPROTECTED_COMMAND | TCPA_MAIN)
131
#define TCPA_CONNECTION_ORDINAL (TCPA_CONNECTION_COMMAND | TCPA_MAIN)
133
//////////////////////////////////////////////////////////////////////
134
// section 8.5 - TPM_SIG_SCHEME values
136
#define TCPA_SS_NONE (UINT16)(0x0001)
137
#define TCPA_SS_RSASSAPKCS1v15_SHA1 (UINT16)(0x0002)
138
#define TCPA_SS_RSASSAPKCS1v15_DER (UINT16)(0x0003)
140
//////////////////////////////////////////////////////////////////////
141
// section 8.4 - TPM_ENC_SCHEME values
142
#define TCPA_ES_NONE (UINT16)(0x0001)
143
#define TCPA_ES_RSAESPKCSv15 (UINT16)(0x0002)
144
#define TCPA_ES_RSAESOAEP_SHA1_MGF1 (UINT16)(0x0003)
146
//////////////////////////////////////////////////////////////////////
147
// section 4.22 - TPM_MIGRATE_SCHEME values
148
#define TCPA_MS_MIGRATE (UINT16)(0x0001)
149
#define TCPA_MS_REWRAP (UINT16)(0x0002)
150
#define TCPA_MS_MAINT (UINT16)(0x0003)
152
// without any TPM_ like in Main Spec, strange
153
#define redirection (UINT32)(0x00000001)
154
#define migratable (UINT32)(0x00000002)
155
#define volatileKey (UINT32)(0x00000004)
157
// empty defines Errata: What are these for?
158
#define AUTH // paramDigest of HMAC1/HMAC2
162
// byte size definition for 160Bit SHA1 hash value
163
// Errata: Add these to Main Spec
164
#define TCPA_SHA1_160_HASH_LEN 0x14
165
#define TCPA_SHA1BASED_NONCE_LEN TCPA_SHA1_160_HASH_LEN
167
#endif // __TCPA_DEFINES_H__
2
#ifndef __TCPA_DEFINES_H__
3
#define __TCPA_DEFINES_H__
5
#warning including deprecated header file tcpa_defines.h