Documentation ¶
Index ¶
- Constants
- func AddCustodian(nickname, folder string, method int, startIdx, nshares int) error
- func AddToBackup(t, action int)
- func CreateBackup(fname string) error
- func DecodeEncrypted(fname string) error
- func DecodeUnencrypted(fname string) error
- func GenerateKey() []byte
- func GenerateShares(secret []byte)
- func GetNCustodians() int
- func GetNShares() int
- func GetSecretCfgOriginal() *shamir.Shamir
- func GetStorage() []db.KV
- func GetkOp() []byte
- func Init(pass []byte, folder string)
- func KeyOperational() []byte
- func RestoreIdentity(folder string, params keystore.KeyStoreParams) (*iden3mobile.Identity, error)
- func ScanQRShare(fname string)
- func SetCustodians(data *Custodians)
- func SetPrivateKeys(data *PrivateKeys)
- func SetSecretCfg(data *Secret)
- func SetShares(data *Shares)
- func SetStorage(data []db.KV)
- func SetWallet(data *WalletConfig)
- func SetkOp(kOp []byte)
- type Backup
- type BackupData
- type Custodian
- type Custodians
- type PrivateKeys
- type Secret
- type Share
- type Shares
- type WalletConfig
Constants ¶
View Source
const ( ENCRYPT = iota DONT_ENCRYPT )
View Source
const ( N_ELEMENTS = 1000 // used by walletcfg currently MIN_N_SHARES = 4 MAX_N_SHARES = 10 PRIME = ff.FF_BN256_FP BACKUP_FILE = "../testdata/backup.bk" QR_DIR = "../testdata/" PBKDF2_NITER = 60000 PBKDF2_SALTLEN = 12 PBKDF2_KEY = fc.FC_KEY_T_PBKDF2 SHA256_HASH = fc.FC_HASH_SHA256 GCM_ENCRYPTION = fc.FC_GCM WEB3URL = "https://foo.bar" HOLDER_TICKET_PERIOD = 1000 IDENTITY_MAIN_STORAGE = "identityTest" FOLDER_STORE = "store" FOLDER_KSTORE = "keystore" KSTORE_FILE = "/idKeyStore" STORE_FILE = "/idStore" )
Configuration constants
View Source
const ( EMAIL = iota PHONE TELEGRAM QR // Generate QR NONE // send raw data directly )
Attempts to emulate how we could exchage shares. QR and NONE the only one working in this demo
View Source
const ( START_TYPES = iota WALLET_CONFIG CUSTODIAN SSHARING SHARES PKEYS STORAGE NTYPES )
Types of data we can include in the backup. Needed to register the data strcuture
Variables ¶
This section is empty.
Functions ¶
func AddCustodian ¶
func DecodeEncrypted ¶
func DecodeUnencrypted ¶
Decode and decrypt file using provided key
func GetNCustodians ¶
func GetNCustodians() int
func GetNShares ¶
func GetNShares() int
func GetSecretCfgOriginal ¶
func GetStorage ¶
func KeyOperational ¶
func KeyOperational() []byte
func RestoreIdentity ¶
func RestoreIdentity(folder string, params keystore.KeyStoreParams) (*iden3mobile.Identity, error)
func ScanQRShare ¶
func ScanQRShare(fname string)
func SetCustodians ¶
func SetCustodians(data *Custodians)
func SetPrivateKeys ¶
func SetPrivateKeys(data *PrivateKeys)
func SetSecretCfg ¶
func SetSecretCfg(data *Secret)
func SetStorage ¶
func SetWallet ¶
func SetWallet(data *WalletConfig)
Types ¶
type BackupData ¶
type BackupData struct {
// contains filtered or unexported fields
}
type Custodian ¶
func GetCustodian ¶
type Custodians ¶
type Custodians struct {
Data []Custodian
}
var SecretCustodians *Custodians
func GetCustodians ¶
func GetCustodians() *Custodians
type PrivateKeys ¶
type PrivateKeys struct {
PK []babyjub.PrivateKey
}
func GetPrivateKeys ¶
func GetPrivateKeys() *PrivateKeys
Click to show internal directories.
Click to hide internal directories.