How can I access the TPM chip on the "netFIELD Compact X8MC Next" device?

Q

How can I access the TPM chip on the "netFIELD Compact X8MC Next" device?

A

General information

The device "netFIELD Compact X8MC Next" is equipped with a Trusted Platform Module (TPM) 2.0 security chip, specifically of type SLB9760 or higher.

The operating system running on this device makes the chip available under the device folder "/dev/tpm0".

You can verify the presence and recognition of this chip within the OS context by using the following kernel debug message command:

	dmesg | grep tpm -i

TPM access

The "netFIELD Compact X8MC Next" device supports extending its functionality through software running in containers. To access the TPM, you need a suitable container to run additional TPM access software. Here is a exemplary approach how to access the TPM over a linux command line:


  1. A basic setup can be achieved by first installing a Debian container from the following link: Debian Container on Docker Hub.
  2. Access the container over a remote SSH connection (at default SSH port 23 as it is configured for this container) using a tool such as putty.
    By default this container runs in privileged mode and this grants full access to all "/dev/" devices that are mapped into the container automatically. With other containers make sure you have mapped at least the device "/dev/tmp0" with the container start option "--device [source path]:[destination path]"

  3. Call first
    sudo apt update 
  4. Call then the following line to install additional command line tools (documentation)
    sudo apt install tpm2_tools

  5. Then call the following line to generate a 20 digits long random number over the TPM chip
    tpm2_getrandom --hex 20