Code Monkey home page Code Monkey logo

twpm-docs's Introduction

About

This repository contains source code for the Trustworthy Platform Module (TwPM) documentation webpage

Contribution

Please make sure to follow the steps below before publishing your changes as a merge request.

Local build

virtualenv -p $(which python3) venv
source venv/bin/activate
pip install -r requirements.txt
mkdocs serve

By default, it will host a local copy od documentation at: http://0.0.0.0:8000/.

It is very important at this point to verify that the pages you have changed render correctly as HTML in local preview.

Make sure no TBD or TODO content is displayed

Find all occurrences:

grep -E "TBD|TODO" docs/**/*.md -r

Iterate over all occurrences and check if:

  • file, where TBD or TODO occurs, is displayed (included in nav section of mkdocs.yml)
  • TBD or TODO is visible on the website

There should be no TBD or TODO visible on the website.

pre-commit hooks

pre-commit install --hook-type commit-msg
  • Enjoy automatic checks on each git commit action!

  • (Optional) Run hooks on all files (for example, when adding new hooks or configuring existing ones):

pre-commit run --all-files

To skip verification

In some cases, it may be needed to skip pre-commit tests. To do that, please use:

git commit --no-verify

Funding

This project was partially funded through the NGI Assure Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 957073.

         

twpm-docs's People

Contributors

3mdeb-karolzmyslowski avatar arturkow2 avatar beatazdunczyk avatar krystian-hebel avatar macpijan avatar pietrushnic avatar pre-commit-ci[bot] avatar stojak139808 avatar stojek139808 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

twpm-docs's Issues

11. Manufacturing process

Each TPM must be individually manufactured. This consists of committing vendor certificate for TPM's primary Endorsement Key (EK) to its nonvolatile memory. As each EK is unique, so is its certificate, and it must be sign by key which chain of trust is rooted in publicly available vendor's root certificate.

Milestones:

  • create manufacturing process
  • post the process on the documentation site
  • create script for automation of manufacturing process
  • review and update existing documentation, add entry to changelog

6. Base tests

For testing of the implementation done so far, a subset of tpm2-tools commands will be used. Only commands that do not depend on Protected Storage, RNG and Primary Keys Certificates will be tested at this point.

Milestone:

  • test suite: PCR operations (read, extend, reset values, locality protection)
  • test suite: object creation (primary, ordinary, derived objects of various types)
  • test suite: cryptographic support functions (hash, HMAC, encryption, signing)
  • documentation of results
  • review and update existing documentation, add entry to changelog

3. Implement LPC protocol in FPGA

While the newest computers use SPI for connecting TPM devices to the mainboard, slightly older, but still widely used hardware uses Low Pin Count (LPC) interface. Implementing this protocol at software level through bit-banging would require very high speed micro-controllers, which would make the cost and power consumption unreasonably high. To the best of our knowledge, there are no MCUs that have LPC controller included as a hardware part of SoC, due to the fact that LPC is specific to PC only. For these reasons hardware implementation is required.

Milestones:

  • design and implementation of LPC peripheral in Verilog
  • simulation of synthesized code
  • documentation describing connection between designed TPM and mainboard
  • review and update existing documentation, add entry to changelog

12. Customizable configuration

Platforms other than the reference one may support different functionalities, or may have limited performance. To make transition to different hardware easier, some options should be made configurable. This may include available hash algorithms in TPM stack, physical interface used (LPC or SPI), presence of hardware RNG engine, amount of nonvolatile memory.

Milestones:

  • create easy to use build system integrating whole stack
  • prepare configuration file for whole project
  • review and update existing documentation, add entry to changelog

4. Implement basic TPM registers in FPGA

Most of the hardware TPM registers must return result immediately or almost immediately. MCUs and their communication with FPGA are not fast enough to acknowledge, parse, prepare response and send it to host in time. Hardware implementation is required for registers that require fast response.

Milestones:

  • implementation of TPM register space
  • implementation of finite state machine for changing localities
  • review and update existing documentation, add entry to changelog

7. Implement SPI TPM protocol

SPI implementation on MCU may not be feasible because some of the registers must return proper values immediately. This task consists of repeating all the tasks that were done on FPGA side for LPC, but this time SPI is used as physical interface.

Milestones:

  • design and implementation of SPI peripheral in Verilog
  • simulation of synthesized code
  • documentation describing connection between designed TPM and mainboard
  • implementation of TPM register space
  • review and update existing documentation, add entry to changelog

1. Public site with documentation

All of the documentation produced during this project should be publicly available to users and developers.

Milestones:

  • create repositories for the project
  • prepare server and domain name
  • describe project's purpose and phases
  • create placeholders for description of deviations from TPM specification, software stack and documentation
  • changelog that will be updated after each of the remaining phases

9. Flash driver for TPM stack

Nonvolatile storage is an integral part of TPM. It allows for saving user- or vendor-defined data inside TPM, potentially with protection based on state of TPM (PCR values, authorization sessions). With NVRAM implemented, additional tests can be performed.

Milestones:

  • flash driver for chosen board (if not available yet or has limited support)
  • integration of the TPM stack with flash driver
  • test suite: NV memory (persistent objects and data, vendor certificates)
  • test suite: attestation and authorization (quote, authorization sessions)
  • test suite: use in real-world scenario (Fobnail)
  • review and update existing documentation, add entry to changelog

5. Implement TPM command parsing and communication between FPGA and MCU

Minimal parsing of commands and responses (limited to just their sizes) must be done on FPGA side in order to properly set status bits that host can use to check whether TPM expects more bytes of command or has more bytes of response. Full command parsing and execution takes place on MCU, so FPGA has to implement and expose buffer with command sent by host, along with any required metadata like type of message in the buffer or currently active locality.

Milestones:

  • implementation of FIFO on FPGA
  • implementation of command machine state
  • design, implementation and documentation of protocol of communication between FPGA and MCU
  • application code for reading data from FIFO, passing parsed commands to the TPM stack and writing responses back to FIFO
  • review and update existing documentation, add entry to changelog

2. Gather hardware requirements and choose target board

TPMs are connected to the mainboard of PC. They have maximum allowed power consumption and boot time. Based on those requirements and additional factors like cost, availability and ease of use with open source tools we have to choose a board for reference implementation.

Milestones:

  • documentation of hardware requirements
  • analysis and comparison of available boards
  • establishment of reference board
  • review and update existing documentation, add entry to changelog

10. Unique identification and randomness source

Each TPM has to be uniquely identifiable. This uniqueness is used e.g. to create primary seeds which are used to derive primary keys for various hierarchies. Random number generator is also included in this task - unique registers (with e.g. serial numbers) and RNG engines are usually specific to the given hardware. FPGA can also be used if any of those isn't available or doesn't have enough entropy on MCU.

Milestones:

  • find and obtain enough bits of unique data identifying the platform
  • find and obtain enough bits of entropy for seeding PRNG
  • test suite: Windows HLK
  • review and update existing documentation, add entry to changelog

8. Explore the usage of using simpler hardware platform

Additionally, we want to explore whether we can meet the TPM specification requirements using simpler (and cheaper) microcontroller platform (with no FPGA involved). That may not be feasible due to the hardware limitations, but it is a great potential opportunity of increasing the adoption of the solution, so that is why believe it makes sense to try to purse that and publish the results.

Milestones:

  • explore usage of the solution using simpler hardware platform (with no FPGA)
  • publish test results to the public documentation website
  • review and update existing documentation, add entry to changelog

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.