This commit is contained in:
Andrej Zavgorodnij 2020-10-05 18:00:54 +03:00
parent 3e0f59b67c
commit 835d451103
16 changed files with 322 additions and 107 deletions

View File

@ -23,10 +23,10 @@ import (
)
const (
seedSize = 32
seedSize = 32
)
type AirgappedMachine struct {
type Machine struct {
sync.Mutex
dkgInstances map[string]*dkg.DKG
@ -42,12 +42,12 @@ type AirgappedMachine struct {
resultQRFolder string
}
func NewAirgappedMachine(dbPath string) (*AirgappedMachine, error) {
func NewMachine(dbPath string) (*Machine, error) {
var (
err error
)
am := &AirgappedMachine{
am := &Machine{
dkgInstances: make(map[string]*dkg.DKG),
qrProcessor: qr.NewCameraProcessor(),
}
@ -74,20 +74,20 @@ func NewAirgappedMachine(dbPath string) (*AirgappedMachine, error) {
return am, nil
}
func (am *AirgappedMachine) SetQRProcessorFramesDelay(delay int) {
func (am *Machine) SetQRProcessorFramesDelay(delay int) {
am.qrProcessor.SetDelay(delay)
}
func (am *AirgappedMachine) SetQRProcessorChunkSize(chunkSize int) {
func (am *Machine) SetQRProcessorChunkSize(chunkSize int) {
am.qrProcessor.SetChunkSize(chunkSize)
}
func (am *AirgappedMachine) SetResultQRFolder(resultQRFolder string) {
func (am *Machine) SetResultQRFolder(resultQRFolder string) {
am.resultQRFolder = resultQRFolder
}
// InitKeys load keys public and private keys for DKG from LevelDB. If keys does not exist, creates them.
func (am *AirgappedMachine) InitKeys() error {
func (am *Machine) InitKeys() error {
err := am.LoadKeysFromDB()
if err != nil && err != leveldb.ErrNotFound {
return fmt.Errorf("failed to load keys from db: %w", err)
@ -103,17 +103,17 @@ func (am *AirgappedMachine) InitKeys() error {
}
// SetEncryptionKey set a key to encrypt and decrypt a sensitive data
func (am *AirgappedMachine) SetEncryptionKey(key []byte) {
func (am *Machine) SetEncryptionKey(key []byte) {
am.encryptionKey = key
}
// SensitiveDataRemoved indicates whether sensitive information has been cleared
func (am *AirgappedMachine) SensitiveDataRemoved() bool {
func (am *Machine) SensitiveDataRemoved() bool {
return len(am.encryptionKey) == 0
}
// DropSensitiveData remove sensitive data from memory
func (am *AirgappedMachine) DropSensitiveData() {
func (am *Machine) DropSensitiveData() {
am.Lock()
defer am.Unlock()
@ -123,7 +123,7 @@ func (am *AirgappedMachine) DropSensitiveData() {
am.encryptionKey = nil
}
func (am *AirgappedMachine) ReplayOperationsLog(dkgIdentifier string) error {
func (am *Machine) ReplayOperationsLog(dkgIdentifier string) error {
operationsLog, err := am.getOperationsLog(dkgIdentifier)
if err != nil {
return fmt.Errorf("failed to getOperationsLog: %w", err)
@ -142,12 +142,12 @@ func (am *AirgappedMachine) ReplayOperationsLog(dkgIdentifier string) error {
return nil
}
func (am *AirgappedMachine) DropOperationsLog(dkgIdentifier string) error {
func (am *Machine) DropOperationsLog(dkgIdentifier string) error {
return am.dropRoundOperationLog(dkgIdentifier)
}
// getParticipantID returns our own participant id for the given DKG round
func (am *AirgappedMachine) getParticipantID(dkgIdentifier string) (int, error) {
func (am *Machine) getParticipantID(dkgIdentifier string) (int, error) {
dkgInstance, ok := am.dkgInstances[dkgIdentifier]
if !ok {
return 0, fmt.Errorf("invalid dkg identifier: %s", dkgIdentifier)
@ -156,7 +156,7 @@ func (am *AirgappedMachine) getParticipantID(dkgIdentifier string) (int, error)
}
// encryptDataForParticipant encrypts a data using the public key of the participant to whom the data is sent
func (am *AirgappedMachine) encryptDataForParticipant(dkgIdentifier, to string, data []byte) ([]byte, error) {
func (am *Machine) encryptDataForParticipant(dkgIdentifier, to string, data []byte) ([]byte, error) {
dkgInstance, ok := am.dkgInstances[dkgIdentifier]
if !ok {
return nil, fmt.Errorf("invalid dkg identifier: %s", dkgIdentifier)
@ -175,7 +175,7 @@ func (am *AirgappedMachine) encryptDataForParticipant(dkgIdentifier, to string,
}
// decryptDataFromParticipant decrypts the data that was sent to us
func (am *AirgappedMachine) decryptDataFromParticipant(data []byte) ([]byte, error) {
func (am *Machine) decryptDataFromParticipant(data []byte) ([]byte, error) {
decryptedData, err := ecies.Decrypt(am.baseSuite, am.secKey, data, am.baseSuite.Hash)
if err != nil {
return nil, fmt.Errorf("failed to decrypt data: %w", err)
@ -184,7 +184,7 @@ func (am *AirgappedMachine) decryptDataFromParticipant(data []byte) ([]byte, err
}
// HandleOperation handles and processes an operation
func (am *AirgappedMachine) HandleOperation(operation client.Operation) (client.Operation, error) {
func (am *Machine) HandleOperation(operation client.Operation) (client.Operation, error) {
if err := am.storeOperation(operation); err != nil {
return client.Operation{}, fmt.Errorf("failed to storeOperation: %w", err)
}
@ -192,7 +192,7 @@ func (am *AirgappedMachine) HandleOperation(operation client.Operation) (client.
return am.handleOperation(operation)
}
func (am *AirgappedMachine) handleOperation(operation client.Operation) (client.Operation, error) {
func (am *Machine) handleOperation(operation client.Operation) (client.Operation, error) {
var (
err error
)
@ -233,7 +233,7 @@ func (am *AirgappedMachine) handleOperation(operation client.Operation) (client.
}
// HandleQR - gets an operation from a QR code, do necessary things for the operation and returns paths to QR-code images
func (am *AirgappedMachine) HandleQR() (string, error) {
func (am *Machine) HandleQR() (string, error) {
var (
err error
@ -270,7 +270,7 @@ func (am *AirgappedMachine) HandleQR() (string, error) {
}
// writeErrorRequestToOperation writes error to a operation if some bad things happened
func (am *AirgappedMachine) writeErrorRequestToOperation(o *client.Operation, handlerError error) error {
func (am *Machine) writeErrorRequestToOperation(o *client.Operation, handlerError error) error {
// each type of request should have a required event even error
// maybe should be global?
eventToErrorMap := map[fsm.State]fsm.Event{

View File

@ -30,7 +30,7 @@ const (
type Node struct {
ParticipantID int
Participant string
Machine *AirgappedMachine
Machine *Machine
commits []requests.DKGProposalCommitConfirmationRequest
deals []requests.DKGProposalDealConfirmationRequest
responses []requests.DKGProposalResponseConfirmationRequest
@ -114,7 +114,7 @@ func TestAirgappedAllSteps(t *testing.T) {
tr := &Transport{}
for i := 0; i < nodesCount; i++ {
am, err := NewAirgappedMachine(fmt.Sprintf("%s/%s-%d", testDir, testDB, i))
am, err := NewMachine(fmt.Sprintf("%s/%s-%d", testDir, testDB, i))
if err != nil {
t.Fatalf("failed to create airgapped machine: %v", err)
}
@ -323,7 +323,7 @@ func TestAirgappedMachine_Replay(t *testing.T) {
tr := &Transport{}
for i := 0; i < nodesCount; i++ {
am, err := NewAirgappedMachine(fmt.Sprintf("%s/%s-%d", testDir, testDB, i))
am, err := NewMachine(fmt.Sprintf("%s/%s-%d", testDir, testDB, i))
if err != nil {
t.Fatalf("failed to create airgapped machine: %v", err)
}
@ -427,7 +427,7 @@ func TestAirgappedMachine_Replay(t *testing.T) {
newTr := &Transport{}
for i := 0; i < nodesCount; i++ {
am, err := NewAirgappedMachine(fmt.Sprintf("%s/%s-%d", testDir, testDB, i))
am, err := NewMachine(fmt.Sprintf("%s/%s-%d", testDir, testDB, i))
if err != nil {
t.Fatalf("failed to create airgapped machine: %v", err)
}

View File

@ -16,7 +16,7 @@ import (
)
// handleStateSigningAwaitConfirmations returns a confirmation of participation to create a threshold signature for a data
func (am *AirgappedMachine) handleStateSigningAwaitConfirmations(o *client.Operation) error {
func (am *Machine) handleStateSigningAwaitConfirmations(o *client.Operation) error {
var (
payload responses.SigningProposalParticipantInvitationsResponse
err error
@ -46,7 +46,7 @@ func (am *AirgappedMachine) handleStateSigningAwaitConfirmations(o *client.Opera
}
// handleStateSigningAwaitPartialSigns takes a data to sign as payload and returns a partial sign for the data to broadcast
func (am *AirgappedMachine) handleStateSigningAwaitPartialSigns(o *client.Operation) error {
func (am *Machine) handleStateSigningAwaitPartialSigns(o *client.Operation) error {
var (
payload responses.SigningPartialSignsParticipantInvitationsResponse
err error
@ -82,7 +82,7 @@ func (am *AirgappedMachine) handleStateSigningAwaitPartialSigns(o *client.Operat
}
// reconstructThresholdSignature takes broadcasted partial signs from the previous step and reconstructs a full signature
func (am *AirgappedMachine) reconstructThresholdSignature(o *client.Operation) error {
func (am *Machine) reconstructThresholdSignature(o *client.Operation) error {
var (
payload responses.SigningProcessParticipantResponse
err error
@ -113,7 +113,7 @@ func (am *AirgappedMachine) reconstructThresholdSignature(o *client.Operation) e
// createPartialSign returns a partial sign of a given message
// with using of a private part of the reconstructed DKG key of a given DKG round
func (am *AirgappedMachine) createPartialSign(msg []byte, dkgIdentifier string) ([]byte, error) {
func (am *Machine) createPartialSign(msg []byte, dkgIdentifier string) ([]byte, error) {
blsKeyring, err := am.loadBLSKeyring(dkgIdentifier)
if err != nil {
return nil, fmt.Errorf("failed to load blsKeyring: %w", err)
@ -124,7 +124,7 @@ func (am *AirgappedMachine) createPartialSign(msg []byte, dkgIdentifier string)
// recoverFullSign recovers full threshold signature for a message
// with using of a reconstructed public DKG key of a given DKG round
func (am *AirgappedMachine) recoverFullSign(msg []byte, sigShares [][]byte, t, n int, dkgIdentifier string) ([]byte, error) {
func (am *Machine) recoverFullSign(msg []byte, sigShares [][]byte, t, n int, dkgIdentifier string) ([]byte, error) {
blsKeyring, err := am.loadBLSKeyring(dkgIdentifier)
if err != nil {
return nil, fmt.Errorf("failed to load blsKeyring: %w", err)
@ -134,7 +134,7 @@ func (am *AirgappedMachine) recoverFullSign(msg []byte, sigShares [][]byte, t, n
}
// verifySign verifies a signature of a message
func (am *AirgappedMachine) VerifySign(msg []byte, fullSignature []byte, dkgIdentifier string) error {
func (am *Machine) VerifySign(msg []byte, fullSignature []byte, dkgIdentifier string) error {
blsKeyring, err := am.loadBLSKeyring(dkgIdentifier)
if err != nil {
return fmt.Errorf("failed to load blsKeyring: %w", err)

View File

@ -29,7 +29,7 @@ func createMessage(o client.Operation, data []byte) storage.Message {
// handleStateAwaitParticipantsConfirmations inits DKG instance for a new DKG round and returns a confirmation of
// participation in the round
func (am *AirgappedMachine) handleStateAwaitParticipantsConfirmations(o *client.Operation) error {
func (am *Machine) handleStateAwaitParticipantsConfirmations(o *client.Operation) error {
var (
payload responses.SignatureProposalParticipantInvitationsResponse
err error
@ -87,13 +87,13 @@ func (am *AirgappedMachine) handleStateAwaitParticipantsConfirmations(o *client.
return nil
}
func (am *AirgappedMachine) GetPubKey() kyber.Point {
func (am *Machine) GetPubKey() kyber.Point {
return am.pubKey
}
// handleStateDkgCommitsAwaitConfirmations takes a list of participants DKG pub keys as payload and
// returns DKG commits to broadcast
func (am *AirgappedMachine) handleStateDkgCommitsAwaitConfirmations(o *client.Operation) error {
func (am *Machine) handleStateDkgCommitsAwaitConfirmations(o *client.Operation) error {
var (
payload responses.DKGProposalPubKeysParticipantResponse
err error
@ -154,7 +154,7 @@ func (am *AirgappedMachine) handleStateDkgCommitsAwaitConfirmations(o *client.Op
// handleStateDkgDealsAwaitConfirmations takes broadcasted participants commits as payload and
// returns a private deal for every participant.
// Each deal is encrypted with a participant's public key which received on the previous step
func (am *AirgappedMachine) handleStateDkgDealsAwaitConfirmations(o *client.Operation) error {
func (am *Machine) handleStateDkgDealsAwaitConfirmations(o *client.Operation) error {
var (
payload responses.DKGProposalCommitParticipantResponse
err error
@ -221,7 +221,7 @@ func (am *AirgappedMachine) handleStateDkgDealsAwaitConfirmations(o *client.Oper
// handleStateDkgResponsesAwaitConfirmations takes deals sent to us as payload, decrypt and process them and
// returns responses to broadcast
func (am *AirgappedMachine) handleStateDkgResponsesAwaitConfirmations(o *client.Operation) error {
func (am *Machine) handleStateDkgResponsesAwaitConfirmations(o *client.Operation) error {
var (
payload responses.DKGProposalDealParticipantResponse
err error
@ -278,7 +278,7 @@ func (am *AirgappedMachine) handleStateDkgResponsesAwaitConfirmations(o *client.
// handleStateDkgMasterKeyAwaitConfirmations takes broadcasted responses from the previous step, process them,
// reconstructs a distributed DKG public key to broadcast and saves a private part of the key
func (am *AirgappedMachine) handleStateDkgMasterKeyAwaitConfirmations(o *client.Operation) error {
func (am *Machine) handleStateDkgMasterKeyAwaitConfirmations(o *client.Operation) error {
var (
payload responses.DKGProposalResponseParticipantResponse
err error

View File

@ -23,7 +23,7 @@ const (
type RoundOperationLog map[string][]client.Operation
func (am *AirgappedMachine) loadBaseSeed() error {
func (am *Machine) loadBaseSeed() error {
seed, err := am.getBaseSeed()
if errors.Is(err, leveldb.ErrNotFound) {
log.Println("Base seed not initialized, generating a new one...")
@ -48,7 +48,7 @@ func (am *AirgappedMachine) loadBaseSeed() error {
return nil
}
func (am *AirgappedMachine) storeBaseSeed(seed []byte) error {
func (am *Machine) storeBaseSeed(seed []byte) error {
if err := am.db.Put([]byte(baseSeedKey), seed, nil); err != nil {
return fmt.Errorf("failed to put baseSeed: %w", err)
}
@ -56,7 +56,7 @@ func (am *AirgappedMachine) storeBaseSeed(seed []byte) error {
return nil
}
func (am *AirgappedMachine) getBaseSeed() ([]byte, error) {
func (am *Machine) getBaseSeed() ([]byte, error) {
seed, err := am.db.Get([]byte(baseSeedKey), nil)
if err != nil {
return nil, fmt.Errorf("failed to get baseSeed: %w", err)
@ -65,7 +65,7 @@ func (am *AirgappedMachine) getBaseSeed() ([]byte, error) {
return seed, nil
}
func (am *AirgappedMachine) storeOperation(o client.Operation) error {
func (am *Machine) storeOperation(o client.Operation) error {
roundOperationsLog, err := am.getRoundOperationLog()
if err != nil {
if err == leveldb.ErrNotFound {
@ -90,7 +90,7 @@ func (am *AirgappedMachine) storeOperation(o client.Operation) error {
return nil
}
func (am *AirgappedMachine) getOperationsLog(dkgIdentifier string) ([]client.Operation, error) {
func (am *Machine) getOperationsLog(dkgIdentifier string) ([]client.Operation, error) {
roundOperationsLog, err := am.getRoundOperationLog()
if err != nil {
if err == leveldb.ErrNotFound {
@ -107,7 +107,7 @@ func (am *AirgappedMachine) getOperationsLog(dkgIdentifier string) ([]client.Ope
return operationsLog, nil
}
func (am *AirgappedMachine) dropRoundOperationLog(dkgIdentifier string) error {
func (am *Machine) dropRoundOperationLog(dkgIdentifier string) error {
roundOperationsLog, err := am.getRoundOperationLog()
if err != nil {
if err == leveldb.ErrNotFound {
@ -129,7 +129,7 @@ func (am *AirgappedMachine) dropRoundOperationLog(dkgIdentifier string) error {
return nil
}
func (am *AirgappedMachine) getRoundOperationLog() (RoundOperationLog, error) {
func (am *Machine) getRoundOperationLog() (RoundOperationLog, error) {
operationsLogBz, err := am.db.Get([]byte(operationsLogDBKey), nil)
if err != nil {
return nil, err
@ -144,7 +144,7 @@ func (am *AirgappedMachine) getRoundOperationLog() (RoundOperationLog, error) {
}
// LoadKeysFromDB load DKG keys from LevelDB
func (am *AirgappedMachine) LoadKeysFromDB() error {
func (am *Machine) LoadKeysFromDB() error {
pubKeyBz, err := am.db.Get([]byte(pubKeyDBKey), nil)
if err != nil {
if err == leveldb.ErrNotFound {
@ -192,7 +192,7 @@ func (am *AirgappedMachine) LoadKeysFromDB() error {
}
// SaveKeysToDB save DKG keys to LevelDB
func (am *AirgappedMachine) SaveKeysToDB() error {
func (am *Machine) SaveKeysToDB() error {
pubKeyBz, err := am.pubKey.MarshalBinary()
if err != nil {
return fmt.Errorf("failed to marshal pub key: %w", err)

View File

@ -16,7 +16,7 @@ func makeBLSKeyKeyringDBKey(key string) string {
return fmt.Sprintf("%s_%s", blsKeyringPrefix, key)
}
func (am *AirgappedMachine) saveBLSKeyring(dkgID string, blsKeyring *dkg.BLSKeyring) error {
func (am *Machine) saveBLSKeyring(dkgID string, blsKeyring *dkg.BLSKeyring) error {
salt, err := am.db.Get([]byte(saltDBKey), nil)
if err != nil {
return fmt.Errorf("failed to read salt from db: %w", err)
@ -37,7 +37,7 @@ func (am *AirgappedMachine) saveBLSKeyring(dkgID string, blsKeyring *dkg.BLSKeyr
return nil
}
func (am *AirgappedMachine) loadBLSKeyring(dkgID string) (*dkg.BLSKeyring, error) {
func (am *Machine) loadBLSKeyring(dkgID string) (*dkg.BLSKeyring, error) {
var (
blsKeyring *dkg.BLSKeyring
blsKeyringBz []byte
@ -64,7 +64,7 @@ func (am *AirgappedMachine) loadBLSKeyring(dkgID string) (*dkg.BLSKeyring, error
return blsKeyring, nil
}
func (am *AirgappedMachine) GetBLSKeyrings() (map[string]*dkg.BLSKeyring, error) {
func (am *Machine) GetBLSKeyrings() (map[string]*dkg.BLSKeyring, error) {
var (
blsKeyring *dkg.BLSKeyring
err error

View File

@ -32,19 +32,19 @@ const (
QrCodesDir = "/tmp"
)
type Poller interface {
GetUsername() string
GetPubKey() ed25519.PublicKey
type Client interface {
Poll() error
GetLogger() *logger
GetPubKey() ed25519.PublicKey
GetUsername() string
SendMessage(message storage.Message) error
ProcessMessage(message storage.Message) error
GetOperations() (map[string]*types.Operation, error)
GetOperationQRPath(operationID string) (string, error)
StartHTTPServer(listenAddr string) error
GetLogger() *logger
}
type Client struct {
type BaseClient struct {
sync.Mutex
Logger *logger
userName string
@ -63,13 +63,13 @@ func NewClient(
storage storage.Storage,
keyStore KeyStore,
qrProcessor qr.Processor,
) (Poller, error) {
) (Client, error) {
keyPair, err := keyStore.LoadKeys(userName, "")
if err != nil {
return nil, fmt.Errorf("failed to LoadKeys: %w", err)
}
return &Client{
return &BaseClient{
ctx: ctx,
Logger: newLogger(userName),
userName: userName,
@ -81,20 +81,20 @@ func NewClient(
}, nil
}
func (c *Client) GetLogger() *logger {
func (c *BaseClient) GetLogger() *logger {
return c.Logger
}
func (c *Client) GetUsername() string {
func (c *BaseClient) GetUsername() string {
return c.userName
}
func (c *Client) GetPubKey() ed25519.PublicKey {
func (c *BaseClient) GetPubKey() ed25519.PublicKey {
return c.pubKey
}
// Poll is a main client loop, which gets new messages from an append-only log and processes them
func (c *Client) Poll() error {
func (c *BaseClient) Poll() error {
tk := time.NewTicker(pollingPeriod)
for {
select {
@ -127,7 +127,7 @@ func (c *Client) Poll() error {
}
}
func (c *Client) SendMessage(message storage.Message) error {
func (c *BaseClient) SendMessage(message storage.Message) error {
if _, err := c.storage.Send(message); err != nil {
return fmt.Errorf("failed to post message: %w", err)
}
@ -135,7 +135,7 @@ func (c *Client) SendMessage(message storage.Message) error {
return nil
}
func (c *Client) ProcessMessage(message storage.Message) error {
func (c *BaseClient) ProcessMessage(message storage.Message) error {
fsmInstance, err := c.getFSMInstance(message.DkgRoundID)
if err != nil {
return fmt.Errorf("failed to getFSMInstance: %w", err)
@ -233,12 +233,12 @@ func (c *Client) ProcessMessage(message storage.Message) error {
return nil
}
func (c *Client) GetOperations() (map[string]*types.Operation, error) {
func (c *BaseClient) GetOperations() (map[string]*types.Operation, error) {
return c.state.GetOperations()
}
// getOperationJSON returns a specific JSON-encoded operation
func (c *Client) getOperationJSON(operationID string) ([]byte, error) {
func (c *BaseClient) getOperationJSON(operationID string) ([]byte, error) {
operation, err := c.state.GetOperationByID(operationID)
if err != nil {
return nil, fmt.Errorf("failed to get operation: %w", err)
@ -254,7 +254,7 @@ func (c *Client) getOperationJSON(operationID string) ([]byte, error) {
// GetOperationQRPath returns a path to the image with the QR generated
// for the specified operation. It is supposed that the user will open
// this file herself.
func (c *Client) GetOperationQRPath(operationID string) (string, error) {
func (c *BaseClient) GetOperationQRPath(operationID string) (string, error) {
operationJSON, err := c.getOperationJSON(operationID)
if err != nil {
return "", fmt.Errorf("failed to get operation in JSON: %w", err)
@ -273,7 +273,7 @@ func (c *Client) GetOperationQRPath(operationID string) (string, error) {
// handleProcessedOperation handles an operation which was processed by the airgapped machine
// It checks that the operation exists in an operation pool, signs the operation, sends it to an append-only log and
// deletes it from the pool.
func (c *Client) handleProcessedOperation(operation types.Operation) error {
func (c *BaseClient) handleProcessedOperation(operation types.Operation) error {
storedOperation, err := c.state.GetOperationByID(operation.ID)
if err != nil {
return fmt.Errorf("failed to find matching operation: %w", err)
@ -305,7 +305,7 @@ func (c *Client) handleProcessedOperation(operation types.Operation) error {
}
// getFSMInstance returns a FSM for a necessary DKG round.
func (c *Client) getFSMInstance(dkgRoundID string) (*state_machines.FSMInstance, error) {
func (c *BaseClient) getFSMInstance(dkgRoundID string) (*state_machines.FSMInstance, error) {
var err error
fsmInstance, ok, err := c.state.LoadFSM(dkgRoundID)
if err != nil {
@ -329,7 +329,7 @@ func (c *Client) getFSMInstance(dkgRoundID string) (*state_machines.FSMInstance,
return fsmInstance, nil
}
func (c *Client) signMessage(message []byte) ([]byte, error) {
func (c *BaseClient) signMessage(message []byte) ([]byte, error) {
keyPair, err := c.keyStore.LoadKeys(c.userName, "")
if err != nil {
return nil, fmt.Errorf("failed to LoadKeys: %w", err)
@ -338,7 +338,7 @@ func (c *Client) signMessage(message []byte) ([]byte, error) {
return ed25519.Sign(keyPair.Priv, message), nil
}
func (c *Client) verifyMessage(fsmInstance *state_machines.FSMInstance, message storage.Message) error {
func (c *BaseClient) verifyMessage(fsmInstance *state_machines.FSMInstance, message storage.Message) error {
senderPubKey, err := fsmInstance.GetPubKeyByAddr(message.SenderAddr)
if err != nil {
return fmt.Errorf("failed to GetPubKeyByAddr: %w", err)

View File

@ -25,9 +25,9 @@ import (
)
type node struct {
client Poller
client Client
keyPair *KeyPair
air *airgapped.AirgappedMachine
air *airgapped.Machine
listenAddr string
}
@ -166,7 +166,6 @@ func TestFullFlow(t *testing.T) {
}
stg, err := storage.NewFileStorage(storagePath)
//stg, err := storage.NewKafkaStorage(context.Background(), "94.130.57.249:9092")
if err != nil {
t.Fatalf("node %d failed to init storage: %v\n", nodeID, err)
}
@ -181,7 +180,7 @@ func TestFullFlow(t *testing.T) {
t.Fatalf("Failed to PutKeys: %v\n", err)
}
airgappedMachine, err := airgapped.NewAirgappedMachine(fmt.Sprintf("/tmp/dc4bc_node_%d_airgapped_db", nodeID))
airgappedMachine, err := airgapped.NewMachine(fmt.Sprintf("/tmp/dc4bc_node_%d_airgapped_db", nodeID))
if err != nil {
t.Fatalf("Failed to create airgapped machine: %v", err)
}
@ -221,7 +220,7 @@ func TestFullFlow(t *testing.T) {
time.Sleep(1 * time.Second)
go nodes[nodeID].run(t)
go func(nodeID int, node Poller) {
go func(nodeID int, node Client) {
if err := node.Poll(); err != nil {
t.Fatalf("client %d poller failed: %v\n", nodeID, err)
}

View File

@ -5,14 +5,15 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"github.com/depools/dc4bc/client/types"
"github.com/depools/dc4bc/fsm/fsm"
spf "github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
sif "github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
"github.com/google/uuid"
"io/ioutil"
"log"
"net/http"
"github.com/depools/dc4bc/qr"
"github.com/depools/dc4bc/storage"
@ -56,7 +57,7 @@ func successResponse(w http.ResponseWriter, response interface{}) {
}
}
func (c *Client) StartHTTPServer(listenAddr string) error {
func (c *BaseClient) StartHTTPServer(listenAddr string) error {
mux := http.NewServeMux()
mux.HandleFunc("/getUsername", c.getUsernameHandler)
@ -77,7 +78,7 @@ func (c *Client) StartHTTPServer(listenAddr string) error {
return http.ListenAndServe(listenAddr, mux)
}
func (c *Client) getUsernameHandler(w http.ResponseWriter, r *http.Request) {
func (c *BaseClient) getUsernameHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
return
@ -85,7 +86,7 @@ func (c *Client) getUsernameHandler(w http.ResponseWriter, r *http.Request) {
successResponse(w, c.GetUsername())
}
func (c *Client) getPubkeyHandler(w http.ResponseWriter, r *http.Request) {
func (c *BaseClient) getPubkeyHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
return
@ -93,7 +94,7 @@ func (c *Client) getPubkeyHandler(w http.ResponseWriter, r *http.Request) {
successResponse(w, c.GetPubKey())
}
func (c *Client) sendMessageHandler(w http.ResponseWriter, r *http.Request) {
func (c *BaseClient) sendMessageHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
return
@ -119,7 +120,7 @@ func (c *Client) sendMessageHandler(w http.ResponseWriter, r *http.Request) {
successResponse(w, "ok")
}
func (c *Client) getOperationsHandler(w http.ResponseWriter, r *http.Request) {
func (c *BaseClient) getOperationsHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
return
@ -134,7 +135,7 @@ func (c *Client) getOperationsHandler(w http.ResponseWriter, r *http.Request) {
successResponse(w, operations)
}
func (c *Client) getOperationQRPathHandler(w http.ResponseWriter, r *http.Request) {
func (c *BaseClient) getOperationQRPathHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
return
@ -150,7 +151,7 @@ func (c *Client) getOperationQRPathHandler(w http.ResponseWriter, r *http.Reques
successResponse(w, qrPaths)
}
func (c *Client) getOperationHandler(w http.ResponseWriter, r *http.Request) {
func (c *BaseClient) getOperationHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
return
@ -166,7 +167,7 @@ func (c *Client) getOperationHandler(w http.ResponseWriter, r *http.Request) {
successResponse(w, operation)
}
func (c *Client) getOperationQRToBodyHandler(w http.ResponseWriter, r *http.Request) {
func (c *BaseClient) getOperationQRToBodyHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
return
@ -190,7 +191,7 @@ func (c *Client) getOperationQRToBodyHandler(w http.ResponseWriter, r *http.Requ
rawResponse(w, encodedData)
}
func (c *Client) startDKGHandler(w http.ResponseWriter, r *http.Request) {
func (c *BaseClient) startDKGHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
return
@ -215,7 +216,7 @@ func (c *Client) startDKGHandler(w http.ResponseWriter, r *http.Request) {
successResponse(w, "ok")
}
func (c *Client) proposeSignDataHandler(w http.ResponseWriter, r *http.Request) {
func (c *BaseClient) proposeSignDataHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
return
@ -244,7 +245,7 @@ func (c *Client) proposeSignDataHandler(w http.ResponseWriter, r *http.Request)
successResponse(w, "ok")
}
func (c *Client) handleJSONOperationHandler(w http.ResponseWriter, r *http.Request) {
func (c *BaseClient) handleJSONOperationHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
errorResponse(w, http.StatusBadRequest, "Wrong HTTP method")
return
@ -270,7 +271,7 @@ func (c *Client) handleJSONOperationHandler(w http.ResponseWriter, r *http.Reque
successResponse(w, "ok")
}
func (c *Client) buildMessage(dkgRoundID string, event fsm.Event, data []byte) (*storage.Message, error) {
func (c *BaseClient) buildMessage(dkgRoundID string, event fsm.Event, data []byte) (*storage.Message, error) {
message := storage.Message{
ID: uuid.New().String(),
DkgRoundID: dkgRoundID,

View File

@ -4,6 +4,7 @@ import (
"fmt"
)
// logger is a glorious logger implementation.
type logger struct {
userName string
}

View File

@ -20,6 +20,8 @@ const (
fsmStateKey = "fsm_state"
)
// State is the client's state (it keeps the offset, the FSM state and
// the Operation pool.
type State interface {
SaveOffset(uint64) error
LoadOffset() (uint64, error)

View File

@ -4,9 +4,10 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
"time"
"github.com/depools/dc4bc/fsm/state_machines/signing_proposal_fsm"
"github.com/depools/dc4bc/fsm/fsm"
"github.com/depools/dc4bc/fsm/state_machines/dkg_proposal_fsm"
"github.com/depools/dc4bc/fsm/state_machines/signature_proposal_fsm"
@ -20,6 +21,8 @@ const (
DKGCommits OperationType = "dkg_commits"
)
// Operation is the type for any Operation that might be required for
// both DKG and signing process (e.g.,
type Operation struct {
ID string // UUID4
Type OperationType

View File

@ -31,11 +31,11 @@ type terminalCommand struct {
// terminal a basic implementation of a prompt
type terminal struct {
reader *bufio.Reader
airgapped *airgapped.AirgappedMachine
airgapped *airgapped.Machine
commands map[string]*terminalCommand
}
func NewTerminal(machine *airgapped.AirgappedMachine) *terminal {
func NewTerminal(machine *airgapped.Machine) *terminal {
t := terminal{bufio.NewReader(os.Stdin), machine, make(map[string]*terminalCommand)}
t.addCommand("read_qr", &terminalCommand{
commandHandler: t.readQRCommand,
@ -273,7 +273,7 @@ func main() {
log.Fatalf("invalid password expiration syntax: %v", err)
}
air, err := airgapped.NewAirgappedMachine(dbPath)
air, err := airgapped.NewMachine(dbPath)
if err != nil {
log.Fatalf("failed to init airgapped machine %v", err)
}

View File

@ -137,7 +137,7 @@ func startClientCommand() *cobra.Command {
log.Println("Received signal, stopping client...")
cancel()
log.Println("Client stopped, exiting")
log.Println("BaseClient stopped, exiting")
os.Exit(0)
}()

View File

@ -15,14 +15,16 @@ import (
"lukechampine.com/frand"
)
// TODO: dump necessary data on disk
// DKG is the type that maintains all active DKG instances and
// data.
type DKG struct {
sync.Mutex
instance *dkg.DistKeyGenerator
deals map[string]*dkg.Deal
commits map[string][]kyber.Point
responses *messageStore
pubkeys PKStore
instance *dkg.DistKeyGenerator
deals map[string]*dkg.Deal
commits map[string][]kyber.Point
responses *messageStore
pubKeys PKStore
pubKey kyber.Point
secKey kyber.Scalar
suite vss.Suite
@ -76,7 +78,7 @@ func (d *DKG) GetSecKey() kyber.Scalar {
}
func (d *DKG) GetPubKeyByParticipant(participant string) (kyber.Point, error) {
pk, err := d.pubkeys.GetPKByParticipant(participant)
pk, err := d.pubKeys.GetPKByParticipant(participant)
if err != nil {
return nil, fmt.Errorf("failed to get pk for participant %s: %w", participant, err)
}
@ -84,18 +86,18 @@ func (d *DKG) GetPubKeyByParticipant(participant string) (kyber.Point, error) {
}
func (d *DKG) GetParticipantByIndex(index int) string {
return d.pubkeys.GetParticipantByIndex(index)
return d.pubKeys.GetParticipantByIndex(index)
}
func (d *DKG) GetPKByIndex(index int) kyber.Point {
return d.pubkeys.GetPKByIndex(index)
return d.pubKeys.GetPKByIndex(index)
}
func (d *DKG) StorePubKey(participant string, pid int, pk kyber.Point) bool {
d.Lock()
defer d.Unlock()
return d.pubkeys.Add(&PK2Participant{
return d.pubKeys.Add(&PK2Participant{
Participant: participant,
PK: pk,
ParticipantID: pid,
@ -103,7 +105,7 @@ func (d *DKG) StorePubKey(participant string, pid int, pk kyber.Point) bool {
}
func (d *DKG) calcParticipantID() int {
for idx, p := range d.pubkeys {
for idx, p := range d.pubKeys {
if p.PK.Equal(d.pubKey) {
return idx
}
@ -112,9 +114,9 @@ func (d *DKG) calcParticipantID() int {
}
func (d *DKG) InitDKGInstance(seed []byte) (err error) {
sort.Sort(d.pubkeys)
sort.Sort(d.pubKeys)
publicKeys := d.pubkeys.GetPKs()
publicKeys := d.pubKeys.GetPKs()
participantsCount := len(publicKeys)
@ -228,7 +230,7 @@ func (d *DKG) processDealCommits(verifier *vss.Verifier, deal *dkg.Deal) (bool,
return false, err
}
participant := d.pubkeys.GetParticipantByIndex(int(deal.Index))
participant := d.pubKeys.GetParticipantByIndex(int(deal.Index))
commitsData, ok := d.commits[participant]

207
go.sum Normal file
View File

@ -0,0 +1,207 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY=
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/corestario/kyber v1.3.0/go.mod h1:kIWfWekm8kSJNti3Fo3DCV0GHEH050MWQrdvZdefbkk=
github.com/corestario/kyber v1.4.0 h1:jSB8P5vBvRDiFESJHxlx9BzH1+E1FDQSuu7xfiCy3HY=
github.com/corestario/kyber v1.4.0/go.mod h1:kIWfWekm8kSJNti3Fo3DCV0GHEH050MWQrdvZdefbkk=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/depools/kyber-bls12381 v0.0.0-20200929134032-c24859b7d890 h1:ra3VcXLAwGdHzcPRXkDVVr2Gb9wpi+XHyljk0J566vs=
github.com/depools/kyber-bls12381 v0.0.0-20200929134032-c24859b7d890/go.mod h1:82QP3olqMtRnlRCNxEc9/EKk1qlFCOklxasHvSnXMSI=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b h1:FQ7+9fxhyp82ks9vAuyPzG0/vVbWwMwLJ+P6yJI5FN8=
github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b/go.mod h1:HMcgvsgd0Fjj4XXDkbjdmlbI505rUPBs6WBMYg2pXks=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f h1:qET3Wx0v8tMtoTOQnsJXVvqvCopSf48qobR6tcJuDHo=
github.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.9.8 h1:VMAMUUOh+gaxKTMk+zqbjsSjsIcUcL/LF4o63i82QyA=
github.com/klauspost/compress v1.9.8/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/looplab/fsm v0.1.0 h1:Qte7Zdn/5hBNbXzP7yxVU4OIFHWXBovyTT2LaBTyC20=
github.com/looplab/fsm v0.1.0/go.mod h1:m2VaOfDHxqXBBMgc26m6yUOwkFn8H2AlJDE+jd/uafI=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/makiuchi-d/gozxing v0.0.0-20190830103442-eaff64b1ceb7 h1:CfWnkHgRG8zmxQI7RAhLIUFPkg+RfDdWiEtoE3y1+4w=
github.com/makiuchi-d/gozxing v0.0.0-20190830103442-eaff64b1ceb7/go.mod h1:WoI7z45M7ZNA5BJxiJHaB+x7+k8S/3phW5Y13IR4yWY=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/segmentio/kafka-go v0.4.2 h1:QXZ6q9Bu1JkAJQ/CQBb2Av8pFRG8LQ0kWCrLXgQyL8c=
github.com/segmentio/kafka-go v0.4.2/go.mod h1:Inh7PqOsxmfgasV8InZYKVXWsdjcCq2d9tFV75GLbuM=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5 h1:u8i49c+BxloX3XQ55cvzFNXplizZP/q00i+IlttUjAU=
github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs=
go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw=
go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ=
go.dedis.ch/kyber/v3 v3.0.9/go.mod h1:rhNjUUg6ahf8HEg5HUvVBYoWY4boAafX8tYxX+PS+qg=
go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo=
go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4=
go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo=
go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
gocv.io/x/gocv v0.24.0 h1:xtm5AnFNUtFvSmU+R/CgX7FguL7EDGEubhDdviX2rPY=
gocv.io/x/gocv v0.24.0/go.mod h1:Rar2PS6DV+T4FL+PM535EImD/h13hGVaHhnCu1xarBs=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191025090151-53bf42e6b339/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 h1:OjiUf46hAmXblsZdnoSXsEUSKU8r1UEzcL5RVZ4gO9Y=
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
lukechampine.com/frand v1.3.0 h1:HFLrwEHr78+EqAfyp8OChgEzdYCVZzzj6Y+cGDQRhaI=
lukechampine.com/frand v1.3.0/go.mod h1:4S/TM2ZgrKejMcKMbeLjISpJMO+/eZ1zu3vYX9dtj3s=