google / google/go-tpm

Add API to open TCP based TPM device

Open
#222 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
673
Forks
188
PR merge metrics
No merged PRs in 30d

Description

https://github.com/stefanberger/swtpm/ is a TPM software emulator. One of the modes it provides is a TCP communication channel. The advantage of using a TCP connection is that it does not require sudo permissions to create a new emulated device, and it is something important for unit testsing.

Some tools (e.g. IBM TSS) allow to use such socket connection by setting special envvar, see https://github.com/stefanberger/swtpm/wiki/Using-the-IBM-TSS-with-swtpm for example.

It might be handy if `go-tpm` in addition to API that deals with filesystem paths (`tpm2.OpenTPM(filepath)`) also had an ability to open a TCP-based communication channel.

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing tpm2.OpenTPM(filepath) API and the linked swtpm TCP communication documentation. Determine how a TCP-based TPM connection should fit the current API, then verify that the resulting API can connect to an emulated device without filesystem access.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.