This file is indexed.

/usr/include/tss/tss_structs.h is in libtspi-dev 0.3.7-2ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
/*++

TSS structures for TSS

*/

#ifndef __TSS_STRUCTS_H__
#define __TSS_STRUCTS_H__

#include <tss/platform.h>
#include <tss/tss_typedef.h>
#include <tss/tpm.h>

typedef struct tdTSS_VERSION 
{
    BYTE   bMajor;
    BYTE   bMinor;
    BYTE   bRevMajor;
    BYTE   bRevMinor;
} TSS_VERSION;

typedef struct tdTSS_PCR_EVENT 
{
    TSS_VERSION   versionInfo;
    UINT32        ulPcrIndex;
    TSS_EVENTTYPE eventType;
    UINT32        ulPcrValueLength;
#ifdef __midl
    [size_is(ulPcrValueLength)] 
#endif
    BYTE*         rgbPcrValue;
    UINT32        ulEventLength;
#ifdef __midl
    [size_is(ulEventLength)] 
#endif 
    BYTE*         rgbEvent;
} TSS_PCR_EVENT;


typedef struct tdTSS_EVENT_CERT
{
    TSS_VERSION       versionInfo;
    UINT32    ulCertificateHashLength;
#ifdef __midl
    [size_is(ulCertificateHashLength)] 
#endif
    BYTE*     rgbCertificateHash;
    UINT32    ulEntityDigestLength;
#ifdef __midl
    [size_is(ulEntityDigestLength)] 
#endif
    BYTE*     rgbentityDigest;
    TSS_BOOL  fDigestChecked;
    TSS_BOOL  fDigestVerified;
    UINT32    ulIssuerLength;
#ifdef __midl
    [size_is(ulIssuerLength)]
#endif
    BYTE*     rgbIssuer;
} TSS_EVENT_CERT;

typedef struct tdTSS_UUID 
{
    UINT32  ulTimeLow;
    UINT16  usTimeMid;
    UINT16  usTimeHigh;
    BYTE   bClockSeqHigh;
    BYTE   bClockSeqLow;
    BYTE   rgbNode[6];
} TSS_UUID;

typedef struct tdTSS_KM_KEYINFO 
{
    TSS_VERSION  versionInfo;
    TSS_UUID     keyUUID;
    TSS_UUID     parentKeyUUID;
    BYTE         bAuthDataUsage;   // whether auth is needed to load child keys
    TSS_BOOL     fIsLoaded;           // TRUE: actually loaded in TPM
    UINT32       ulVendorDataLength;  // may be 0
#ifdef __midl
    [size_is(ulVendorDataLength)]
#endif
    BYTE        *rgbVendorData;       // may be NULL
} TSS_KM_KEYINFO;


typedef struct tdTSS_KM_KEYINFO2
{
    TSS_VERSION  versionInfo;
    TSS_UUID     keyUUID;
    TSS_UUID     parentKeyUUID;
    BYTE         bAuthDataUsage;   // whether auth is needed to load child keys
    TSS_FLAG     persistentStorageType;
    TSS_FLAG     persistentStorageTypeParent;
    TSS_BOOL     fIsLoaded;           // TRUE: actually loaded in TPM
    UINT32       ulVendorDataLength;  // may be 0
#ifdef __midl
    [size_is(ulVendorDataLength)]
#endif
    BYTE        *rgbVendorData;       // may be NULL
} TSS_KM_KEYINFO2;


typedef struct tdTSS_NONCE
{
    BYTE  nonce[TPM_SHA1BASED_NONCE_LEN];
} TSS_NONCE;


typedef struct tdTSS_VALIDATION
{ 
    TSS_VERSION  versionInfo;
    UINT32       ulExternalDataLength;
#ifdef __midl
    [size_is(ulExternalDataLength)]
#endif
    BYTE*        rgbExternalData;
    UINT32       ulDataLength;
#ifdef __midl
    [size_is(ulDataLength)]
#endif
    BYTE*     rgbData;
    UINT32    ulValidationDataLength;
#ifdef __midl
    [size_is(ulValidationDataLength)]
#endif
    BYTE*     rgbValidationData;
} TSS_VALIDATION;


typedef struct tdTSS_CALLBACK
{
    PVOID            callback;
    PVOID            appData;
    TSS_ALGORITHM_ID alg;
} TSS_CALLBACK;


typedef struct tdTSS_DAA_PK
{
    TSS_VERSION versionInfo;
    UINT32      modulusLength;
#ifdef __midl
    [size_is(modulusLength)] 
#endif
    BYTE*       modulus;
    UINT32      capitalSLength;
#ifdef __midl
    [size_is(capitalSLength)] 
#endif
    BYTE*       capitalS;
    UINT32      capitalZLength;
#ifdef __midl
    [size_is(capitalZLength)] 
#endif
    BYTE*       capitalZ;
    UINT32      capitalR0Length;
#ifdef __midl
    [size_is(capitalR0Length)] 
#endif
    BYTE*       capitalR0;
    UINT32      capitalR1Length;
#ifdef __midl
    [size_is(capitalR1Length)] 
#endif
    BYTE*       capitalR1;
    UINT32      gammaLength;
#ifdef __midl
    [size_is(gammaLength)] 
#endif
    BYTE*       gamma;
    UINT32      capitalGammaLength;
#ifdef __midl
    [size_is(capitalGammaLength)] 
#endif
    BYTE*       capitalGamma;
    UINT32      rhoLength;
#ifdef __midl
    [size_is(rhoLength)] 
#endif
    BYTE*       rho;
    UINT32      capitalYLength;         // Length of first dimenstion
    UINT32      capitalYLength2;        // Length of second dimension
#ifdef __midl
    [size_is(capitalYLength,capitalYLength2)] 
#endif
    BYTE**      capitalY;
    UINT32      capitalYPlatformLength;
    UINT32      issuerBaseNameLength;
#ifdef __midl
    [size_is(issuerBaseName)] 
#endif
    BYTE*       issuerBaseName;
    UINT32      numPlatformAttributes;
    UINT32      numIssuerAttributes;
} TSS_DAA_PK;

typedef struct tdTSS_DAA_PK_PROOF
{
    TSS_VERSION versionInfo;
    UINT32      challengeLength;
#ifdef __midl
    [size_is(challengeLength)] 
#endif
    BYTE*       challenge;
    UINT32      responseLength;         // Length of first dimension
    UINT32      responseLength2;        // Length of second dimension
#ifdef __midl
    [size_is(responseLength,responseLength2)] 
#endif
    BYTE**      response;
} TSS_DAA_PK_PROOF;

typedef struct tdTSS_DAA_SK
{
    TSS_VERSION versionInfo;
    UINT32      productPQprimeLength;
#ifdef __midl
    [size_is(productPQprimeLength)] 
#endif
    BYTE*       productPQprime;
} TSS_DAA_SK;


typedef struct tdTSS_DAA_KEY_PAIR
{
    TSS_VERSION versionInfo;
    TSS_DAA_SK  secretKey;
    TSS_DAA_PK  publicKey;
} TSS_DAA_KEY_PAIR;

typedef struct tdTSS_DAA_AR_PK
{
    TSS_VERSION versionInfo;
    UINT32      etaLength;
#ifdef __midl
    [size_is(etaLength)] 
#endif
    BYTE*       eta;
    UINT32      lambda1Length;
#ifdef __midl
    [size_is(lambda1Length)] 
#endif
    BYTE*       lambda1;
    UINT32      lambda2Length;
#ifdef __midl
    [size_is(lambda2Length)] 
#endif
    BYTE*       lambda2;
    UINT32      lambda3Length;
#ifdef __midl
    [size_is(lambda3Length)] 
#endif
    BYTE*       lambda3;
} TSS_DAA_AR_PK;

typedef struct tdTSS_DAA_AR_SK
{
    TSS_VERSION versionInfo;
    UINT32      x0Length;
#ifdef __midl
    [size_is(x0Length)] 
#endif
    BYTE*       x0;
    UINT32      x1Length;
#ifdef __midl
    [size_is(x1Length)] 
#endif
    BYTE*       x1;
    UINT32      x2Length;
#ifdef __midl
    [size_is(x2Length)] 
#endif
    BYTE*       x2;
    UINT32      x3Length;
#ifdef __midl
    [size_is(x3Length)] 
#endif
    BYTE*       x3;
    UINT32      x4Length;
#ifdef __midl
    [size_is(x4Length)] 
#endif
    BYTE*       x4;
    UINT32      x5Length;
#ifdef __midl
    [size_is(x5Length)] 
#endif
    BYTE*       x5;
} TSS_DAA_AR_SK;

typedef struct tdTSS_DAA_AR_KEY_PAIR
{
    TSS_VERSION   versionInfo;
    TSS_DAA_AR_SK secretKey;
    TSS_DAA_AR_PK publicKey;
} TSS_DAA_AR_KEY_PAIR;

typedef struct tdTSS_DAA_CRED_ISSUER
{
    TSS_VERSION versionInfo;
    UINT32      capitalALength;
#ifdef __midl
    [size_is(capitalALength)] 
#endif
    BYTE*       capitalA;
    UINT32      eLength;
#ifdef __midl
    [size_is(eLength)] 
#endif
    BYTE*       e;
    UINT32      vPrimePrimeLength;
#ifdef __midl
    [size_is(vPrimePrimeLength)] 
#endif
    BYTE*       vPrimePrime;
    UINT32      attributesIssuerLength;         // Length of first dimension
    UINT32      attributesIssuerLength2;        // Length of second dimension
#ifdef __midl
    [size_is(attributesIssuerLength,attributesIssuerLength2)] 
#endif
    BYTE**      attributesIssuer;
    UINT32      cPrimeLength;
#ifdef __midl
    [size_is(cPrimeLength)] 
#endif
    BYTE*       cPrime;
    UINT32      sELength;
#ifdef __midl
    [size_is(sELength)] 
#endif
    BYTE*       sE;
} TSS_DAA_CRED_ISSUER;

typedef struct tdTSS_DAA_CREDENTIAL
{
    TSS_VERSION versionInfo;
    UINT32      capitalALength;
#ifdef __midl
    [size_is(capitalALength)] 
#endif
    BYTE*       capitalA;
    UINT32      exponentLength;
#ifdef __midl
    [size_is(exponentLength)] 
#endif
    BYTE*       exponent;
    UINT32      vBar0Length;
#ifdef __midl
    [size_is(vBar0Length)] 
#endif
    BYTE*       vBar0;
    UINT32      vBar1Length;
#ifdef __midl
    [size_is(vBar1Length)] 
#endif
    BYTE*       vBar1;
    UINT32      attributesLength;       // Length of first dimension
    UINT32      attributesLength2;      // Length of second dimension
#ifdef __midl
    [size_is(attributesLength,attributesLength2)] 
#endif
    BYTE**      attributes;
    TSS_DAA_PK  issuerPK;
    UINT32      tpmSpecificEncLength;
#ifdef __midl
    [size_is(tpmSpecificEncLength)]
#endif
    BYTE*       tpmSpecificEnc;
    UINT32      daaCounter;
} TSS_DAA_CREDENTIAL;

typedef struct tdTSS_DAA_ATTRIB_COMMIT
{
    TSS_VERSION versionInfo;
    UINT32      betaLength;
#ifdef __midl
    [size_is(betaLength)]
#endif
    BYTE*       beta;
    UINT32      sMuLength;
#ifdef __midl
    [size_is(sMuLength)]
#endif
    BYTE*       sMu;
} TSS_DAA_ATTRIB_COMMIT;

typedef struct tdTSS_DAA_CREDENTIAL_REQUEST
{
    TSS_VERSION versionInfo;
    UINT32      capitalULength;
#ifdef __midl
    [size_is(capitalULength)]
#endif
    BYTE*       capitalU;
    UINT32      capitalNiLength;
#ifdef __midl
    [size_is(capitalNiLength)]
#endif
    BYTE*       capitalNi;
    UINT32      authenticationProofLength;
#ifdef __midl
    [size_is(authenticationProofLength)]
#endif
    BYTE*       authenticationProof;
    UINT32      challengeLength;
#ifdef __midl
    [size_is(challengeLength)]
#endif
    BYTE*       challenge;
    UINT32      nonceTpmLength;
#ifdef __midl
    [size_is(nonceTpmLength)]
#endif
    BYTE*       nonceTpm;
    UINT32      noncePlatformLength;
#ifdef __midl
    [size_is(noncePlatformLength)]
#endif
    BYTE*       noncePlatform;
    UINT32      sF0Length;
#ifdef __midl
    [size_is(sF0Length)]
#endif
    BYTE*       sF0;
    UINT32      sF1Length;
#ifdef __midl
    [size_is(sF1Length)]
#endif
    BYTE*       sF1;
    UINT32      sVprimeLength;
#ifdef __midl
    [size_is(sVprimeLength)]
#endif
    BYTE*       sVprime;
    UINT32      sVtildePrimeLength;
#ifdef __midl
    [size_is(sVtildePrimeLength)]
#endif
    BYTE*       sVtildePrime;
    UINT32      sALength;       // Length of first dimension
    UINT32      sALength2;      // Length of second dimension
#ifdef __midl
    [size_is(sALength,sALength2)]
#endif
    BYTE**      sA;
    UINT32      attributeCommitmentsLength;
    TSS_DAA_ATTRIB_COMMIT* attributeCommitments;
} TSS_DAA_CREDENTIAL_REQUEST;

typedef struct tdTSS_DAA_SELECTED_ATTRIB
{
    TSS_VERSION versionInfo;
    UINT32      indicesListLength;
#ifdef __midl
    [size_is(indicesListLength)]
#endif
    TSS_BOOL*   indicesList;
} TSS_DAA_SELECTED_ATTRIB;

typedef struct tdTSS_DAA_PSEUDONYM
{
    TSS_VERSION versionInfo;
    TSS_FLAG    payloadFlag;
    UINT32      payloadLength;
#ifdef __midl
    [size_is(payloadLength)]
#endif
    BYTE*       payload;
} TSS_DAA_PSEUDONYM;

typedef struct tdTSS_DAA_PSEUDONYM_PLAIN
{
    TSS_VERSION versionInfo;
    UINT32      capitalNvLength;
#ifdef __midl
    [size_is(capitalNvLength)]
#endif
    BYTE*       capitalNv;
} TSS_DAA_PSEUDONYM_PLAIN;

typedef struct tdTSS_DAA_PSEUDONYM_ENCRYPTED
{
    TSS_VERSION versionInfo;
    UINT32      delta1Length;
#ifdef __midl
    [size_is(delta1Length)]
#endif
    BYTE*       delta1;
    UINT32      delta2Length;
#ifdef __midl
    [size_is(delta2Length)]
#endif
    BYTE*       delta2;
    UINT32      delta3Length;
#ifdef __midl
    [size_is(delta3Length)]
#endif
    BYTE*       delta3;
    UINT32      delta4Length;
#ifdef __midl
    [size_is(delta4Length)]
#endif
    BYTE*       delta4;
    UINT32      sTauLength;
#ifdef __midl
    [size_is(sTauLength)]
#endif
    BYTE*       sTau;
} TSS_DAA_PSEUDONYM_ENCRYPTED;

typedef struct tdTSS_DAA_SIGN_CALLBACK
{
    TSS_VERSION versionInfo;
    TSS_HHASH   challenge;
    TSS_FLAG    payloadFlag;
    UINT32      payloadLength;
#ifdef __midl
    [size_is(payloadLength)]
#endif
    BYTE*       payload;
} TSS_DAA_SIGN_CALLBACK;

typedef struct tdTSS_DAA_SIGNATURE
{
    TSS_VERSION            versionInfo;
    UINT32                 zetaLength;
#ifdef __midl
    [size_is(zetaLength)]
#endif
    BYTE*                  zeta;
    UINT32                 capitalTLength;
#ifdef __midl
    [size_is(capitalTLength)]
#endif
    BYTE*                  capitalT;
    UINT32                 challengeLength;
#ifdef __midl
    [size_is(challengeLength)]
#endif
    BYTE*                  challenge;
    UINT32                 nonceTpmLength;
#ifdef __midl
    [size_is(nonceTpmLength)]
#endif
    BYTE*                  nonceTpm;
    UINT32                 sVLength;
#ifdef __midl
    [size_is(sVLength)]
#endif
    BYTE*                  sV;
    UINT32                 sF0Length;
#ifdef __midl
    [size_is(sF0Length)]
#endif
    BYTE*                  sF0;
    UINT32                 sF1Length;
#ifdef __midl
    [size_is(sF1Length)]
#endif
    BYTE*                  sF1;
    UINT32                 sELength;
#ifdef __midl
    [size_is(sELength)]
#endif
    BYTE*                  sE;
    UINT32                 sALength;    // Length of first dimension
    UINT32                 sALength2;   // Length of second dimension
#ifdef __midl
    [size_is(sALength,sALength2)]
#endif
    BYTE**                 sA;
    UINT32                 attributeCommitmentsLength;
#ifdef __midl
    [size_is(attributeCommitmentsLength)]
#endif
    TSS_DAA_ATTRIB_COMMIT* attributeCommitments;
    TSS_DAA_PSEUDONYM      signedPseudonym;
    TSS_DAA_SIGN_CALLBACK  callbackResult;
} TSS_DAA_SIGNATURE;

typedef struct tdTSS_DAA_IDENTITY_PROOF
{
    TSS_VERSION versionInfo;
    UINT32      endorsementLength;
#ifdef __midl
    [size_is(endorsementLength)]
#endif
    BYTE*       endorsementCredential;
    UINT32      platformLength;
#ifdef __midl
    [size_is(platformLength)]
#endif
    BYTE*       platform;
    UINT32      conformanceLength;
#ifdef __midl
    [size_is(conformanceLength)]
#endif
    BYTE*       conformance;
} TSS_DAA_IDENTITY_PROOF;


////////////////////////////////////////////////////////////////////

typedef UINT32 TSS_FAMILY_ID;
typedef BYTE   TSS_DELEGATION_LABEL;
// Values are TSS_DELEGATIONTYPE_KEY or TSS_DELEGATIONTYPE_OWNER
typedef UINT32 TSS_DELEGATION_TYPE;

typedef struct tdTSS_PCR_INFO_SHORT
{
    UINT32               sizeOfSelect;
#ifdef __midl
    [size_is(sizeOfSelect)]
#endif
    BYTE                *selection;
    BYTE                 localityAtRelease;
    UINT32               sizeOfDigestAtRelease;
#ifdef __midl
    [size_is(sizeOfDigestAtRelease)]
#endif
    BYTE                *digestAtRelease;
} TSS_PCR_INFO_SHORT;

typedef struct tdTSS_FAMILY_TABLE_ENTRY
{
    TSS_FAMILY_ID        familyID;
    TSS_DELEGATION_LABEL label;
    UINT32               verificationCount;
    TSS_BOOL             enabled;
    TSS_BOOL             locked;
} TSS_FAMILY_TABLE_ENTRY;

typedef struct tdTSS_DELEGATION_TABLE_ENTRY
{
    UINT32               tableIndex;
    TSS_DELEGATION_LABEL label;
    TSS_PCR_INFO_SHORT   pcrInfo;
    UINT32               per1;
    UINT32               per2;
    TSS_FAMILY_ID        familyID;
    UINT32               verificationCount;
} TSS_DELEGATION_TABLE_ENTRY;

typedef struct tdTSS_PLATFORM_CLASS
{
    UINT32 platformClassSimpleIdentifier;
    UINT32 platformClassURISize;
    BYTE*  pPlatformClassURI;
} TSS_PLATFORM_CLASS;

#endif // __TSS_STRUCTS_H__