semicentralized

package
v0.0.0-...-4c1e54e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2022 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "SemiCentralizedService"

Variables

This section is empty.

Functions

func SetupByzcoin

func SetupByzcoin(r *onet.Roster, blockInterval int) (cl *byzcoin.Client, admin darc.Signer, gDarc darc.Darc, err error)

Types

type DecryptReply

type DecryptReply struct {
	Data     []byte
	DataHash []byte
	K        kyber.Point
	C        kyber.Point
}

type DecryptRequest

type DecryptRequest struct {
	Write *byzcoin.Proof
	Read  *byzcoin.Proof
	SCID  skipchain.SkipBlockID
	Key   string
	Sig   []byte
}

type SCClient

type SCClient struct {
	BcClient *byzcoin.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(bc *byzcoin.Client) *SCClient

func (*SCClient) AddReadTransaction

func (scCl *SCClient) AddReadTransaction(proof *byzcoin.Proof, signer darc.Signer, darc darc.Darc, wait int) (*TransactionReply, error)

func (*SCClient) AddWriteTransaction

func (scCl *SCClient) AddWriteTransaction(wd *util.WriteData, signer darc.Signer, darc darc.Darc, wait int) (*TransactionReply, error)

func (*SCClient) Decrypt

func (scCl *SCClient) Decrypt(wrProof *byzcoin.Proof, rProof *byzcoin.Proof, key string, sk kyber.Scalar) (*DecryptReply, error)

func (scCl *SCClient) Decrypt(r *onet.Roster, wrProof *byzcoin.Proof, rProof *byzcoin.Proof, key string, sk kyber.Scalar) (*DecryptReply, error) {

func (*SCClient) GetProof

func (scCl *SCClient) GetProof(id byzcoin.InstanceID) (*byzcoin.GetProofResponse, error)

func (*SCClient) SetupDarcs

func (scCl *SCClient) SetupDarcs() (darc.Signer, darc.Signer, *darc.Darc, error)

func (*SCClient) SpawnDarc

func (scCl *SCClient) SpawnDarc(signer darc.Signer, spawnDarc darc.Darc, controlDarc darc.Darc, wait int) (*byzcoin.AddTxResponse, error)

func (*SCClient) StoreData

func (scCl *SCClient) StoreData(data []byte, dataHash []byte) (*StoreReply, error)

func (scCl *SCClient) StoreData(r *onet.Roster, data []byte, dataHash []byte) (*StoreReply, error) {

type SemiCentralizedDB

type SemiCentralizedDB struct {
	*bolt.DB
	// contains filtered or unexported fields
}

func NewSemiCentralizedDB

func NewSemiCentralizedDB(db *bolt.DB, bn []byte) *SemiCentralizedDB

func (*SemiCentralizedDB) GetStoredData

func (sdb *SemiCentralizedDB) GetStoredData(key string) (*StoreRequest, error)

func (*SemiCentralizedDB) StoreData

func (sdb *SemiCentralizedDB) StoreData(req *StoreRequest) (key string, err error)

type Service

type Service struct {
	// We need to embed the ServiceProcessor, so that incoming messages
	// are correctly handled.
	*onet.ServiceProcessor
	// contains filtered or unexported fields
}

Service is our template-service

func (*Service) Decrypt

func (s *Service) Decrypt(req *DecryptRequest) (*DecryptReply, error)

func (*Service) StoreData

func (s *Service) StoreData(req *StoreRequest) (*StoreReply, error)

type StoreReply

type StoreReply struct {
	StoredKey string
}

type StoreRequest

type StoreRequest struct {
	Data     []byte
	DataHash []byte
}

type TransactionReply

type TransactionReply struct {
	*byzcoin.AddTxResponse
	byzcoin.InstanceID
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL