enclave

package
v0.2.95 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enclave

type Enclave struct {
	crpt.Cipher
}

Enclave is secure enclave.

func New

func New(hexKey string) *Enclave

New creates a new Enclave.

func (Enclave) IsKeyHandle

func (e Enclave) IsKeyHandle(credID []byte) (ok bool, kh KeyHandle)

IsKeyHandle tells if given byte slice really is key handle from the current Enclave.

func (Enclave) NewKeyHandle

func (e Enclave) NewKeyHandle() (_ KeyHandle, err error)

NewKeyHandle creates a new key handle for the Enclave. The Enclave is stateless, which means that only the master key is needed. The master key is stored to every key handle to maintain statelessness.

type KeyHandle

type KeyHandle interface {
	ID() []byte
	CBORPublicKey() ([]byte, error)
	Sign(d []byte) ([]byte, error)

	Verify(data, sig []byte) (ok bool) // Mainly testing
}

type Secure added in v0.1.49

type Secure interface {
	NewKeyHandle() (kh KeyHandle, err error)
	IsKeyHandle(id []byte) (yes bool, kh KeyHandle)
}

Secure is a secure enclave interface.

var (
	Store Secure // Store is the default secure enclave created by pkg init.
)

Jump to

Keyboard shortcuts

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