You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/SWTPM.md
+56-54Lines changed: 56 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,90 +1,91 @@
1
1
# wolfTPM with Software Simulator (SWTPM) support
2
2
3
-
wolfTPM is to be able to interface with software TPM (SW TPM) interfaces defined by section D.3 of [TPM-Rev-2.0-Part-4-Supporting-Routines-01.38-code](https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-4-Supporting-Routines-01.38-code.pdf)
3
+
wolfTPM is to be able to use Software TPM (SW TPM) defined by section D.3 of [TPM-Rev-2.0-Part-4-Supporting-Routines-01.38-code](https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-4-Supporting-Routines-01.38-code.pdf)
4
4
5
-
The SWTPM interface is not compatible with TIS or devtpm (/dev/tpm0). Transport is a socket connection by default, but can also be a UART.
5
+
Software TPM implementations tested:
6
+
*[Official TCG Reference](https://github.com/TrustedComputingGroup/TPM): Reference code from the specification maintained by TCG [build steps](#tcg-tpm)
7
+
*[IBM / Ken Goldman](https://github.com/kgoldman/ibmswtpm2): Fork of reference code maintained by IBM [build steps](#ibmswtpm2)
8
+
*[Microsoft](https://github.com/microsoft/ms-tpm-20-ref): Fork of reference code maintained by Microsoft (93% identical to official TCG) [build steps](#ms-tpm-20-ref)
9
+
*[Stefan Berger](https://github.com/stefanberger/swtpm): Uses libtpms front end interfaces. [build steps](#swtpm)
6
10
7
-
This implementation only uses the TPM command interface typically on port 2321. It does not support the Platform interface typically on port 2322.
11
+
The software TPM transport is a socket connection by default, but we also support a UART.
8
12
9
-
Software TPM implementations tested:
10
-
*https://github.com/kgoldman/ibmswtpm2 or https://sourceforge.net/projects/ibmswtpm2/files/
11
-
*https://github.com/microsoft/ms-tpm-20-ref
12
-
*https://github.com/stefanberger/swtpm
13
+
This implementation only uses the TPM command interface typically on port 2321. It does not support the Platform interface typically on port 2322.
13
14
14
-
## Building SW TPM support
15
+
## wolfTPM SWTPM support
15
16
16
-
By default a socket transport will be used.
17
+
To enable the socket transport for SWTPM use `--enable-swtpm`. By default all software TPM simulators use TCP port 2321.
17
18
18
19
```sh
19
20
./configure --enable-swtpm
20
21
make
21
22
```
22
23
23
-
### Build SW TPM with UART transport
24
+
Note: It is not possible to enable more than one transport interface at a time. If building with SWTPM socket interface the built-in TIS and devtpm (/dev/tpm0) interfaces are not available.
24
25
25
-
```sh
26
-
./configure --enable-swtpm=uart
27
-
make
28
-
```
29
-
30
-
## Build Options
26
+
Build Options:
31
27
32
28
*`WOLFTPM_SWTPM`: Use socket transport (no TIS layer)
33
-
*`TPM2_SWTPM_HOST`: The serial device to use (default=/dev/ttyS0)
34
-
*`TPM2_SWTPM_PORT`: The baud rate (default=115200)
35
-
*`WOLFTPM_SWTPM_UART`: Use UART transport (no TIS layer)
29
+
*`TPM2_SWTPM_HOST`: The socket host (default is localhost)
30
+
*`TPM2_SWTPM_PORT`: The socket port (default is 2321)
31
+
32
+
## Using a SWTPM
33
+
34
+
### SWTPM Power Up and Startup
36
35
37
-
## SWTPM simulator setup
36
+
The TCG TPM and Microsoft ms-tpm-20-ref implementations require sending power up and startup commands on the platform interface before the command interface is enabled. You can use these commands to issue the required power up and startup:
0 commit comments