enclave

package
v0.2.67 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 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.

Urgent! This version does not implement internal hash(), encrypt, and decrypt() functions. We must implement these three functions before production. We will offer implementations of them when the server-side crypto solution and the Key Storage is selected. Possible candidates are AWS Nitro, etc. We also bring addon/plugin system for cryptos when first implementation is done.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupTicker

func BackupTicker(interval time.Duration) (done chan<- struct{})

func GetExistingSessionUser added in v0.1.51

func GetExistingSessionUser(userID []byte) (u *user.User, err error)

GetSessionExistingUser returns user by name if exists in enclave

func GetExistingUser

func GetExistingUser(name string) (u *user.User, err error)

GetExistingUser returns user by name if exists in enclave

func GetSessionUser added in v0.1.51

func GetSessionUser(userID []byte) (u *user.User, exist bool, err error)

GetSessionUser returns user by name if exists in enclave

func GetUser

func GetUser(name string) (u *user.User, exist bool, err error)

GetUser returns user by name if exists in enclave

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 PutSessionUser added in v0.1.51

func PutSessionUser(userID []byte, u *user.User) (err error)

PutSessionUser saves the user to database.

func PutUser

func PutUser(u *user.User) (err error)

PutUser saves the user to database.

func RemoveSessionUser added in v0.1.51

func RemoveSessionUser(userID []byte) (err error)

func RemoveUser added in v0.1.43

func RemoveUser(name string) (err error)

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