Documentation
¶
Index ¶
- func DecryptECIES(priv *btcec.PrivateKey, cipher string) ([]byte, error)
- func ExtractFromShare(shareScalar []byte, index uint32, id []byte) ([]byte, error)
- func MakeVE(heightFor uint64, idx uint32, extracted []byte) ([]byte, error)
- func SelectShare(mat ShareMaterial, heightPlusOne uint64) ([]byte, uint32, error)
- type Config
- type ShareMaterial
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptECIES ¶
func DecryptECIES(priv *btcec.PrivateKey, cipher string) ([]byte, error)
Decrypts a base64 or hex-encoded ECIES(sec256k1) ciphertext with the provided secp256k1 private key.
func ExtractFromShare ¶
ExtractFromShare derives the per-ID extracted key bytes from the validator share (scalar bytes) and index.
func SelectShare ¶
func SelectShare(mat ShareMaterial, heightPlusOne uint64) ([]byte, uint32, error)
Choose which share to use for height h+1 (active unless we cross expiry)
Types ¶
type Config ¶
type Config struct {
Enabled bool `yaml:"enabled"`
ValidatorAccount string `yaml:"validator_account"` // bech32 account string used in EncryptedKeyshares[].Validator
AppSecp256k1PrivHex string `yaml:"app_secp256k1_priv_hex"` // hex of the app key
}
func LoadConfig ¶
type ShareMaterial ¶
type ShareMaterial struct {
// decrypted validator shares for active/queued (G2 scalar)
// expiries
Index uint32
}
Click to show internal directories.
Click to hide internal directories.