benchmark

package
v0.0.0-...-2fe3824 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Example
tpm, err := transport.OpenTPM()
if err != nil {
	log.Fatal(err)
}
defer tpm.Close()

tpmAlgorithms := []tpm2.TPMAlgID{tpm2.TPMAlgECC, tpm2.TPMAlgRSA}
sessionEncryptions := []SessionEncryption{SessionEncryptionNone}

var (
	sessionEncryption  SessionEncryption
	signatureAlgorithm tpm2.TPMAlgID
)

iterations := 30
parallelism := 1

for _, sessionEncryption = range sessionEncryptions {
	for _, signatureAlgorithm = range tpmAlgorithms {
		err := Signature(tpm, signatureAlgorithm, iterations, parallelism, sessionEncryption)
		if err != nil {
			slog.Debug(err.Error())
		}
	}

	Hmac(tpm, iterations, parallelism, sessionEncryption)
}
Output:

Index

Examples

Constants

View Source
const (
	SessionEncryptionNone      SessionEncryption = "SessionEncryptionNone"
	SessionEncryptionReuse                       = "SessionEncryptionReuse"
	SessionEncryptionEphemeral                   = "SessionEncryptionEphemeral"
)

Variables

This section is empty.

Functions

func Hmac

func Hmac(tpm transport.TPMCloser, iterations int, parallelism int, sessionEncryption SessionEncryption)

func Signature

func Signature(tpm transport.TPMCloser, keyType tpm2.TPMAlgID, iterations int, parallelism int, sessionEncryption SessionEncryption) error

Types

type SessionEncryption

type SessionEncryption string

Jump to

Keyboard shortcuts

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