~ubuntu-branches/ubuntu/hardy/trousers/hardy-proposed

« back to all changes in this revision

Viewing changes to src/include/tss/tcpa_defines.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-01-23 22:03:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080123220300-fhtqja3c0oq0gp6z
Tags: 0.3.1-4
* Added patch from Aaron M. Ucko <ucko@debian.org> to allow trousers to
  build successfully on amd64, and presumably also other 64-bit
  architectures (Closes: #457400).
* Including udev rule for /dev/tpm from William Lima
  <wlima.amadeus@gmail.com> as suggested by David Smith <dds@google.com>
  (Closes: #459682).
* Added lintian overrides.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*++
2
 
 
3
 
  TMP defines basically extracted from TCPA Main Specification V1.1
4
 
 
5
 
  --*/
6
 
 
7
 
#ifndef __TCPA_DEFINES_H__
8
 
#define __TCPA_DEFINES_H__
9
 
 
10
 
 
11
 
//////////////////////////////////////////////////////////////////////
12
 
// Parameter List Tag Identifiers
13
 
// A command with no authentication
14
 
#define TPM_TAG_RQU_COMMAND        (UINT16)(0x00C1)
15
 
 
16
 
// An authenticated command with one authentication handle
17
 
#define TPM_TAG_RQU_AUTH1_COMMAND  (UINT16)(0x00C2)
18
 
 
19
 
//An authenticated command with two authentication handles
20
 
#define TPM_TAG_RQU_AUTH2_COMMAND  (UINT16)(0x00C3)
21
 
 
22
 
// A response from a command with no authentication
23
 
#define TPM_TAG_RSP_COMMAND        (UINT16)(0x00C4)
24
 
 
25
 
// An authenticated response with one authentication handle
26
 
#define TPM_TAG_RSP_AUTH1_COMMAND  (UINT16)(0x00C5)
27
 
 
28
 
// An authenticated response with two authentication handles
29
 
#define TPM_TAG_RSP_AUTH2_COMMAND  (UINT16)(0x00C6)
30
 
 
31
 
//////////////////////////////////////////////////////////////////////
32
 
// vendor specific
33
 
//
34
 
#define TCPA_Vendor_Specific32  0x00000400
35
 
#define TCPA_Vendor_Specific8   0x80
36
 
 
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)
45
 
 
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)
50
 
 
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
58
 
 
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)
66
 
 
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)
72
 
 
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)
80
 
 
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)
89
 
 
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
98
 
 
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)
109
 
 
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)
116
 
 
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)
123
 
 
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
128
 
 
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)
132
 
 
133
 
//////////////////////////////////////////////////////////////////////
134
 
// section 8.5 - TPM_SIG_SCHEME values
135
 
// For TCPA_ALG_RSA
136
 
#define TCPA_SS_NONE                 (UINT16)(0x0001)
137
 
#define TCPA_SS_RSASSAPKCS1v15_SHA1  (UINT16)(0x0002)
138
 
#define TCPA_SS_RSASSAPKCS1v15_DER   (UINT16)(0x0003)
139
 
 
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)
145
 
 
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)
151
 
 
152
 
// without any TPM_ like in Main Spec, strange
153
 
#define redirection    (UINT32)(0x00000001)
154
 
#define migratable     (UINT32)(0x00000002)
155
 
#define volatileKey    (UINT32)(0x00000004)
156
 
 
157
 
// empty defines Errata: What are these for?
158
 
#define AUTH  // paramDigest of HMAC1/HMAC2
159
 
#define HMAC1
160
 
#define HMAC2
161
 
 
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
166
 
 
167
 
#endif // __TCPA_DEFINES_H__
168
 
 
 
1
 
 
2
#ifndef __TCPA_DEFINES_H__
 
3
#define __TCPA_DEFINES_H__
 
4
 
 
5
#warning including deprecated header file tcpa_defines.h
 
6
 
 
7
#endif