enclave

package
v0.31.5 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package enclave is a server-side Secure Enclave. It offers a secure and sealed storage to store indy wallet keys on the Agency server.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotExists = errors.New("key not exists")

ErrNotExists is an error for key not exist in the enclave.

Functions

func Backup

func Backup()

Backup backups the enclave.

func Close

func Close()

Close closes the enclave database

func InitSealedBox

func InitSealedBox(filename, backupName, key string) (err error)

InitSealedBox initialize enclave's sealed box. This must be called once during the app life cycle.

func NewWalletKey

func NewWalletKey(email string) (key string, err error)

NewWalletKey creates and stores a new indy wallet key to the enclave.

func NewWalletMasterSecret

func NewWalletMasterSecret(did string) (sec string, err error)

func SetKeysDID

func SetKeysDID(key, DID string) (err error)

SetKeysDID is a function to store a wallet key by its DID. We can retrieve a wallet key its DID with WalletKeyByDID.

func WalletKeyByDID

func WalletKeyByDID(DID string) (key string, err error)

WalletKeyByDID retrieves a wallet key by a DID.

func WalletKeyByEmail

func WalletKeyByEmail(email string) (key string, err error)

WalletKeyByEmail retrieves a wallet key from sealed box by an email associated to it.

func WalletKeyExists

func WalletKeyExists(email string) bool

WalletKeyExists returns true if a wallet key is the enclave associated by an email.

func WalletKeyNotExists

func WalletKeyNotExists(email string) bool

WalletKeyNotExists returns true if a wallet key is not in the enclave associated by an email.

func WalletMasterSecretByDID

func WalletMasterSecretByDID(DID string) (key string, err error)

WalletMasterSecretByDID retrieves a wallet master secret key by a DID.

func WipeSealedBox

func WipeSealedBox()

WipeSealedBox closes and destroys the enclave permanently. This version only removes the sealed box file. In the future we might add sector wiping functionality.

Types

This section is empty.

Jump to

Keyboard shortcuts

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