@@ -7,7 +7,7 @@ Portable TPM 2.0 project designed for embedded use.
77
88* This implementation provides all TPM 2.0 API's in compliance with the specification.
99* 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- * 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.
10+ * Testing done using TPM 2.0 modules from STMicro ST33 (SPI/I2C), Infineon OPTIGA SLB9670/SLB9672, Microchip ATTPM20, Nations Tech Z32H330TC/NS350 and Nuvoton NPCT650/NPCT750.
1111* wolfTPM uses the TPM Interface Specification (TIS) to communicate either over SPI, or using a memory mapped I/O range.
1212* wolfTPM can also use the Linux TPM kernel interface (` /dev/tpmX ` ) to talk with any physical TPM on SPI, I2C and even LPC bus.
1313* Platform support for Raspberry Pi (Linux), MMIO, STM32 with CubeMX, Atmel ASF, Xilinx, QNX Infineon TriCore and Barebox.
@@ -27,10 +27,11 @@ Portable TPM 2.0 project designed for embedded use.
2727 * Attestation (activate and make credential)
2828 * Benchmarking TPM algorithms and TLS
2929 * Key Generation (primary, RSA/ECC and symmetric), loading and storing to flash (NV memory)
30- * Sealing and Unsealing data with an RSA key
30+ * Sealing and Unsealing data with an RSA key or externally signed policy.
3131 * Time signed or set
3232 * PCR read/reset
3333 * GPIO configure, read and write.
34+ * Endrosement Key/Cert retreival and validation.
3435* Parameter encryption support using AES-CFB or XOR.
3536* Support for salted unbound authenticated sessions.
3637* Support for HMAC Sessions.
@@ -99,8 +100,8 @@ Tested with:
99100 - LetsTrust: Vendor for TPM development boards [ http://letstrust.de ] ( http://letstrust.de ) .
100101* STMicro STSAFE-TPM, ST33TPHF2XSPI/2XI2C and ST33KTPM2X (SPI and I2C)
101102* Microchip ATTPM20 module
102- * Nuvoton NPCT65X or NPCT75x TPM2.0 module
103- * Nations Technologies Z32H330 TPM 2.0 module
103+ * Nuvoton NPCT65X or NPCT75x TPM2.0 modules
104+ * Nations Technologies Z32H330 or NS350 TPM 2.0 modules
104105
105106#### Device Identification
106107
@@ -132,9 +133,13 @@ Microchip ATTPM20
132133TPM2: Caps 0x30000695, Did 0x3205, Vid 0x1114, Rid 0x 1
133134Mfg MCHP (3), Vendor , Fw 512.20481 (0), FIPS 140-2 0, CC-EAL4 0
134135
135- Nations Technologies Inc. TPM 2.0 module
136+ Nations Technologies Inc. Z32H330 TPM 2.0 module
136137Mfg NTZ (0), Vendor Z32H330, Fw 7.51 (419631892), FIPS 140-2 0, CC-EAL4 0
137138
139+ Nations Technologies Inc. NS350 TPM 2.0 module
140+ TPM2: Caps 0x30000615, Did 0x0701, Vid 0x9999, Rid 0x 1
141+ Mfg NSG (0), Vendor NS350, Fw 30.30 (0x24042510), FIPS 140-2 1, CC-EAL4 0
142+
138143Nuvoton NPCT650 TPM2.0
139144Mfg NTC (0), Vendor rlsNPCT , Fw 1.3 (65536), FIPS 140-2 0, CC-EAL4 0
140145
@@ -253,6 +258,11 @@ Build wolfTPM:
253258make
254259```
255260
261+ ### Building Nations Tech
262+
263+ Use ` ./configure ` with defaults. All TPM 2.0 modules are compatible.
264+ The Nations NS350 Raspberry Pi TPM 2.0 module uses ` /dev/spidev0.0 ` . The TPM wait states are required (on by default with WOLFTPM_CHECK_WAIT_STATE).
265+
256266### Building Espressif ESP-IDF
257267
258268See the wolfTPM-specific settings in the wolfSSL ` user_settings.h ` file, typically found in ` [project]/components/wolfssl/include ` .
@@ -334,6 +344,18 @@ cmake --build .
334344
335345These examples demonstrate features of a TPM 2.0 module. The examples create RSA and ECC keys in NV for testing using handles defined in ` ./hal/tpm_io.h ` . The PKCS #7 and TLS examples require generating CSR's and signing them using a test script. See ` examples/README.md ` for details on using the examples. To run the TLS sever and client on same machine you must build with ` WOLFTPM_TIS_LOCK ` to enable concurrent access protection.
336346
347+ ### TPM2 Capabilities
348+
349+ Simple test that gets TPM capabilities and search for any persistent handles.
350+
351+ ```
352+ ./examples/wrap/caps
353+ TPM2 Get Capabilities
354+ wolfSSL Entering wolfCrypt_Init
355+ Mfg NSG (0), Vendor NS350, Fw 30.30 (0x24042510), FIPS 140-2 1, CC-EAL4 0
356+ Found 2 persistent handles
357+ ```
358+
337359### TPM2 Wrapper Tests
338360
339361```
@@ -556,7 +578,7 @@ ECDSA 256 verify 24 ops took 1.031 sec, avg 42.970 ms, 23.272 ops/sec
556578ECDHE 256 agree 16 ops took 1.023 sec, avg 63.934 ms, 15.641 ops/sec
557579```
558580
559- Run on Nations Technologies Inc. TPM 2.0 module at 33MHz:
581+ Run on Nations Technologies Inc. Z32H330 TPM 2.0 module at 33MHz:
560582
561583```
562584./examples/bench/bench
@@ -588,6 +610,43 @@ ECDSA 256 verify 28 ops took 1.030 sec, avg 36.785 ms, 27.185 ops/sec
588610ECDHE 256 agree 26 ops took 1.010 sec, avg 38.847 ms, 25.742 ops/sec
589611```
590612
613+ Run on Nations Technologies Inc. NS350 TPM 2.0 module at 33MHz:
614+
615+ ```
616+ ./examples/bench/bench
617+ TPM2 Benchmark using Wrapper API's
618+ Use Parameter Encryption: NULL
619+ RNG 6 KB took 1.052 seconds, 5.703 KB/s
620+ Benchmark symmetric AES-128-CBC-enc not supported!
621+ Benchmark symmetric AES-128-CBC-dec not supported!
622+ Benchmark symmetric AES-256-CBC-enc not supported!
623+ Benchmark symmetric AES-256-CBC-dec not supported!
624+ Benchmark symmetric AES-128-CTR-enc not supported!
625+ Benchmark symmetric AES-128-CTR-dec not supported!
626+ Benchmark symmetric AES-256-CTR-enc not supported!
627+ Benchmark symmetric AES-256-CTR-dec not supported!
628+ Encrypt/Decrypt unavailable
629+ AES-128-CFB-enc 0 bytes took 0.005 seconds, 0.000 bytes/s
630+ Encrypt/Decrypt unavailable
631+ AES-128-CFB-dec 0 bytes took 0.006 seconds, 0.000 bytes/s
632+ Encrypt/Decrypt unavailable
633+ AES-256-CFB-enc 0 bytes took 0.006 seconds, 0.000 bytes/s
634+ Encrypt/Decrypt unavailable
635+ AES-256-CFB-dec 0 bytes took 0.005 seconds, 0.000 bytes/s
636+ SHA1 68 KB took 1.003 seconds, 67.772 KB/s
637+ SHA256 68 KB took 1.002 seconds, 67.871 KB/s
638+ SHA384 66 KB took 1.007 seconds, 65.548 KB/s
639+ RSA 2048 key gen 7 ops took 16.652 sec, avg 2378.893 ms, 0.420 ops/sec
640+ RSA 2048 Public 126 ops took 1.005 sec, avg 7.980 ms, 125.321 ops/sec
641+ RSA 2048 Private 20 ops took 1.035 sec, avg 51.735 ms, 19.329 ops/sec
642+ RSA 2048 Pub OAEP 81 ops took 1.008 sec, avg 12.443 ms, 80.366 ops/sec
643+ RSA 2048 Priv OAEP 19 ops took 1.027 sec, avg 54.033 ms, 18.507 ops/sec
644+ ECC 256 key gen 20 ops took 1.042 sec, avg 52.095 ms, 19.196 ops/sec
645+ ECDSA 256 sign 60 ops took 1.009 sec, avg 16.816 ms, 59.466 ops/sec
646+ ECDSA 256 verify 46 ops took 1.008 sec, avg 21.921 ms, 45.618 ops/sec
647+ ECDHE 256 agree 38 ops took 1.008 sec, avg 26.532 ms, 37.691 ops/sec
648+ ```
649+
591650Run on Nuvoton NPCT650:
592651
593652```
0 commit comments