Skip to content
/ tpm-js Public
forked from google/tpm-js

Learn how to use your Trusted Platform Module (TPM) 2.0

License

Notifications You must be signed in to change notification settings

SPAIRL/tpm-js

 
 

Repository files navigation

Interactive TPM simulator with codelabs

Overview

TPM-JS lets you experiment with a software TPM device in your browser. It's an educational tool that teaches you how to use a TPM device to secure your workflows. The codelab like sessions cover topics such as key generation, measured boot, remote attestation and sealing.

Screenshots

Welcome screen: Welcome Screen

Keys codelab: Keys codelab

PCRs codelab: PCRs codelab

Architecture

TPM-JS includes the following libraries:

The libraries are compiled to WebAssembly, and accessed via Javascript.

Dependencies

Build

Initialize git submodules:

git submodule update --init

Activate emsdk:

source {EMSDK PATH}/emsdk_env.sh

Build TPM-JS:

mkdir bulid-web
cd build-web
emcmake cmake ..
make -j4

Run unit-tests:

make check

Alternatively, you can build the project using the provided Docker file.

One time initialization:

./dcmake.sh

Then build using:

./dmake.sh -j4

Serve Files

Add the line application/wasm wasm to /etc/mime.types.

Serve files from the built web package:

cd build-web/web
python3 -m http.server --bind 127.0.0.1 8000

Disclaimer

This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.

About

Learn how to use your Trusted Platform Module (TPM) 2.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 45.4%
  • HTML 35.9%
  • JavaScript 13.9%
  • CMake 2.5%
  • Dockerfile 1.1%
  • CSS 0.5%
  • Other 0.7%