sgxtpm

package
v3.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

This package implements the Microsoft simulator TPM2 on SGX Transmission Interface

The Microsoft simulator TPM Command Transmission Interface (TCTI) is a remote procedure interface donated to the TPM2 Specification by Microsoft. Its primary implementation is the tpm_server maintained by IBM.

https://sourceforge.net/projects/ibmswtpm2/

This file implements client code to communicate with server code described in the document "TPM2 Specification Part 4: Supporting Routines – Code"

https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-4-Supporting-Routines-01.38-code.pdf

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Addresses of the command and platform handlers.
	//
	// Defaults to port 2321 and 2322 on localhost.
	CommandAddress  string
	PlatformAddress string
}

Config holds configuration parameters for connecting to the simulator.

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

Conn is a Microsoft Simulator client that can be used as a connection for the tpm2 package.

func Open

func Open(config Config) (*Conn, error)

Open creates connections to the simulator's command and platform ports and power cycles the simulator to initialize it.

func (*Conn) Close

func (c *Conn) Close() error

Close closes any outgoing connections to the TPM simulator.

func (*Conn) Read

func (c *Conn) Read(b []byte) (int, error)

Read a response from the simulator. If the response is longer than the provided buffer, the remainder will be cached for the next read.

func (*Conn) RequestPlatformId

func (c *Conn) RequestPlatformId() ([]uint8, error)

send an SGX TPM platform id request

func (*Conn) RequestSgxQuote

func (c *Conn) RequestSgxQuote() ([]uint8, error)

send an SGX TPM quote request

func (*Conn) Write

func (c *Conn) Write(b []byte) (int, error)

Write a raw command to the simulator. Commands must be written in a single call to Write. Commands split over multiple calls will result in multiple framed requests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL