File: ibmtss.html

package info (click to toggle)
tss2 1045-3
  • links: PTS
  • area: main
  • in suites: sid
  • size: 6,868 kB
  • sloc: ansic: 58,589; sh: 5,124; php: 1,247; makefile: 380; cpp: 23
file content (2109 lines) | stat: -rw-r--r-- 100,318 bytes parent folder | download | duplicates (3)
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
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
	<title>IBM TSS</title>
	<meta name="generator" content="LibreOffice 4.2.8.2 (Linux)">
	<meta name="author" content="Ken Goldman">
	<meta name="created" content="20151120;123500000000000">
	<meta name="changedby" content="Ken Goldman">
	<meta name="changed" content="20170629;170700000000000">
	<style type="text/css">
	<!--
		@page { size: 8.5in 11in; margin-right: 1.25in; margin-top: 1in; margin-bottom: 0.5in }
		p { margin-bottom: 0.08in; direction: ltr; color: #000000; widows: 2; orphans: 2 }
		p.western { font-family: "Times New Roman", serif; font-size: 12pt; so-language: en-US }
		p.cjk { font-family: "Times New Roman", serif; font-size: 12pt }
		p.ctl { font-family: "Times New Roman", serif; font-size: 12pt; so-language: ar-SA }
		h1 { margin-bottom: 0.04in; direction: ltr; color: #000000; widows: 2; orphans: 2 }
		h1.western { font-family: "Arial", sans-serif; font-size: 16pt; so-language: en-US }
		h1.cjk { font-family: "Times New Roman", serif; font-size: 16pt }
		h1.ctl { font-family: "Arial", sans-serif; font-size: 16pt; so-language: ar-SA }
		h2 { margin-top: 0.17in; margin-bottom: 0.04in; direction: ltr; color: #000000; widows: 2; orphans: 2 }
		h2.western { font-family: "Arial", sans-serif; font-size: 14pt; so-language: en-US }
		h2.cjk { font-family: "Times New Roman", serif; font-size: 14pt }
		h2.ctl { font-family: "Arial", sans-serif; font-size: 14pt; so-language: ar-SA; font-style: italic }
		h3 { margin-top: 0.17in; margin-bottom: 0.04in; direction: ltr; color: #000000; widows: 2; orphans: 2 }
		h3.western { font-family: "Cambria", serif; font-size: 13pt; so-language: en-US }
		h3.cjk { font-family: "Times New Roman", serif; font-size: 13pt }
		h3.ctl { font-family: "Cambria", serif; font-size: 13pt; so-language: ar-SA }
		h4 { margin-top: 0.17in; margin-bottom: 0.04in; direction: ltr; color: #000000; widows: 2; orphans: 2 }
		h4.western { font-family: "Calibri", sans-serif; font-size: 14pt; so-language: en-US }
		h4.cjk { font-family: "Times New Roman", serif; font-size: 14pt }
		h4.ctl { font-family: "Times New Roman", serif; font-size: 14pt; so-language: ar-SA }
		a:link { color: #0000ff }
		a.western:link { so-language: en-US }
		a.cjk:link { so-language: en-US }
		a:visited { color: #800080 }
		a.western:visited { so-language: en-US }
		a.cjk:visited { so-language: zh-CN }
		a.ctl:visited { so-language: hi-IN }
	-->
	</style>
</head>
<body lang="en-US" text="#000000" link="#0000ff" vlink="#800080" bgcolor="#ffffff" dir="ltr" style="background: #ffffff">
<p lang="da-DK" align="center" style="margin-left: 0.17in; margin-bottom: 0in">
<br>
</p>
<p align="center" style="margin-top: 0.14in; margin-bottom: 0.33in"><font face="Arial, sans-serif"><font size="6" style="font-size: 24pt">IBM
TPM 2.0 TSS API</font></font></p>
<p align="center" style="margin-top: 0.14in; margin-bottom: 0.33in"><font face="Arial, sans-serif"><font size="6" style="font-size: 24pt">Ken
Goldman</font></font></p>
<p align="center" style="margin-top: 0.14in; margin-bottom: 0.33in"><font face="Arial, sans-serif"><font size="6" style="font-size: 24pt">IBM
Research</font></font></p>
<p align="center" style="margin-top: 0.14in; margin-bottom: 0.33in"><font face="Arial, sans-serif"><font size="6" style="font-size: 24pt">kgoldman@us.ibm.com</font></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" align="center" style="margin-bottom: 0in"><font size="5" style="font-size: 20pt">June
29, 2017</font></p>
<p lang="da-DK" class="western" align="center" style="margin-bottom: 0in">
<br>
</p>
<p lang="da-DK" align="center" style="margin-left: 0.17in; margin-bottom: 0in; page-break-before: always">
<br>
</p>
<p lang="da-DK" align="center" style="margin-left: 0.17in; margin-bottom: 0in">
<br>
</p>
<div id="Table of Contents1" dir="ltr">
	<p lang="da-DK" align="center" style="margin-left: 0.17in; margin-bottom: 0in">
	<font size="4" style="font-size: 15pt"><b><a class="western" href="#__RefHeading___Toc485736479">1.</a></b><font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US"><span style="font-weight: normal"><a class="western" href="#__RefHeading___Toc485736479">	</a></span></span></font></font><a class="western" href="#__RefHeading___Toc485736479"><b>Introduction<span lang="en-US">	4</span></b></a></font></p>
	<p lang="da-DK" align="center" style="margin-left: 0.17in; margin-bottom: 0in">
	<font size="4" style="font-size: 15pt"><b><a class="western" href="#__RefHeading___Toc485736480">2.</a></b><font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US"><span style="font-weight: normal"><a class="western" href="#__RefHeading___Toc485736480">	</a></span></span></font></font><a class="western" href="#__RefHeading___Toc485736480"><b>Features<span lang="en-US">	5</span></b></a></font></p>
	<p lang="da-DK" align="center" style="margin-left: 0.17in; margin-bottom: 0in">
	<font size="4" style="font-size: 15pt"><b><a class="western" href="#__RefHeading___Toc485736481">3.</a></b><font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US"><span style="font-weight: normal"><a class="western" href="#__RefHeading___Toc485736481">	</a></span></span></font></font><a class="western" href="#__RefHeading___Toc485736481"><b>API<span lang="en-US">	6</span></b></a></font></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736482">3.1.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>TSS_Execute()<span lang="en-US">	6</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736483">3.2.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>TSS_Create()<span lang="en-US">	6</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736484">3.3.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>TSS_Delete()<span lang="en-US">	7</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736485">3.4.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Optional
	Customization<span lang="en-US">	8</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736486">3.4.1.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Property
	Example<span lang="en-US">	8</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736487">3.4.2.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Properties<span lang="en-US">	8</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736488">3.4.3.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>TSS_SetProperty()<span lang="en-US">	11</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736489">3.5.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Extra
	Parameter<span lang="en-US">	12</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736490">3.6.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Other
	APIs and Headers<span lang="en-US">	12</span></a></p>
	<p lang="da-DK" align="center" style="margin-left: 0.17in; margin-bottom: 0in">
	<font size="4" style="font-size: 15pt"><b><a class="western" href="#__RefHeading___Toc485736491">4.</a></b><font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US"><span style="font-weight: normal"><a class="western" href="#__RefHeading___Toc485736491">	</a></span></span></font></font><a class="western" href="#__RefHeading___Toc485736491"><b>Application
	Notes<span lang="en-US">	14</span></b></a></font></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736492">4.1.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>TPM
	Simulator<span lang="en-US">	14</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736493">4.2.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Parameter
	Encryption<span lang="en-US">	14</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736494">4.3.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Session
	Salt<span lang="en-US">	14</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736495">4.4.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Session
	Bind<span lang="en-US">	14</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736496">4.5.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>NV<span lang="en-US">	15</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736497">4.5.1.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Rationale<span lang="en-US">	15</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736498">4.5.2.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>NV
	Preprovisioning<span lang="en-US">	16</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736499">4.6.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>TPM2_LoadExternal<span lang="en-US">	16</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736500">4.7.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Connecting
	to Resource Managers<span lang="en-US">	16</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736501">4.8.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Endorsement
	Key (EK Certificates)<span lang="en-US">	17</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736502">4.8.1.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Nuvoton<span lang="en-US">	17</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736503">4.8.2.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>St
	Micro<span lang="en-US">	17</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736504">4.8.3.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Infineon<span lang="en-US">	18</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736505">4.8.4.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>NationZ<span lang="en-US">	19</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736506">4.8.5.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Intel<span lang="en-US">	19</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736507">4.8.5.1.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Intel
	EK Certificate Download<span lang="en-US">	19</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736508">4.9.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Command
	Line Utilities<span lang="en-US">	20</span></a></p>
	<p lang="da-DK" align="center" style="margin-left: 0.17in; margin-bottom: 0in">
	<font size="4" style="font-size: 15pt"><b><a class="western" href="#__RefHeading___Toc485736509">5.</a></b><font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US"><span style="font-weight: normal"><a class="western" href="#__RefHeading___Toc485736509">	</a></span></span></font></font><a class="western" href="#__RefHeading___Toc485736509"><b>Example<span lang="en-US">	21</span></b></a></font></p>
	<p lang="da-DK" align="center" style="margin-left: 0.17in; margin-bottom: 0in">
	<font size="4" style="font-size: 15pt"><b><a class="western" href="#__RefHeading___Toc485736510">6.</a></b><font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US"><span style="font-weight: normal"><a class="western" href="#__RefHeading___Toc485736510">	</a></span></span></font></font><a class="western" href="#__RefHeading___Toc485736510"><b>Build<span lang="en-US">	22</span></b></a></font></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736511">6.1.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Directories<span lang="en-US">	22</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736512">6.2.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Linux<span lang="en-US">	22</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736513">6.3.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Windows<span lang="en-US">	23</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736514">6.3.1.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Windows
	Tbsi<span lang="en-US">	24</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736515">6.3.2.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Windows
	Visual Studio<span lang="en-US">	25</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736516">6.3.3.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Windows
	gcc<span lang="en-US">	25</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736517">6.4.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>AIX<span lang="en-US">	25</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736518">6.5.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Minimal
	TSS Library Builds<span lang="en-US">	26</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736519">6.5.1.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>TPM_TSS_NOFILE<span lang="en-US">	26</span></a></p>
	<p style="margin-left: 0.33in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736520">6.5.2.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>TPM_TSS_NOCRYPTO<span lang="en-US">	26</span></a></p>
	<p lang="da-DK" align="center" style="margin-left: 0.17in; margin-bottom: 0in">
	<font size="4" style="font-size: 15pt"><b><a class="western" href="#__RefHeading___Toc485736521">7.</a></b><font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US"><span style="font-weight: normal"><a class="western" href="#__RefHeading___Toc485736521">	</a></span></span></font></font><a class="western" href="#__RefHeading___Toc485736521"><b>Fedora<span lang="en-US">	27</span></b></a></font></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736522">7.1.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Local
	Install<span lang="en-US">	27</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736523">7.2.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Alternative
	Local Install<span lang="en-US">	27</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736524">7.3.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Repository
	Install<span lang="en-US">	28</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736525">7.4.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Install
	Test<span lang="en-US">	28</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736526">7.5.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Source
	rpms<span lang="en-US">	28</span></a></p>
	<p lang="da-DK" align="center" style="margin-left: 0.17in; margin-bottom: 0in">
	<font size="4" style="font-size: 15pt"><b><a class="western" href="#__RefHeading___Toc485736527">8.</a></b><font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US"><span style="font-weight: normal"><a class="western" href="#__RefHeading___Toc485736527">	</a></span></span></font></font><a class="western" href="#__RefHeading___Toc485736527"><b>Status<span lang="en-US">	30</span></b></a></font></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736528">8.1.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Utilities<span lang="en-US">	30</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736529">8.2.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Bugs<span lang="en-US">	30</span></a></p>
	<p style="margin-left: 0.17in; margin-bottom: 0in"><a class="western" href="#__RefHeading___Toc485736530">8.3.<font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US">	</span></font></font>Untested<span lang="en-US">	30</span></a></p>
	<p lang="da-DK" align="center" style="margin-left: 0.17in; margin-bottom: 0in">
	<font size="4" style="font-size: 15pt"><b><a class="western" href="#__RefHeading___Toc485736531">9.</a></b><font face="Calibri, sans-serif"><font size="2" style="font-size: 11pt"><span lang="en-US"><span style="font-weight: normal"><a class="western" href="#__RefHeading___Toc485736531">	</a></span></span></font></font><a class="western" href="#__RefHeading___Toc485736531"><b>Theading<span lang="en-US">	31</span></b></a></font></p>
</div>
<p class="western" style="margin-bottom: 0in"><a name="_Ref166921735"></a>
<br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<li><h1 class="western" align="justify" style="margin-top: 0.25in; margin-bottom: 0.17in; page-break-before: always"><a name="__RefHeading___Toc485736479"></a>
	<font size="2" style="font-size: 11pt">Introduction</font></h1>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The IBM TSS is designed
for:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">ease of
	understanding</p>
	<li><p class="western" style="margin-bottom: 0in">ease of use</p>
	<li><p class="western" style="margin-bottom: 0in">ease of
	implementation</p>
	<li><p class="western" style="margin-bottom: 0in">maximum code reuse</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol start="2">
	<li><h1 class="western" align="justify" style="margin-top: 0.25in; margin-bottom: 0.17in; page-break-before: always"><a name="__RefHeading___Toc485736480"></a>
	<font size="2" style="font-size: 11pt">Features</font></h1>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The TSS handles the
following, completely hidden from the caller:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">HMAC, password and
	policy sessions</p>
	<li><p class="western" style="margin-bottom: 0in">Session and HMAC
	key calculations, including bind and salt sessions</p>
	<li><p class="western" style="margin-bottom: 0in">HMAC generation
	and verification (including cpHash and rpHash)</p>
	<li><p class="western" style="margin-bottom: 0in">Parameter
	encryption and decryption, XOR and AES</p>
	<li><p class="western" style="margin-bottom: 0in">Nonces and nonce
	rolling</p>
	<li><p class="western" style="margin-bottom: 0in">Session continue
	flag</p>
	<li><p class="western" style="margin-bottom: 0in">TPM 2.0 &quot;Name&quot;
	and bind session tracking</p>
	<li><p class="western" style="margin-bottom: 0in">Different session
	hash algorithms</p>
	<li><p class="western" style="margin-bottom: 0in">Marshaling,
	unmarshaling, and communication with the TPM 
	</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">and almost hidden from
the caller:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">bind password</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol start="3">
	<li><h1 class="western" align="justify" style="margin-top: 0.25in; margin-bottom: 0.17in; page-break-before: always"><a name="__RefHeading___Toc485736481"></a>
	<font size="2" style="font-size: 11pt">API</font></h1>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The API consists of the
following calls:</p>
<ol>
	<ol>
		<li><h2 class="western"><a name="__RefHeading___Toc485736482"></a>TSS_Execute()</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">#include &lt;tss2/tss.h&gt;</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">TPM_RC
	TSS_Execute(TSS_CONTEXT 			*tssContext,</p>
<p class="western" style="margin-left: 0.5in; margin-bottom: 0in">		 
         RESPONSE_PARAMETERS 	*out,</p>
<p class="western" style="margin-bottom: 0in">				COMMAND_PARAMETERS
	*in,</p>
<p class="western" style="margin-bottom: 0in">				EXTRA_PARAMETERS
		*extra,</p>
<p class="western" style="margin-bottom: 0in">				TPM_CC
				commandCode,</p>
<p class="western" style="margin-bottom: 0in">		  	 	...);</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">This is the primary TSS
function.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">tssContext:  Opaque
object</p>
<p class="western" style="margin-bottom: 0in">out:  The standard TPM2
Part 3 response parameter</p>
<p class="western" style="margin-bottom: 0in">in: The standard TPM2
Part 3 command parameter</p>
<p class="western" style="margin-bottom: 0in">extra:  Some commands
(only two so far) require extra parameter s.</p>
<p class="western" style="margin-bottom: 0in">commandCode: The
standard TPM2 Part 2 command code.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">. . . :  A list of
session 3-tuples , of the form</p>
<p class="western" style="margin-bottom: 0in">	 TPMI_SH_AUTH_SESSION
sessionHandle,</p>
<p class="western" style="margin-bottom: 0in">   	const char
*password,</p>
<p class="western" style="margin-bottom: 0in">   	unsigned int
sessionAttributes</p>
<p class="western" style="margin-bottom: 0in">	The list is terminated
with (TPM_RH_NULL, NULL, 0)</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="2">
		<li><h2 class="western"><a name="__RefHeading___Toc485736483"></a><a name="_Ref437348825"></a>
		TSS_Create()</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">#include &lt;tss2/tss.h&gt;</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">TPM_RC
	TSS_Create(TSS_CONTEXT **tssContext);</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">This creates the
TSS_CONTEXT used in the TSS_Execute() function.  It is initialized
with the default configuration, which can be then changed using 3.4.3
TSS_SetProperty().</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Returns an error if the
context cannot be allocated, or if the properties cannot be
initialized, typically due to an invalid environment variable.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">See 3.3 TSS_Delete().</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">It does not immediately
open a connection, so that the connection properties can be changed
from the default first. 
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="3">
		<li><h2 class="western"><a name="__RefHeading___Toc485736484"></a><a name="_Ref437348811"></a>
		TSS_Delete()</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">#include &lt;tss2/tss.h&gt;</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">TPM_RC	TSS_Delete(TSS_CONTEXT
*tssContext);</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The deletes the opaque
context created using 3.2 TSS_Create().  
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">It closes an open
connection.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Returns an error if the
connection close fails.</p>
<p class="western" style="margin-bottom: 0in; page-break-before: always">
<br>
</p>
<ol>
	<ol start="4">
		<li><h2 class="western"><a name="__RefHeading___Toc485736485"></a>Optional
		Customization</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The TSS is designed to
work by default with no configuration.   
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-left: 0.25in; margin-bottom: 0in">The
current default connects to the Microsoft format socket simulation. 
This will eventually change to connect to the resource manager.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">There are three ways to
customize the configuration:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<li><p class="western" style="margin-bottom: 0in">At compile time,
	with a compiler flag</p>
	<li><p class="western" style="margin-bottom: 0in">At program start,
	using an environment variable</p>
	<li><p class="western" style="margin-bottom: 0in">During run time,
	using the 3.4.3 TSS_SetProperty() function.</p>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The environment
variables and TSS_SetProperty property use the same names.  The
makefile flag uses the name with _DEFAULT appended.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The environment
variable overrides the compiler flag, and the TSS_SetProperty()
function overrides both the compiler flag and the environment
variable.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol>
		<ol>
			<li><h3 class="western"><a name="__RefHeading___Toc485736486"></a>Property
			Example</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">To change the default
TPM interface to the TPM device driver:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">With a makefile:</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">-DTPM_INTERFACE_TYPE_DEFAULT=&quot;\&quot;dev\&quot;&quot;</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">With an
	environment variable:</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; setenv
TPM_INTERFACE_TYPE  dev</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">With the TSS_SetProperty()
	function:</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">rc =
TSS_SetProperty(tssContext, TPM_INTERFACE_TYPE, &quot;dev&quot;);</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol>
		<ol start="2">
			<li><h3 class="western"><a name="__RefHeading___Toc485736487"></a><a name="_Ref469903681"></a><a name="_Ref469903677"></a>
			Properties</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">(Remember that the
makefile compiler flag requires _DEFAULT to be added, and that the
quotes must be escaped.).</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The property and legal
values are:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<h4 class="western"><a name="_Ref473273918"></a>TPM_TRACE_LEVEL</h4>
<p class="western" style="margin-bottom: 0in">		default -  0</p>
<p class="western" style="margin-bottom: 0in">	0 - no tracing</p>
<p class="western" style="margin-bottom: 0in">	1 - trace errors</p>
<p class="western" style="margin-bottom: 0in">	2 - trace errors and
execution flow</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<h4 class="western">TPM_DATA_DIR</h4>
<p class="western" style="margin-bottom: 0in">		default - current
directory</p>
<p class="western" style="margin-bottom: 0in">	set the directory
where the TSS can store persistent data</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<h4 class="western"><a name="_Ref473274005"></a>TPM_INTERFACE_TYPE</h4>
<p class="western" style="margin-bottom: 0in">		default - socsim 
</p>
<p class="western" style="margin-bottom: 0in">	socsim - the socket
simulator</p>
<p class="western" style="margin-left: 1in; margin-bottom: 0in">see 
</p>
<p class="western" style="margin-left: 1in; text-indent: 0.5in; margin-bottom: 0in">
TPM_SERVER_NAME</p>
<p class="western" style="margin-left: 1in; text-indent: 0.5in; margin-bottom: 0in">
TPM_SERVER_TYPE</p>
<p class="western" style="margin-left: 1in; text-indent: 0.5in; margin-bottom: 0in">
TPM_COMMAND_PORT</p>
<p class="western" style="margin-left: 1in; text-indent: 0.5in; margin-bottom: 0in">
TPM_PLATFORM_PORT</p>
<p class="western" style="margin-bottom: 0in">	dev - TPM device
driver 
</p>
<p class="western" style="margin-left: 0.5in; text-indent: 0.5in; margin-bottom: 0in">
see 
</p>
<p class="western" style="margin-left: 1in; text-indent: 0.5in; margin-bottom: 0in">
TPM_DEVICE</p>
<h4 class="western"><a name="_Ref473273410"></a>TPM_SERVER_NAME</h4>
<p class="western" style="margin-bottom: 0in">		default - localhost</p>
<p class="western" style="margin-bottom: 0in">	set the socket server
name (full host name or dotted decimal)</p>
<h4 class="western"><a name="_Ref473273447"></a>TPM_SERVER_TYPE</h4>
<p class="western" style="margin-bottom: 0in">		default - mssim</p>
<p class="western" style="margin-bottom: 0in">	mssim - send packets
in the Microsoft simulator format (header and footer)</p>
<p class="western" style="margin-bottom: 0in">	raw - send packets in
the raw TPM specification Part 3 format</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<h4 class="western"><a name="_Ref473273450"></a>TPM_COMMAND_PORT</h4>
<p class="western" style="margin-bottom: 0in">		default - 2321</p>
<p class="western" style="margin-bottom: 0in">	set the socket port
for TPM commands</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<h4 class="western"><a name="_Ref473273453"></a>TPM_PLATFORM_PORT</h4>
<p class="western" style="margin-bottom: 0in">		default - 2322</p>
<p class="western" style="margin-bottom: 0in">	set the socket port
for TPM simulator platform commands</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<h4 class="western"><a name="_Ref473273499"></a>TPM_DEVICE</h4>
<p class="western" style="margin-bottom: 0in">		Unix/Linux default -
/dev/tpm0	(single user)</p>
<p class="western" style="margin-bottom: 0in">		Windows default -
Windows 7,8,10 Tbsi</p>
<p class="western" style="margin-bottom: 0in">	For Unix, sets the TPM
device name</p>
<p class="western" style="margin-bottom: 0in">		/dev/tpmrm0 is the
multi-user kernel resource manager</p>
<p class="western" style="margin-bottom: 0in">			Once the kernel
resource manager is upstreamed, this</p>
<p class="western" style="margin-bottom: 0in">			may become the
default.</p>
<p class="western" style="margin-bottom: 0in">	For Windows, not
currently used, only Tbsi supported</p>
<p class="western" style="margin-bottom: 0in">	</p>
<h4 class="western"><a name="_Ref473274288"></a>TPM_ENCRYPT_SESSIONS</h4>
<p class="western" style="margin-bottom: 0in">		default 1</p>
<p class="western" style="margin-bottom: 0in">	1 - Session state is
saved encrypted</p>
<p class="western" style="margin-bottom: 0in">	0 - Session state is
saved in plaintext</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Since session state can
potentially hold secrets, it should normally be encrypted.  When the
process terminates, the ephemeral encryption key is lost.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">See 4.9 Command Line Utilities
for the special case of using the command line utilities.  That
section is not applicable when using the TSS library in programs.</p>
<p class="western" style="margin-bottom: 0in; page-break-before: always">
<br>
</p>
<ol>
	<ol>
		<ol start="3">
			<li><h3 class="western"><a name="__RefHeading___Toc485736488"></a><a name="_Ref418692484"></a>
			TSS_SetProperty()</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">#include &lt;tss2/tss.h&gt;</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">TPM_RC
TSS_SetProperty(TSS_CONTEXT *tssContext,</p>
<p class="western" style="margin-left: 1.5in; text-indent: 0.5in; margin-bottom: 0in">
int property,</p>
<p class="western" style="margin-left: 1.5in; text-indent: 0.5in; margin-bottom: 0in">
const char *value);</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The TSS_SetProperty()
function overrides the defaults and environment variables
programmatically.  
</p>
<p class="western" style="margin-bottom: 0in">	</p>
<p class="western" style="margin-bottom: 0in">If the property is
related to the connection, an open connection is closed before the
property is processed.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-left: 0.5in; margin-bottom: 0in">NOTE:
 The close occurs even if the new value is the same as the old value.
 This can be used to close a connection without deleting the context.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-left: 0.5in; margin-bottom: 0in">Question:
 Is it good to mandate this behavior?  It offers functionality and
makes the implementation easier, but perhaps it's too clever?</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">NOTE:  The value
parameter is always a string. For simplicity, the 'value' pointer is
stored.  The input should be a constant string.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">NOTE: For the property
TPM_TRACE_LEVEL, tssContext is ignored.  The trace level is per
process, not per context.</p>
<p class="western" style="margin-bottom: 0in; page-break-before: always">
<br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="5">
		<li><h2 class="western"><a name="__RefHeading___Toc485736489"></a>Extra
		Parameter</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The extra parameter is
a catch-all for any parameters that TSS_Execute() requires beyond the
normal TPM command and response parameters.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">TPM2_StartAuthSession
needs the bind password so that it can calculate the session key. 
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="6">
		<li><h2 class="western"><a name="__RefHeading___Toc485736490"></a>Other
		APIs and Headers</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Headers are now in the
&hellip;/utils/tss2 directory.  This move (from &hellip;/utils)
permits source to use this construct, compatible with an eventual
header install in /usr/include/tss2:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">#include &lt;tss2/tss.h&gt;</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The utility / demo
applications cheat a bit, in that they call into TSS utility
functions.  These are less likely to be stable than the official API
above.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">tss.h:  The
	official API</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">tsserror.h: 
	Included by tss.h for convenience.  Error codes may be added.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">tssmarshal.h: 
	Marshal structures to arrays. These are likely to be stable.  They
	are similar to the TPM side functions but return errors.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">Unmarshal_fp.h:
	Unmarshal arrays to structures.  These are likely to be stable,
	since they are used on the TPM side. 
	</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">tssresponsecode.h:
	 Response code to text.  Useful for debugging.  The API should be
	stable, but the actual output may change.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">tssprint.h: 
	Functions to print structures.  Useful for debugging.  The API
	should be stable.  Functions may be added, and the output is likely
	to change.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">tssutils.h:  Demo
	helper functions.  These are useful for rapid prototyping but are
	not recommended for production code.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">tssfile.h:  Demo
	helper functions.  These are useful for rapid prototyping but are
	not recommended for production code.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">tsscrypto.h: 
	Sample crypto code.  These are useful for rapid prototyping but are
	not recommended for production code.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">Any of the lower
	layer TSS functions are for TSS internal use.  They should not be
	called.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol start="4">
	<li><h1 class="western" align="justify" style="margin-top: 0.25in; margin-bottom: 0.17in; page-break-before: always"><a name="__RefHeading___Toc485736491"></a>
	<font size="2" style="font-size: 11pt">Application Notes</font></h1>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Several areas have
non-obvious usage.  They are described here.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol>
		<li><h2 class="western"><a name="__RefHeading___Toc485736492"></a>TPM
		Simulator</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">A typical cause of a
hang when sending the first command to the TPM simulator is that it
has not received a simulated &quot;powered up.&quot;  Send this
command:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; powerup</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The platform firmware
initializes a hardware TPM.  The TPM simulator requires this command:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; startup</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="2">
		<li><h2 class="western"><a name="__RefHeading___Toc485736493"></a>Parameter
		Encryption</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The caller does NOT
perform parameter encryption.  Simply set the session attribute to
either or both of TPMA_SESSION_ENCRYPT or TPMA_SESSION_DECRYPT.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="3">
		<li><h2 class="western"><a name="__RefHeading___Toc485736494"></a>Session
		Salt</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">To salt, the caller
should set tpmKey (the handle of a loaded decrypt key) in
TPM2_StartAuthSession.  The key must be an RSA 2048-bit key or EC
NIST P256 key with sign clear and decrypt set.  
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The caller must supply
the extra parameter as a StartAuthSession_Extra structure.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The caller does NOT
supply the HMAC salt.  The encryptedSalt parameter is ignored, as the
TSS generates the salt.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="4">
		<li><h2 class="western"><a name="__RefHeading___Toc485736495"></a>Session
		Bind</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">To bind, the caller
should set bind (the bind entity handle) in TPM2_StartAuthSession. 
The caller must supply the extra parameter as a
StartAuthSession_Extra structure and set the bindPassword member to
the bind handle password.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="5">
		<li><h2 class="western"><a name="__RefHeading___Toc485736496"></a>NV</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">For applications that
do not share an NV index and don't use global locks or transient
locks that change after a reboot, the following details are
unnecessary.  Just issue the TPM2_NV_DefineSpace and everything
works, including HMAC sessions.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">For applications that
do not satisfy the above criteria, the application must issue
TPM2_NV_ReadPublic and validate that the public area is as expected,
including the locks.</p>
<ol>
	<ol>
		<ol>
			<li><h3 class="western"><a name="__RefHeading___Toc485736497"></a>Rationale</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Why?  For
authorization, the TSS includes the Name (a hash of the public NV
metadata) in the HMAC calculation.  This ensures that the NV index
has not been replaced with a different version with untrusted
metadata.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Normally, the TSS
tracks the Name, even when the application changes the written or
lock attributes.  However, if the attributes (and therefore the Name)
change outside the application, the TSS is unable to track the
change.  In those cases, the application must read the public data
and validate it.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Why doesn't the TSS
automatically issue the TPM2_NV_ReadPublic?  If it did that, it would
encourage the application developer to blindly trust the index.  The
application is expected to examine the TPM2_NV_ReadPublic return
(e.g., the policy, the attributes) and decide whether the index is
trusted.  The TSS cannot enforce this, but it does at least encourage
it.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The index Name can
change as the metadata changes.  These changes include the &quot;written&quot;
bit and the read and write locks.  The TSS automatically tracks the
changes performed on a single index by the application.  It does not
track:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<li><p class="western" style="margin-bottom: 0in">Changes &quot;out
	of band&quot;, by a different application, including an attacker.</p>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">This will surface as an
HMAC failure.  The application should reissue TPM2_NV_ReadPublic and
decide if the index is still trusted.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol start="2">
	<li><p class="western" style="margin-bottom: 0in">Changes to
	transient lock status due to a reboot.</p>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">If the application is
aware of the reboot, it can reissue TPM2_NV_ReadPublic and
re-evaluate the return.  Otherwise, it can wait for the potential
HMAC failure and handle it as above.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol start="3">
	<li><p class="western" style="margin-bottom: 0in">Locks due to a
	global lock, because it's hard and because global lock is expected
	to be used at provisioning, if ever.</p>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">This case will probably
never occur in practice.  If it does, handle the HMAC failure as
above.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol>
		<ol start="2">
			<li><h3 class="western"><a name="__RefHeading___Toc485736498"></a>NV
			Preprovisioning</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">This is the case where
some other application has used TPM2_NV_DefineSpace to preprovision
an index.  As an alternative to the application evaluating the
TPM2_NV_ReadPublic response, the NV metadata and Name can be
preprovisioned when the application is installed.  Two files are
required:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">	[nnnnnnnn] is the hex
value of the NV index.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<li><p class="western" style="margin-bottom: 0in">h[nnnnnnnn].bin -
	The Name, a binary hash of the public data</p>
	<li><p class="western" style="margin-bottom: 0in">nvp[nnnnnnnn].bin
	- The marshaled TPMS_NV_Public</p>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="6">
		<li><h2 class="western"><a name="__RefHeading___Toc485736499"></a>TPM2_LoadExternal</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">This command is unique,
in that it has an optional parameter, TPM2B_SENSITIVE <i>inPrivate</i>.
 The caller should use the size as a flag:  0 for not present, and
non-zero for present.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Rationale:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The TPM uses the
<i>inPrivate.size </i>zero to indicate that the parameter is not
present, and uses the correct marshaled size to indicate that the
parameter is present. This TSS uses that design pattern, but, as with
other TPM2B's that wrap structures, it does not require the caller to
marshal the structure and determine the correct size.  
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="7">
		<li><h2 class="western"><a name="__RefHeading___Toc485736500"></a><a name="_Ref483554623"></a><a name="_Ref483554619"></a>
		Connecting to Resource Managers</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">An issue arises when
using the TSS utilities (not the TSS itself) on a platform with a
resource manager.  Windows currently has a resource manager (called
TBS) and all OSes will eventually have one.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">A resource manager
flushes all resources (objects like keys, and sessions) when a
connection closes.  Since the utilities are standalone processes, the
connection closes after each invocation.  Thus, for example, a
utility can load a key, but, when the &quot;load&quot; command
terminates, the resource manager will flush the key.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">This is not an issue
for a complete application using the TSS, because the TSS will keep
the connection open through multiple TPM commands.  For prototyping
using the utilities, the solution is to simulate this persistent
connection behavior.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The &quot;tpm_proxy&quot;
program connects as a socket server on one side and a TPM device
driver on the other.  Once the proxy starts, the resource manager
sees one persistent connection, as desired.  The utilities use the
socket interface to the proxy.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The proxy (for both TPM
1.2 and TPM 2.0) is part of the tarball at</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><a class="western" href="https://sourceforge.net/projects/ibmswtpm/files/?source=navbar"><span lang="en-US">https://sourceforge.net/projects/ibmswtpm/files/?source=navbar</span></a></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">It is not well tested
for TPM 2.0.  I expect that the TPM_Startup call must be commented
out, and that the TSS must run in &quot;raw&quot; mode.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="8">
		<li><h2 class="western"><a name="__RefHeading___Toc485736501"></a>Endorsement
		Key (EK Certificates)</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The TSS includes
several TPM vendor EK root certificates for convenience.  
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">There is no reason for
a user to trust these certificates.  Obtain production certificates
directly from the TPM vendor.  
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">These URLs are provided
for convenience.  Observe that some URLs are http.  I encourage all
readers to ask the TPM vendors to offer these certificates over a
secured web page, since they form the root of trust for TPM
authenticity.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Utilities such as
&quot;createek&quot; that take a -root argument require a list of EK
root certificates in a file.  The utilities include a sample file
&hellip;/utils/certificates/rootcerts.txt.  The file MUST be edited,
since the file names must have a complete path to your install
directory.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Certificates must be in
PEM format.  To convert from DER format (.cer, .crt) to PEM using
openssl:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; openssl x509 -in
cert.cer -inform DER -out cert.pem</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol>
		<ol>
			<li><h3 class="western"><a name="__RefHeading___Toc485736502"></a>Nuvoton</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><a class="western" href="https://www.nuvoton.com/security/NTC-TPM-EK-Cert/Nuvoton%20TPM%20Root%20CA%202110.cer"><span lang="en-US">https://www.nuvoton.com/security/NTC-TPM-EK-Cert/Nuvoton%20TPM%20Root%20CA%202110.cer</span></a></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><a class="western" href="https://www.nuvoton.com/security/NTC-TPM-EK-Cert/Nuvoton%20TPM%20Root%20CA%201110.cer"><span lang="en-US">https://www.nuvoton.com/security/NTC-TPM-EK-Cert/Nuvoton%20TPM%20Root%20CA%201110.cer</span></a></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol>
		<ol start="2">
			<li><h3 class="western"><a name="__RefHeading___Toc485736503"></a>St
			Micro</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">GlobalSign Trusted
Computing CA 
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">http://secure.globalsign.com/cacert/gstpmroot.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">ST TPM Root certificate
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">http://secure.globalsign.com/cacert/stmtpmekroot.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">ST Intermediate CA 01 
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">http://secure.globalsign.com/cacert/stmtpmekint01.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">ST Intermediate CA 02 
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">http://secure.globalsign.com/cacert/stmtpmekint02.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">ST Intermediate CA 03 
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">http://secure.globalsign.com/cacert/stmtpmekint03.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">ST Intermediate CA 04 
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">http://secure.globalsign.com/cacert/stmtpmekint04.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">ST Intermediate CA 05 
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">http://secure.globalsign.com/cacert/stmtpmekint05.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">GlobalSign Trusted
Platform Module ECC</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Root CA 
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">http://secure.globalsign.com/cacert/tpmeccroot.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">STM TPM ECC Root CA 01 
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">http://secure.globalsign.com/stmtpmeccroot01.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">STM TPM ECC
Intermediate CA 01 
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">http://secure.globalsign.com/stmtpmeccint01.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol>
		<ol start="3">
			<li><h3 class="western"><a name="__RefHeading___Toc485736504"></a>Infineon</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><a class="western" href="https://www.infineon.com/cms/en/product/promopages/optiga_tpm_certificates"><span lang="en-US">https://www.infineon.com/cms/en/product/promopages/optiga_tpm_certificates</span></a></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol>
		<ol start="4">
			<li><h3 class="western"><a name="__RefHeading___Toc485736505"></a>NationZ</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Root</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">https://pki.nationz.com.cn/EkRootCA/EkRootCA.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Intermediate
certificates</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">https://pki.nationz.com.cn/EkMfrCA001/EkMfrCA001.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">https://pki.nationz.com.cn/EkMfrCA002/EkMfrCA002.crt</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">https://pki.nationz.com.cn/EkMfrCA003/EkMfrCA003.crt</span></u></span></font></p>
<ol>
	<ol>
		<ol start="5">
			<li><h3 class="western"><a name="__RefHeading___Toc485736506"></a>Intel</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">PTT EK Root Certificate</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><span lang="en-US">https://upgrades.intel.com/content/CRL/ekcert/EKRootPublicKey.cer</span></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">PTT EK Intermediate
Certificate</p>
<p class="western" style="margin-bottom: 0in">      
<font color="#0000ff"><span lang="en-US"><u><a class="western" href="http://upgrades.intel.com/content/CRL/ekcert/SPTHEPIDPROD_EK_Platform_Public_Key.cer"><span lang="en-US">http://upgrades.intel.com/content/CRL/ekcert/SPTHEPIDPROD_EK_Platform_Public_Key.cer</span></a></u></span></font></p>
<ol>
	<ol>
		<ol>
			<ol>
				<li><h3 class="western"><a name="__RefHeading___Toc485736507"></a>
				Intel EK Certificate Download</h3>
			</ol>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">As of June, 2017, the
Intel PTT does not come provisioned with EK certificates.  They must
be downloaded using this procedure.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">Read the EK public
	key</p>
	<li><p class="western" style="margin-bottom: 0in">Construct digest
	data</p>
	<ul>
		<li><p class="western" style="margin-bottom: 0in">For RSA,
		concatenate the public modulus to the default exponent 010001, all
		in binary.</p>
		<li><p class="western" style="margin-bottom: 0in">For EC, this step
		is currently undocumented.</p>
	</ul>
	<li><p class="western" style="margin-bottom: 0in">Calculate a
	SHA-256 digest of the digest data</p>
	<li><p class="western" style="margin-bottom: 0in">Base64 encode the
	digest</p>
	<li><p class="western" style="margin-bottom: 0in">Convert the base64
	to URL base64 by changing = to %3D, + to -, and / to _.</p>
	<li><p class="western" style="margin-bottom: 0in">Prepend
	<font color="#0000ff"><span lang="en-US"><u><a class="western" href="https://ekop.intel.com/ekcertservice/"><span lang="en-US">https://ekop.intel.com/ekcertservice/</span></a></u></span></font>
	to form the certificate URL.</p>
	<li><p class="western" style="margin-bottom: 0in">Use a browser to
	display the certificate (or use wget and edit in a text editor)</p>
	<li><p class="western" style="margin-bottom: 0in">Extract the text
	between the &lt;certificate&gt; and &lt;/certificate&gt; to a text
	editor.</p>
	<li><p class="western" style="margin-bottom: 0in">Convert the URL
	base64 to base64 by changing %3D to =, - to +, and _ to /.  Remove
	all newlines.</p>
	<li><p class="western" style="margin-bottom: 0in">Base64 decode to
	create the DER certificate.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="9">
		<li><h2 class="western"><a name="__RefHeading___Toc485736508"></a><a name="_Ref469903483"></a>
		Command Line Utilities</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">See also section 4.7 Connecting to Resource Managers.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">As stated in section 3.4.2
Properties, the default is to build the TSS library to encrypt
session state with an ephemeral encryption key that is lost when the
application exits.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">This behavior would
preclude using the command line utilities with sessions, since the
encryption key would change.  There are two facilities to remedy
this.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<li><p class="western" style="margin-bottom: 0in">For stand-alone
	debugging, save session state in plaintext.   For example, use an
	environment variable:</p>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="text-indent: 0.5in; margin-bottom: 0in">&gt;
setenv TPM_ENCRYPT_SESSIONS 0</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">	or the equivalent
compile time flag</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">	-DTPM_ENCRYPT_SESSIONS_DEFAULT=&quot;\&quot;0\&quot;&quot;</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol start="2">
	<li><p class="western" style="margin-bottom: 0in">For using the
	command line utilities securely, either stand-alone or in scripts, a
	fixed encryption key can be specified.</p>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="text-indent: 0.5in">In the script:</p>
<p class="western" style="text-indent: 0.5in">TPM_SESSION_ENCKEY=`./getrandom
-by 16 -ns`</p>
<p class="western" style="text-indent: 0.5in">On the command line:</p>
<p class="western" style="text-indent: 0.5in">&gt; setenv
TPM_SESSION_ENCKEY `./getrandom -by 16 -ns`</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol start="5">
	<li><h1 class="western" align="justify" style="margin-top: 0.25in; margin-bottom: 0.17in; page-break-before: always"><a name="__RefHeading___Toc485736509"></a>
	<font size="2" style="font-size: 11pt">Example</font></h1>
</ol>
<p class="western" style="margin-bottom: 0in">Each standalone utility
serves as an example for a single command.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The signapp.c source
shows how several commands can be chained together to form an
application.  It does the following:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">Start an
	authorization HMAC session</p>
	<li><p class="western" style="margin-bottom: 0in">Create a primary
	storage key, using the session</p>
	<li><p class="western" style="margin-bottom: 0in">Create a signing
	key under the storage key</p>
	<li><p class="western" style="margin-bottom: 0in">Load the signing
	key, using the session</p>
	<li><p class="western" style="margin-bottom: 0in">Sign a digest,
	using the session</p>
	<li><p class="western" style="margin-bottom: 0in">Verify the
	signature</p>
	<li><p class="western" style="margin-bottom: 0in">Flush the primary
	key</p>
	<li><p class="western" style="margin-bottom: 0in">Flush the signing
	key</p>
	<li><p class="western" style="margin-bottom: 0in">Flush the session</p>
</ul>
<ol start="6">
	<li><h1 class="western" align="justify" style="margin-top: 0.25in; margin-bottom: 0.17in; page-break-before: always"><a name="__RefHeading___Toc485736510"></a>
	<font size="2" style="font-size: 11pt">Build</font></h1>
</ol>
<p class="western" style="margin-bottom: 0in">The builds for Linux
and Windows create the TSS shared object / dll and about 110 command
line programs.  The command line programs can be used in a script for
rapid prototyping or as sample usage code.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The build files clear
TPM_ENCRYPT_SESSIONS, which is useful for prototyping and regression
testing.  This should be removed for production applications.</p>
<ol>
	<ol>
		<li><h2 class="western"><a name="__RefHeading___Toc485736511"></a><a name="_Ref156904153"></a>
		Directories</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The TSS ships with
these directories:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&hellip;/utils		TSS and
utility / demo applications</p>
<p class="western" style="margin-bottom: 0in">&hellip;/utils/regtests	TSS
regression tests</p>
<p class="western" style="margin-bottom: 0in">&hellip;/utils/policies	TSS
regression test policies and miscellaneous files</p>
<p class="western" style="margin-bottom: 0in">&hellip;/demo		TSS demo
web pages</p>
<p class="western" style="margin-bottom: 0in">&hellip;/tpmutils		TSS
Visual Studio files</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">To extract the tarball</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; cd &hellip;</p>
<p class="western" style="margin-bottom: 0in">&gt; tar xvf
ibmtssnnn.tar .</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="2">
		<li><h2 class="western"><a name="__RefHeading___Toc485736512"></a>Linux</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Install OpenSSL 1.0.x
or  1.1.x.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; cd &hellip;/utils</p>
<p class="western" style="margin-bottom: 0in">&gt; make</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">	Note:  Linux builds
must have TPM_POSIX defined.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">After building, run the
regression test against a running simulator.  -h gives help.   The
Linux version takes about 1 minute.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; ./reg.sh -a</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The regression test can
run against a software TPM at /dev/tpm0.  It will skip the power up
sequence.  However, it uses the environment variable TPM_INTERFACE_TYPE
as the determination.  If the default TPM_INTERFACE_TYPE was changed
at compile time, the regression test will try the power up sequence
unless the environment variable is also set.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#ff0000"><b>I
would not expect the regression test to run against a hardware TPM</b></font>,
since the platform firmware will have set the platform authorization.
  There are likely to be other errors due to protected or unsupported
TPM features.  
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#ff0000"><b>Use
the regression test for TSS verification, not as a TPM test tool.</b></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The TPM device driver
normally does not permit non-root access.  Either</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; chmod 777
/dev/tpm0</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">or run as root or sudo.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="3">
		<li><h2 class="western"><a name="__RefHeading___Toc485736513"></a>Windows</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Install OpenSSL.  The
usual place to get OpenSSL for Windows is
<font color="#0000ff"><span lang="en-US"><u><a class="western" href="http://slproweb.com/products/Win32OpenSSL.html"><span lang="en-US">http://slproweb.com/products/Win32OpenSSL.html</span></a></u></span></font>.
 There is no need to build / compile from source.  Just run the
downloaded .exe.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Install OpenSSL 1.0.x,
not 1.1.x, which is a major API departure from previous versions. 
The port to 1.1.x has not yet been tested on Windows.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Install Win32 OpenSSL,
not the &quot;Light&quot; versions, which I believe do not contain
the development files.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">If you chose not to
install OpenSSL in the recommended location, C:\Program
Files\OpenSSL, you must fix the build paths.  (In other words, use
the recommended location.)</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">This directory should
be added to the Path environment variable if it's not already there:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="text-indent: 0.25in; margin-bottom: 0in">c:\Program
Files\OpenSSL\bin</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="text-indent: 0.25in; margin-bottom: 0in">Note:
 Windows builds must have TPM_WINDOWS defined.</p>
<p class="western" style="text-indent: 0.25in; margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Build with Visual
Studio using the solution &hellip;/tpmutils/tpmutils.sln</p>
<p class="western" style="text-indent: 0.25in; margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">After building, run the
regression test against a running simulator.   The Windows version
takes about 15 minutes.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-left: 0.5in; margin-bottom: 0in">The
Windows script assumes that typical command line tools such as touch
and diff are installed.  A typical download location is</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="text-indent: 0.5in; margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><a class="western" href="http://gnuwin32.sourceforge.net/packages.html"><span lang="en-US">http://gnuwin32.sourceforge.net/packages.html</span></a></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="text-indent: 0.5in; margin-bottom: 0in">See
CoreUtils and DiffUtils.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; reg.bat</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The regression test
script defaults to the executables being in the same directory as the
script, &hellip;/tpm2/utils.  This is correct for the gcc build, but
not for the Visual Studio build.  To point to those executables, set
this environment variable.  Do not omit the trailing slash.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; set
TPM_EXE_PATH=../tpmutils/Debug/</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol>
		<ol>
			<li><h3 class="western"><a name="__RefHeading___Toc485736514"></a>Windows
			Tbsi</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">These instructions have
been lightly tested.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Users that use only the
socket interface may not want to install Tbsi (Windows TPM Base
Services).  Undefine TPM_WINDOWS_TBSI to remove that dependency.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">	Note:  To undefined
the macro in Visual Studio:</p>
<ol>
	<li><p class="western" style="margin-bottom: 0in">View - Other
	Windows - Property Manager</p>
	<li><p class="western" style="margin-bottom: 0in">Expand one of the
	projects</p>
	<li><p class="western" style="margin-bottom: 0in">Expand Debug (or
	Release if doing a release build)</p>
	<li><p class="western" style="margin-bottom: 0in">Double click
	CommonProperties</p>
	<li><p class="western" style="margin-bottom: 0in">Expand Common
	Properties, then C/C++, then select Preprocessor</p>
	<li><p class="western" style="margin-bottom: 0in">Next to
	Preprocessor Definitions, click the value, then the down arrow, then
	&lt;Edit&gt;</p>
	<li><p class="western" style="margin-bottom: 0in">Remove the macro
	TPM_WINDOWS_TBSI</p>
	<li><p class="western" style="margin-bottom: 0in">OK, OK</p>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">To build in Tbsi:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">Install the
	Microsoft Platform SDK or the Windows SDK to get the tbs.h include
	file.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">Define the
	preprocessor macro TPM_WINDOWS_TBSI</p>
	<li><p class="western" style="margin-bottom: 0in">Define the
	preprocessor macro TPM_WINDOWS_TBSI_WIN8</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-left: 0.5in; margin-bottom: 0in">NOTE:
For Windows 7, the alternate macro TPM_WINDOWS_TBSI_WIN7 uses the TPM
1.2 Tbsi API.  I use it for light testing, but it is probably useless
for a TPM 2.0.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-left: 0.5in; margin-bottom: 0in">Note:
 The TPM_WINDOWS_TBSI_WIN8 macro also supports Windows 10.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">Link the tss with
	Tbs.lib</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="text-indent: 0.5in; margin-bottom: 0in">Note:
 For Windows 7, use c:/progra~1/Micros~2/Windows/v7.1/lib/Tbs.lib</p>
<p class="western" style="text-indent: 0.5in; margin-bottom: 0in"><br>
</p>
<ol>
	<ol>
		<ol start="2">
			<li><h3 class="western"><a name="__RefHeading___Toc485736515"></a>Windows
			Visual Studio</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">VS solution and project
files are supplied.  The Visual Studio 2013 Solution is
&hellip;/tpmutils/tpmutils.sln.  
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">It is currently
configured to compile in the Windows (TPM_WINDOWS) TBSI
(TPM_WINDOWS_TBSI) for Windows 8 (TPM_WINDOWS_TBSI_WIN8).  It links
with Tbs.lib.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The default is to
connect to the socket simulator using the Microsoft simulator packet
format.  To change the default from a SW TPM to a HW TPM, add the
preprocessor definition:</p>
<p class="western" style="text-indent: 0.5in; margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">TPM_INTERFACE_TYPE_DEFAULT=&quot;dev&quot;</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol>
		<ol start="3">
			<li><h3 class="western"><a name="__RefHeading___Toc485736516"></a>Windows
			gcc</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">A mingw (Minimalist GNU
for Windows) makefile.mak is included.  mingw from
<font color="#0000ff"><span lang="en-US"><u><a class="western" href="http://www.mingw.org/"><span lang="en-US">http://www.mingw.org/</span></a></u></span></font>
must be installed.  
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">winerror.h may have to
be installed in C:\Program Files\MinGW\include</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">If the mingw install
does not come with C:\Program Files\MinGW\include\tbs.h, a lightly
tested file is included in the utils directory.  Copy to C:\Program
Files\MinGW\include.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Uncomment as indicated
in makefile.mak to use the TBSI, either Windows 8 or Windows 7. 
Build using:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; cd &hellip;/utils</p>
<p class="western" style="margin-bottom: 0in">&gt; make -f
makefile.mak</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="4">
		<li><h2 class="western"><a name="__RefHeading___Toc485736517"></a>AIX</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Use gnu make (gmake),
not make.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; cd &hellip;/utils</p>
<p class="western" style="margin-bottom: 0in">&gt; gmake -f
makefile.aix</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">After building, run the
regression test against a running Microsoft simulator.  -h gives
help.  Since the TPM simulator does not run on AIX yet, set the TPM_SERVER_NAME
environment variable.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; reg.sh -a</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="5">
		<li><h2 class="western"><a name="__RefHeading___Toc485736518"></a>Minimal
		TSS Library Builds</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">There are several
compile time macros that permit building a subset of the TSS library.
 Features are lost, but the tradeoff may be important in some
environments.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Since the regression
test does not function against minimal builds, these variations are
very lightly tested.  Please report bugs.</p>
<ol>
	<ol>
		<ol>
			<li><h3 class="western"><a name="__RefHeading___Toc485736519"></a>TPM_TSS_NOFILE</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Defining this macro
builds a TSS library that does not use files for temporary and
persistent state.  All state is stored in the TSS context and is lost
when the context is deleted.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Drawbacks:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">Scripting, which
	requires state to persist between processes, does not work.</p>
	<li><p class="western" style="margin-bottom: 0in">Names and public
	keys of persistent entities do not persist, so the entities must be
	reread (and revalidated) at each connection.</p>
	<li><p class="western" style="margin-bottom: 0in">Context save and
	load are not implemented yet.</p>
	<li><p class="western" style="margin-bottom: 0in">There are
	currently some fixed size arrays for transient object and session
	state.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol>
		<ol start="2">
			<li><h3 class="western"><a name="__RefHeading___Toc485736520"></a>TPM_TSS_NOCRYPTO</h3>
		</ol>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Defining this macro
builds a TSS library that does not depend on a crypto library.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Drawbacks:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">Salted sessions do
	not work.</p>
	<li><p class="western" style="margin-bottom: 0in">HMAC session do
	not work, including policies that require HMAC.</p>
	<li><p class="western" style="margin-bottom: 0in">Encrypt and
	decrypt sessions do not work.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol start="7">
	<li><h1 class="western" align="justify" style="margin-top: 0.25in; margin-bottom: 0.17in; page-break-before: always"><a name="__RefHeading___Toc485736521"></a>
	<font size="2" style="font-size: 11pt">Fedora</font></h1>
</ol>
<p class="western" style="margin-bottom: 0in">This section is only
relevant to a Fedora rpm install.  It is a work in progress, and may
not be 100% correct yet.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The &hellip;/utils
directory holds a sample makefile, makefile.sample that can be
modified for a user application.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Prerequisite:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"># yum install rpm-build</p>
<ol>
	<ol>
		<li><h2 class="western"><a name="__RefHeading___Toc485736522"></a>Local
		Install</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Download the rpms:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">TBD</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<li><p class="western" style="margin-bottom: 0in">Install binaries:</p>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">the libraries -
	/usr/lib64/libtss.so.0.1and the link /usr/lib64/libtss.so.0</p>
	<li><p class="western" style="margin-bottom: 0in">the utilities -
	/usr/bin/tssxxx.  Note that the installed utilities are namespaced
	with the 'tss' prefix.</p>
	<li><p class="western" style="margin-bottom: 0in">the license -
	/usr/share/doc/tss2-nnn/LICENSE</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="text-indent: 0.25in; margin-bottom: 0in">#
rpm -ivh 	tss2-nnn-1.el6.x86_64.rpm</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol start="2">
	<li><p class="western" style="margin-bottom: 0in">Install
	development headers:</p>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">the headers -
	/usr/include/tss2 
	</p>
	<li><p class="western" style="margin-bottom: 0in">the library - link
	/usr/lib64/libtss.so 
	</p>
	<li><p class="western" style="margin-bottom: 0in">this documentation
	- /usr/share/doc/tss2-devel-nnn/ibmtss.doc</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="text-indent: 0.25in; margin-bottom: 0in">#
rpm -ivh	tss2-devel-nnn-1.el6.x86_64.rpm</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol start="3">
	<li><p class="western" style="margin-bottom: 0in">Install debug
	source and support</p>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="text-indent: 0.25in; margin-bottom: 0in">#
rpm -ivh 	tss2-debuginfo-nnn-1.el6.x86_64.rpm</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="2">
		<li><h2 class="western"><a name="__RefHeading___Toc485736523"></a>Alternative
		Local Install</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Erase an old version as
needed:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"># yum erase
tss2-devel-nnn-1.el6.x86_64</p>
<p class="western" style="margin-bottom: 0in"># yum erase
tss2-nnn-1.el6.x86_64</p>
<p class="western" style="margin-bottom: 0in"># yum erase
tss2-debuginfo-nnn-1.el6.x86_64</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Install (new method)</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"># dnf install
./tss2-nnn-1.el6.x86_64.rpm</p>
<p class="western" style="margin-bottom: 0in"># dnf install
./tss2-devel-nnn-1.el6.x86_64.rpm</p>
<p class="western" style="margin-bottom: 0in"># dnf install
./tss2-debuginfo-nnn-1.el6.x86_64.rpm</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Install (old method)</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"># yum install
./tss2-nnn-1.el6.x86_64.rpm</p>
<p class="western" style="margin-bottom: 0in"># yum install
./tss2-devel-nnn-1.el6.x86_64.rpm</p>
<p class="western" style="margin-bottom: 0in"># yum install
./tss2-debuginfo-nnn-1.el6.x86_64.rpm</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="3">
		<li><h2 class="western"><a name="__RefHeading___Toc485736524"></a>Repository
		Install</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Once the packages have
been upstreamed, use this process.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"># dnf install tss</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="4">
		<li><h2 class="western"><a name="__RefHeading___Toc485736525"></a>Install
		Test</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">This assumes that the
SW TPM has been installed, see this link:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><font color="#0000ff"><span lang="en-US"><u><a class="western" href="https://sourceforge.net/projects/ibmtpm20tss/?source=navbar"><span lang="en-US">https://sourceforge.net/projects/ibmtpm20tss/?source=navbar</span></a></u></span></font></p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">It also assumes that
the regression test has been installed.  See Section 7.5.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">In reg.sh, change the
utility prefix variable to tss.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">PREFIX=tss</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Run the regression
test:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; cd
~/rpmbuild/BUILD/tss2-nnn/utils</p>
<p class="western" style="margin-bottom: 0in">&gt; ./reg.sh</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="5">
		<li><h2 class="western"><a name="__RefHeading___Toc485736526"></a><a name="_Ref456884269"></a>
		Source rpms</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Install source (as
non-root user)</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; rpm -ivh
tss2-nnn-1.el6.src.rpm</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The src rpm has a
tarball and spec file.  To build:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">&gt; cd ~/rpmbuild</p>
<p class="western" style="margin-bottom: 0in">&gt; rpmbuild -bp
SPECS/tss2.spec</p>
<p class="western" style="margin-bottom: 0in">&gt; cd
BUILD/tss2-nnn/utils</p>
<p class="western" style="margin-bottom: 0in">&gt; make -f
makefile.fedora</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol start="8">
	<li><h1 class="western" align="justify" style="margin-top: 0.25in; margin-bottom: 0.17in; page-break-before: always"><a name="__RefHeading___Toc485736527"></a>
	<font size="2" style="font-size: 11pt">Status</font></h1>
	<ol>
		<li><h2 class="western"><a name="__RefHeading___Toc485736528"></a>Utilities</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The utilities serve
several purposes:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">They are called by
	a bash or bat script to form the regression test.  
	</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-left: 0.5in; margin-bottom: 0in">The
bash regression test script itself is sample code for how to use the
utilities and the TPM to perform multi-step tasks.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">They are sample
	code on how to use the TSS.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">They can be used
	in a script for rapid prototyping.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">NOTE:  The utility
command line arguments are not stable.  They change occasionally to
improve consistency among utilities or to add features</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The utilities currently
do not permit all TPM command options.  Let me know what needs
enhancement.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="2">
		<li><h2 class="western"><a name="__RefHeading___Toc485736529"></a>Bugs</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">Please report bugs.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ol>
	<ol start="3">
		<li><h2 class="western"><a name="__RefHeading___Toc485736530"></a>Untested</h2>
	</ol>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">These may &quot;just
work&quot; but they have not been tested yet.  
</p>
<p class="western" style="margin-bottom: 0in">Users are welcome to
suggest ECC tests and prioritize the below list.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">ECC commands -
	ECDH_KeyGen, ECDH_ZGen, ZGen_2Phase. Commit, EC_Ephemeral</p>
	<li><p class="western" style="margin-bottom: 0in">Several policy
	commands (PolicyNameHash, PolicyDuplicationSelect, PolicyLocality)</p>
	<li><p class="western" style="margin-bottom: 0in">TestParams,
	GetTestResult</p>
</ul>
<p style="margin-left: 0.5in; margin-bottom: 0.14in; line-height: 115%">
<br><br>
</p>
<ol start="9">
	<li><h1 class="western" align="justify" style="margin-top: 0.25in; margin-bottom: 0.17in; page-break-before: always"><a name="__RefHeading___Toc485736531"></a>
	<font size="2" style="font-size: 11pt">Theading</font></h1>
</ol>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">The TSS is not thread
safe.</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">There are many issues
with making a TSS thread safe, because the TPM is inherently single
threaded.  For example:</p>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<ul>
	<li><p class="western" style="margin-bottom: 0in">There is only one
	channel to a TPM.  Two threads writing bytes to a socket to a
	resource manager or simulator, or writing bytes to the device
	driver, will fail.</p>
	<li><p class="western" style="margin-bottom: 0in">The TPM has
	session state that has to be coordinated with an application.  For
	example, if a thread begins to calculate an HMAC for a session, and
	another thread uses the session, the rolling nonces will cause the
	first thread HMAC to fail.</p>
	<li><p class="western" style="margin-bottom: 0in">Applications have
	state at a higher level.  For example, if a thread begins to use a
	key and another thread saves the key context and flushes the key,
	the first thread's application will fail.</p>
</ul>
<p class="western" style="margin-bottom: 0in"><br>
</p>
<p class="western" style="margin-bottom: 0in">I think the best we can
do is provide a common &quot;TSS lock semaphore&quot; mechanism, so
that threads can coordinate access to the TSS using a common API.</p>
<p class="western" style="margin-bottom: 0in; display: none"><a name="_PictureBullets"></a>
<br>
</p>
<div title="footer">
	<p style="margin-top: 0.46in; margin-bottom: 0in"><font size="3" style="font-size: 11pt">	Page
	<sdfield type=PAGE subtype=RANDOM format=PAGE>31</sdfield>	</font></p>
</div>
</body>
</html>