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 ¶
- Variables
- func Backup()
- func Close()
- func InitSealedBox(filename, backupName, key string) (err error)
- func NewWalletKey(email string) (key string, err error)
- func NewWalletMasterSecret(did string) (sec string, err error)
- func SetKeysDID(key, DID string) (err error)
- func WalletKeyByDID(DID string) (key string, err error)
- func WalletKeyByEmail(email string) (key string, err error)
- func WalletKeyExists(email string) bool
- func WalletKeyNotExists(email string) bool
- func WalletMasterSecretByDID(DID string) (key string, err error)
- func WipeSealedBox()
Constants ¶
This section is empty.
Variables ¶
var ErrNotExists = errors.New("key not exists")
ErrNotExists is an error for key not exist in the enclave.
Functions ¶
func InitSealedBox ¶
InitSealedBox initialize enclave's sealed box. This must be called once during the app life cycle.
func NewWalletKey ¶
NewWalletKey creates and stores a new indy wallet key to the enclave.
func NewWalletMasterSecret ¶
func SetKeysDID ¶
SetKeysDID is a function to store a wallet key by its DID. We can retrieve a wallet key its DID with WalletKeyByDID.
func WalletKeyByDID ¶
WalletKeyByDID retrieves a wallet key by a DID.
func WalletKeyByEmail ¶
WalletKeyByEmail retrieves a wallet key from sealed box by an email associated to it.
func WalletKeyExists ¶
WalletKeyExists returns true if a wallet key is the enclave associated by an email.
func WalletKeyNotExists ¶
WalletKeyNotExists returns true if a wallet key is not in the enclave associated by an email.
func WalletMasterSecretByDID ¶
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.