Documentation ¶
Index ¶
- Constants
- func AesDecrypt(chipertext, key []byte) ([]byte, error)
- func AesEncrypt(plaintext, key []byte) ([]byte, error)
- func ByXOR(message, keywords string) string
- func NewSession(region, id, secret string) (*session.Session, error)
- type FileStateMgr
- func (fsm *FileStateMgr) GetLocalPreParams(filePath string) (*keygen.LocalPreParams, error)
- func (fsm *FileStateMgr) GetLocalState(pubKey string) (KeygenLocalState, error)
- func (fsm *FileStateMgr) GetOneLocalPreParams() (*keygen.LocalPreParams, error)
- func (fsm *FileStateMgr) RetrieveP2PAddresses() (p2p.AddrList, error)
- func (fsm *FileStateMgr) SaveAddressBook(address map[peer.ID]p2p.AddrList) error
- func (fsm *FileStateMgr) SaveLocalState(state KeygenLocalState) error
- func (fsm *FileStateMgr) SavePreParams(preParams *keygen.LocalPreParams) error
- type KeygenLocalState
- type LocalStateManager
- type SecretsManager
- type SecretsMgr
- type ShamirManager
- type ShamirMgr
- func (sh *ShamirMgr) GenerateDataKey() (*kms.GenerateDataKeyOutput, error)
- func (sh *ShamirMgr) GetDecrypt(pubKey, localPartyKey string) (string, error)
- func (sh *ShamirMgr) GetKeyFile(pubKey, localPartyKey string) (KeygenLocalState, error)
- func (sh *ShamirMgr) GetOneLocalState() *bkeygen.LocalPreParams
- func (sh *ShamirMgr) NewS3Downloader() (*s3manager.Downloader, error)
- func (sh *ShamirMgr) NewS3Uploader() (*s3manager.Uploader, error)
- func (sh *ShamirMgr) NewSecretsManager() (*secretsmanager.SecretsManager, error)
- func (sh *ShamirMgr) PutKeyFile(stat KeygenLocalState) error
- func (sh *ShamirMgr) SaveEncrypt(stat KeygenLocalState) error
- type Share
Constants ¶
View Source
const CtxTimeout = 30 * time.Second
View Source
const PreParams = "pre_params"
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
Types ¶
type FileStateMgr ¶
type FileStateMgr struct {
// contains filtered or unexported fields
}
func NewFileStateMgr ¶
func NewFileStateMgr(folder string) (*FileStateMgr, error)
func (*FileStateMgr) GetLocalPreParams ¶
func (fsm *FileStateMgr) GetLocalPreParams(filePath string) (*keygen.LocalPreParams, error)
func (*FileStateMgr) GetLocalState ¶
func (fsm *FileStateMgr) GetLocalState(pubKey string) (KeygenLocalState, error)
func (*FileStateMgr) GetOneLocalPreParams ¶
func (fsm *FileStateMgr) GetOneLocalPreParams() (*keygen.LocalPreParams, error)
func (*FileStateMgr) RetrieveP2PAddresses ¶
func (fsm *FileStateMgr) RetrieveP2PAddresses() (p2p.AddrList, error)
func (*FileStateMgr) SaveAddressBook ¶
func (*FileStateMgr) SaveLocalState ¶
func (fsm *FileStateMgr) SaveLocalState(state KeygenLocalState) error
func (*FileStateMgr) SavePreParams ¶
func (fsm *FileStateMgr) SavePreParams(preParams *keygen.LocalPreParams) error
type KeygenLocalState ¶
type LocalStateManager ¶
type LocalStateManager interface { SaveLocalState(state KeygenLocalState) error GetLocalState(pubKey string) (KeygenLocalState, error) SaveAddressBook(addressBook map[peer.ID]p2p.AddrList) error RetrieveP2PAddresses() (p2p.AddrList, error) SavePreParams(preParams *keygen.LocalPreParams) error GetLocalPreParams(string) (*keygen.LocalPreParams, error) }
type SecretsManager ¶
type SecretsManager interface { Save() error PutKeyFile(state KeygenLocalState) error GetKeyFile(pubKey string) (KeygenLocalState, error) }
type SecretsMgr ¶
type SecretsMgr struct {
// contains filtered or unexported fields
}
func NewSecretsMgr ¶
func NewSecretsMgr(secretId string) (*SecretsMgr, error)
func (*SecretsMgr) GetKeyFile ¶
func (sm *SecretsMgr) GetKeyFile(pubKey string) (KeygenLocalState, error)
func (*SecretsMgr) GetOneLocalState ¶
func (sm *SecretsMgr) GetOneLocalState() *bkeygen.LocalPreParams
func (*SecretsMgr) PutKeyFile ¶
func (sm *SecretsMgr) PutKeyFile(stat KeygenLocalState) error
func (*SecretsMgr) Save ¶
func (sm *SecretsMgr) Save() error
type ShamirManager ¶
type ShamirManager interface { PutKeyFile(state KeygenLocalState) error GetKeyFile(pubKey, localPartyKey string) (KeygenLocalState, error) }
type ShamirMgr ¶
type ShamirMgr struct {
// contains filtered or unexported fields
}
func NewShamirMgr ¶
func NewShamirMgr(config nodeconfig.ShamirConfig) (*ShamirMgr, error)
func (*ShamirMgr) GenerateDataKey ¶
func (sh *ShamirMgr) GenerateDataKey() (*kms.GenerateDataKeyOutput, error)
func (*ShamirMgr) GetDecrypt ¶
func (*ShamirMgr) GetKeyFile ¶
func (sh *ShamirMgr) GetKeyFile(pubKey, localPartyKey string) (KeygenLocalState, error)
func (*ShamirMgr) GetOneLocalState ¶
func (sh *ShamirMgr) GetOneLocalState() *bkeygen.LocalPreParams
func (*ShamirMgr) NewS3Downloader ¶
func (sh *ShamirMgr) NewS3Downloader() (*s3manager.Downloader, error)
func (*ShamirMgr) NewSecretsManager ¶
func (sh *ShamirMgr) NewSecretsManager() (*secretsmanager.SecretsManager, error)
func (*ShamirMgr) PutKeyFile ¶
func (sh *ShamirMgr) PutKeyFile(stat KeygenLocalState) error
func (*ShamirMgr) SaveEncrypt ¶
func (sh *ShamirMgr) SaveEncrypt(stat KeygenLocalState) error
Click to show internal directories.
Click to hide internal directories.