Documentation ¶
Index ¶
- Constants
- func DecryptKeyshares(encrypted []byte, passphrase string) ([]byte, error)
- func EncryptKeyshares(path, passphrase string) ([]byte, error)
- func RecoverKeyShares(conf config.Bifrost, digitaldollar digitalclient.DigitaldollarBridge) error
- type DigitaldollarKeyManager
- type KeyGen
- type KeySign
- func (s *KeySign) ExportAsKeyStore(password string) (*keys.EncryptedKeyJSON, error)
- func (s *KeySign) ExportAsMnemonic() (string, error)
- func (s *KeySign) ExportAsPrivateKey() (string, error)
- func (s *KeySign) GetAddr() ctypes.AccAddress
- func (s *KeySign) GetPrivKey() crypto.PrivKey
- func (s *KeySign) RemoteSign(msg []byte, poolPubKey string) ([]byte, []byte, error)
- func (s *KeySign) Sign(msg tx.StdSignMsg) ([]byte, error)
- func (s *KeySign) SignWithPool(msg tx.StdSignMsg, poolPubKey common.PubKey) ([]byte, error)
- func (s *KeySign) Start()
- func (s *KeySign) Stop()
- type KeysignError
- type MockDigitaldollarKeyManager
- func (k *MockDigitaldollarKeyManager) ExportAsKeyStore(password string) (*keys.EncryptedKeyJSON, error)
- func (k *MockDigitaldollarKeyManager) ExportAsMnemonic() (string, error)
- func (k *MockDigitaldollarKeyManager) ExportAsPrivateKey() (string, error)
- func (k *MockDigitaldollarKeyManager) GetAddr() ctypes.AccAddress
- func (k *MockDigitaldollarKeyManager) GetPrivKey() crypto.PrivKey
- func (k *MockDigitaldollarKeyManager) RemoteSign(msg []byte, poolPubKey string) ([]byte, []byte, error)
- func (k *MockDigitaldollarKeyManager) Sign(tx.StdSignMsg) ([]byte, error)
- func (k *MockDigitaldollarKeyManager) SignWithPool(msg tx.StdSignMsg, poolPubKey common.PubKey) ([]byte, error)
Constants ¶
const ( // AgeWorkFactor is the work factor used for encryption: // https://pkg.go.dev/filippo.io/age#ScryptRecipient.SetWorkFactor // NOTE: Periodically re-evaluate and increase work factor as needed. AgeWorkFactor = 18 // Salts are used before hashing the passphrase for each layer of encryption. SaltAge = 1 SaltAES = 2 SaltChaCha = 3 )
const MinimumMnemonicEntropy = 3.67
MinimumMnemonicEntropy was determined by checking the minimum entropy of 1e8 uniquely generated BIP39 mnemonics. In all likelihood, a validator mnemonic should not have a lower entropy value.
Variables ¶
This section is empty.
Functions ¶
func DecryptKeyshares ¶
EncryptKeyshares decrypts the provided encrypted keyshares using the passphrase.
func EncryptKeyshares ¶
EncryptKeyshares encrypts the keyshares at the provided path using the passphrase.
func RecoverKeyShares ¶
func RecoverKeyShares(conf config.Bifrost, digitaldollar digitalclient.DigitaldollarBridge) error
Types ¶
type DigitaldollarKeyManager ¶ added in v0.0.19
type DigitaldollarKeyManager interface { keys.KeyManager SignWithPool(msg tx.StdSignMsg, poolPubKey common.PubKey) ([]byte, error) RemoteSign(msg []byte, poolPubKey string) ([]byte, []byte, error) }
DigitaldollarKeyManager it is a composite of binance chain keymanager
type KeyGen ¶
type KeyGen struct {
// contains filtered or unexported fields
}
KeyGen is
func NewTssKeyGen ¶
func NewTssKeyGen(keys *digitalclient.Keys, server *tss.TssServer, bridge digitalclient.DigitaldollarBridge) (*KeyGen, error)
NewTssKeyGen create a new instance of TssKeyGen which will look after TSS key stuff
type KeySign ¶
type KeySign struct {
// contains filtered or unexported fields
}
KeySign is a proxy between signer and TSS
func NewKeySign ¶
func NewKeySign(server tssServer, bridge digitalclient.DigitaldollarBridge) (*KeySign, error)
NewKeySign create a new instance of KeySign
func (*KeySign) ExportAsKeyStore ¶
func (s *KeySign) ExportAsKeyStore(password string) (*keys.EncryptedKeyJSON, error)
ExportAsKeyStore DDNode don't need this function for TSS, just keep it to fulfill KeyManager interface
func (*KeySign) ExportAsMnemonic ¶
ExportAsMnemonic DDNode don't need this function for TSS, just keep it to fulfill KeyManager interface
func (*KeySign) ExportAsPrivateKey ¶
ExportAsPrivateKey DDNode don't need this function for TSS, just keep it to fulfill KeyManager interface
func (*KeySign) GetAddr ¶
func (s *KeySign) GetAddr() ctypes.AccAddress
func (*KeySign) GetPrivKey ¶
GetPrivKey DDNode don't actually have any private key , but just return something
func (*KeySign) RemoteSign ¶
RemoteSign send the request to local task queue
func (*KeySign) SignWithPool ¶
type KeysignError ¶
KeysignError is a custom error create to include which party to blame
func NewKeysignError ¶
func NewKeysignError(blame types.Blame) KeysignError
NewKeysignError create a new instance of KeysignError
func (KeysignError) IsRound7 ¶
func (k KeysignError) IsRound7() bool
type MockDigitaldollarKeyManager ¶ added in v0.0.19
type MockDigitaldollarKeyManager struct{}
MockDigitaldollarKeymanager is to mock the TSS , so as we could test it
func (*MockDigitaldollarKeyManager) ExportAsKeyStore ¶ added in v0.0.19
func (k *MockDigitaldollarKeyManager) ExportAsKeyStore(password string) (*keys.EncryptedKeyJSON, error)
func (*MockDigitaldollarKeyManager) ExportAsMnemonic ¶ added in v0.0.19
func (k *MockDigitaldollarKeyManager) ExportAsMnemonic() (string, error)
func (*MockDigitaldollarKeyManager) ExportAsPrivateKey ¶ added in v0.0.19
func (k *MockDigitaldollarKeyManager) ExportAsPrivateKey() (string, error)
func (*MockDigitaldollarKeyManager) GetAddr ¶ added in v0.0.19
func (k *MockDigitaldollarKeyManager) GetAddr() ctypes.AccAddress
func (*MockDigitaldollarKeyManager) GetPrivKey ¶ added in v0.0.19
func (k *MockDigitaldollarKeyManager) GetPrivKey() crypto.PrivKey
func (*MockDigitaldollarKeyManager) RemoteSign ¶ added in v0.0.19
func (*MockDigitaldollarKeyManager) Sign ¶ added in v0.0.19
func (k *MockDigitaldollarKeyManager) Sign(tx.StdSignMsg) ([]byte, error)
func (*MockDigitaldollarKeyManager) SignWithPool ¶ added in v0.0.19
func (k *MockDigitaldollarKeyManager) SignWithPool(msg tx.StdSignMsg, poolPubKey common.PubKey) ([]byte, error)