# Meeting Notes - tpm-rs call on Oct 15

- Date: Tuesday Oct 15
- Time: 5pm CET / 8 AM PT

## Roadmap Planning

### Long Term Plans/Objective

- Shared goals
    - As pitched to Board (nontechnical, more vision)
        - Increase awareness and profile of TCG in open-source development
        - Engage the broader TPM community, including participants outside TCG
        - Explore how Rust's language features can serve TPM (e.g., memory safety)
        - Attempt to implement the TPM 2.0 reference code using Rust
        - Figure out [un]marshalling, policies, sessions
        - May grow to include ancillary components such as a simulator, client libraries, tests, and/or a TSS (authored or adapted to work in or with Rust)
        - Identify the value of the work that can be shared with participant companies so they can support/continue to support
    - Technical
        - Replace the C reference code with Rust reference code
        - Have a good Rust client (because TPM implementation and client share a lot of code)
        - **Ahmed**: is rust client meant to replace TSS?
            Answer: Roughly like go-tpm, where commands map 1 to 1 with commands in the TPM specifications with no restriction on API comaptiability with any particular standard.
- Google expectations and commitments
    - Trent is working on tpm-rs as a "20% project" but commits to responding to comments/PRs promptly
    - Primary focus is on a Rust-based TPM client but happy to help with whatever needs help
    - Chris is funded less than 20% but commits to helping facilitate however possible. Long-term vision: Replace the C reference code with Rust
    - Other Googlers may get involved soon -- we have been doing internal trainings on Rust with Trent and Chris's team. There are some folks who might be ready to pick up smaller changes once they are defined.
- Huawei expectations and commitments
    - Silviu is working in a coordinator role
    - Ahmed is focused on building the TPM implementation (server). Somewhere between 40-50% allocated
    - Thomas is around 20% allocated to the project, not focused on either client/server aspects. Interested in security aspects
- Microsoft expectations and commitment
    - TODO, we can let them speak for themselves next time. We do know they are a bit more interested on the server/implementation side.

- Strategy
    - We aren't to a "shovel ready" state yet (where random people can join and start implementing things)
    - We are focused on getting to that state, which is like an MVP for the project

- Current priorities
    - (Trent) Code health cleanups - polish on the prototype to clean up things like monoliths. Help find the right abstractions for the base layers of things to make it easier for new people to come in and participate.
    - (Google) Eventually replace the C client with the Rust client when it's ready. Eventually replace the C reference implementation with a Rust implementation when it's ready. No hard deadline at this time.

- What's a successful tpm-rs client?
    - (Google) Something close to 1:1 to TPM 2.0 API. Room for helper code for handling things like sessions, or policies, etc. We like the current level of abstraction of go-tpm (which is 1:1 to commands but can also take care of auth sessions and parameter encryption for you). The closest TCG TSS thing would be ESAPI
    - (Huawei) Client can be used to help with CI/test-driven-development for the server side. Whatever abstractions that serve this purpose are good enough.
    - Lots of implementation details to-be-decided about e.g., marshalling, when to return an error, etc.

- What's our MVP?
    - A client that supports 1-2 commands
    - A server that supports 1-2 commands
    - Tests for each against the TCG C implementations and each other.

- MVP Integration Test 1
    - _Forcing function for basic interactions with the TPM_
    - (GetRandom) Generate some random bits

- MVP Integration Test 2
    - _Forcing functions for policy and non-policy sessions and paramter encryption_
    - (CreatePrimary) Make the EK for sealing blobs
    - (StartAuthSession) Create sessions to auth the EK and the blob
    - (PolicySecret) Satisfy the EK policy
    - (Create) Seal a blob to the EK, using the EK policy, with a decrypt session
    - (Load) Load the blob
    - (Unseal) Unseal the blob with an encrypt session
    - (FlushContext) Flush the blob and SRK

- Is the client intended to be more than test suite for the server?

- Is there usecases we should take in consideration for the server or the client?

### Short Term Plans
- _**Ahmed**_: ~~Continue on implementing sessions infrastructure:~~
    ~~- Implement HMAC based sessions from client side.~~
    ~~- Implement client API for:~~
        ~~- `TPM2_StartAuthSessions` Command (For testing Hmac Sessions).~~
    work torwards MVP 1
- _**Trent**_: Splitting up monoliths, foundational work, error handling. Make it easy to move on to the MVP steps

## Issues and Pull Requests

- [#4 Create pwn-safe CI pipeline to build hello world](https://github.com/tpm-rs/tpm-rs/issues/4)
    - Can anyone from outside TPM-rs trigger CI?
    A: No, at least not in the cases where they modify the github workflow.
    This was confirmed by [#111](https://github.com/tpm-rs/tpm-rs/pull/111).
    CI was not triggered for the PR automatically and had to be triggered
    manually.
    - Do we have any secrets in CI configuration?
        - The one secret is `CLASIG_PAT`
    - Do we trigger PRs on anything other than main update or pull request?
    - Is there any attacks possible on our CI, and what would an attacker be able to achieve ?
    - Threat model: Attacker sends a PR that updates the GitHub workflow and tries to print CLASIG_PAT.

## Any Other Business:
- Should [tpm-rs/docs](https://github.com/tpm-rs/docs) be made public?
- How to organize future meetings?


## Action Items and To-Do List

- Move this document to [tpm-rs/docs](https://github.com/tpm-rs/docs).
- Identify the right video call technology to use going forward
- Open issues for: 
        - QEMU CI for server
        - CI for server as swtpm
        - The one commands on client
        - The one command for server
        - making that server is infallable/ panic free


## Next Meeting
- Date: Monday November 11 (proposal)
- Time: 5pm CET / 8 AM PT
- Meeting Link: TODO (Action item to Google/Chris)
