Skip to content

Latest commit

 

History

History
77 lines (45 loc) · 2.01 KB

2.-lab-setup.md

File metadata and controls

77 lines (45 loc) · 2.01 KB

2. Lab Setup

Ready-to-use docker environment for the labs

ost2-tpm-docker

The software used

tpm2-tools

Software TPM

Download and run the image

docker run --name tpmlab -w ~/lab -it -d --platform=linux/amd64 -e TPM2TOOLS_TCTI=mssim:host=localhost,port=2321 tpmdev/tpm2-runtime:latest

Note: Windows users should use -w "/mnt/host/c/Users/WHEREVER/YOUR/LAB/FOLDER" to specify a working folder for docker.

docker attach tpmlab

Start the TPM2 simulator

tpm_server > tpm.log &
tpm2_startup -c

Verify the lab environment

Generate eight random bytes from the TPM to test that your laboratory environment is working

tpm2_getrandom 8 > randombytes
xxd randombytes

Web environment

Use the docker playground online

Login Requires a free-of-charge account from hub.docker.com

Start the playground and follow the previous given commands.

Useful links

OST2 ready-to-use docker image

Web playground for docker

TPM2 simulator

TPM2 tools

TPM2 library stack

(Optional) Using a hardware TPM

Using a computer with dedicated TPM is possible

These instructions are optional. We recommend using the OST2 TPM docker environment for this course.

Limitations when using a hardware TPM for training

  • Windows TBS restricts access to some TPM functionalities
  • MacOS does not have a TPM

Requirements

  • Need to manually install the tpm2-tss TPM2 library stack
  • Need to manually install the tpm2-tools
  • May require to configure user permissions for /dev/tpm0