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: README.md
+53-14Lines changed: 53 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,19 +5,19 @@ Portable TPM 2.0 project designed for embedded use.
5
5
6
6
## Project Features
7
7
8
-
* This implementation provides all TPM 2.0 API’s in compliance with the specification.
8
+
* This implementation provides all TPM 2.0 API's in compliance with the specification.
9
9
* Wrappers provided to simplify Key Generation/Loading, RSA encrypt/decrypt, ECC sign/verify, ECDH, NV, Hashing/HACM, AES, Sealing/Unsealing, Attestation, PCR Extend/Quote and Secure Root of Trust.
10
10
* Testing done using TPM 2.0 modules from STMicro ST33 (SPI/I2C), Infineon OPTIGA SLB9670/SLB9672, Microchip ATTPM20, Nations Tech Z32H330TC and Nuvoton NPCT650/NPCT750.
11
11
* wolfTPM uses the TPM Interface Specification (TIS) to communicate either over SPI, or using a memory mapped I/O range.
12
-
* wolfTPM can also use the Linux TPM kernel interface (/dev/tpmX) to talk with any physical TPM on SPI, I2C and even LPC bus.
12
+
* wolfTPM can also use the Linux TPM kernel interface (`/dev/tpmX`) to talk with any physical TPM on SPI, I2C and even LPC bus.
13
13
* Platform support for Raspberry Pi (Linux), MMIO, STM32 with CubeMX, Atmel ASF, Xilinx, QNX Infineon TriCore and Barebox.
14
14
* The design allows for easy portability to different platforms:
15
15
* Native C code designed for embedded use.
16
16
* Single IO callback for hardware SPI interface.
17
17
* No external dependencies.
18
18
* Compact code size and minimal memory use.
19
19
* Includes example code for:
20
-
* Most TPM2 native API’s
20
+
* Most TPM2 native API's
21
21
* All TPM2 wrapper API's
22
22
* PKCS 7
23
23
* Certificate Signing Request (CSR)
@@ -64,19 +64,29 @@ Contains hash digests for SHA-1 and SHA-256 with an index 0-23. These hash diges
64
64
This project uses the terms append vs. marshall and parse vs. unmarshall.
65
65
66
66
Acronyms:
67
+
* HAL: Hardware Abstraction Layer.
67
68
* NV: Non-Volatile memory.
69
+
* TPM: Trusted Platform Module.
68
70
69
71
## Platform
70
72
71
73
The examples in this library are written for use on a Raspberry Pi and use the `spi_dev` interface.
72
74
73
75
### IO Callback (HAL)
74
76
75
-
See the HAL manual in [`hal/README.md](hal/README.md).
77
+
See the HAL manual in [hal/README.md](hal/README.md).
76
78
77
79
For interfacing to your hardware interface (SPI/I2C) a single HAL callback is used and configuration on initialization when calling `TPM2_Init` or `wolfTPM2_Init`.
78
80
79
-
There are HAL examples in `hal` directory for Linux, STM32 CubeMX, Atmel ASF, Xilinx, Infineon TriCore and BareBox.
81
+
There are HAL examples in `hal` directory for:
82
+
83
+
* Atmel ASF
84
+
* BareBox
85
+
* Espressif ESP-IDF
86
+
* Infineon TriCore
87
+
* Linux
88
+
* STM32 CubeMX
89
+
* Xilinx
80
90
81
91
We also support an advanced IO option (`--enable-advio`/`WOLFTPM_ADV_IO`), which adds the register and read/write flag as parameter to the IO callback. This is required for I2C support.
@@ -188,7 +212,7 @@ Support for SLB9670 or SLB9672 (SPI) / SLB9673 (I2C)
188
212
189
213
Build wolfTPM:
190
214
191
-
```
215
+
```bash
192
216
git clone https://github.com/wolfSSL/wolfTPM.git
193
217
cd wolfTPM
194
218
./autogen.sh
@@ -200,7 +224,7 @@ make
200
224
201
225
Build wolfTPM:
202
226
203
-
```
227
+
```bash
204
228
./autogen.sh
205
229
./configure --enable-st33 [--enable-i2c]
206
230
make
@@ -210,7 +234,7 @@ make
210
234
211
235
Build wolfTPM:
212
236
213
-
```
237
+
```bash
214
238
./autogen.sh
215
239
./configure --enable-microchip
216
240
make
@@ -220,27 +244,42 @@ make
220
244
221
245
Build wolfTPM:
222
246
223
-
```
247
+
```bash
224
248
./autogen.sh
225
249
./configure --enable-nuvoton
226
250
make
227
251
```
228
252
253
+
### Building Espressif ESP-IDF
254
+
255
+
See the wolfTPM-specific settings in the wolfSSL `user_settings.h` file, typically found in `[project]/components/wolfssl/include`.
256
+
257
+
```bash
258
+
git clone https://github.com/wolfSSL/wolfTPM.git
259
+
cd wolfTPM/IDE/Espressif
260
+
261
+
# set your path to ESP-IDF, shown here for VisualGDB using v5.2
262
+
WRK_IDF_PATH=/mnt/c/SysGCC/esp32/esp-idf/v5.2
263
+
264
+
.${WRK_IDF_PATH}/export.sh
265
+
idf.py build
266
+
```
267
+
229
268
### Building for "/dev/tpmX"
230
269
231
270
This build option allows you to talk to any TPM vendor supported by the Linux TIS kernel driver
232
271
233
272
Build wolfTPM:
234
273
235
-
```
274
+
```bash
236
275
./autogen.sh
237
276
./configure --enable-devtpm
238
277
make
239
278
```
240
279
241
280
Note: When using a TPM device through the Linux kernel driver make sure sufficient permissions are given to the application that uses wolfTPM, because the "/dev/tpmX" typically has read-write permissions only for the "tss" user group. Either run wolfTPM examples and your application using sudo or add your user to the "tss" group like this:
242
281
243
-
```
282
+
```bash
244
283
sudo adduser yourusername tss
245
284
```
246
285
@@ -258,7 +297,7 @@ CMake supports compiling in many environments including Visual Studio
258
297
if CMake support is installed. The commands below can be run in
259
298
`Developer Command Prompt`.
260
299
261
-
```
300
+
```bash
262
301
mkdir build
263
302
cd build
264
303
# to use installed wolfSSL location (library and headers)
0 commit comments