proto

package
v0.0.0-...-89ef835 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: ISC Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashToServer

func HashToServer(cfg *config.Config, uuid Uuid) int

func NewCheckerPool

func NewCheckerPool(cfg *config.Config, serverIdx int, leaderIdx int) *checkerPool

Types

type AcceptArgs

type AcceptArgs struct {
	RequestID Uuid
	Accept    bool
}

Decide whether to accept/reject client submission.

type AcceptReply

type AcceptReply struct {
}

type AggregateArgs

type AggregateArgs struct {
	Server uint
	Serial uint
}

type AggregateReply

type AggregateReply struct {
}

type ChangePolyPointArgs

type ChangePolyPointArgs struct {
	Server  int
	RandomX *big.Int
}

type EvalCircuitArgs

type EvalCircuitArgs struct {
	RequestID Uuid
}

type EvalCircuitReply

type EvalCircuitReply struct {
	CorShare *mpc.CorShare
}

First step of the MPC multiplication.

type FinalCircuitArgs

type FinalCircuitArgs struct {
	RequestID Uuid
	Cor       *mpc.Cor
	Key       *utils.PRGKey
}

Second step of the MPC multiplication.

type Leader

type Leader struct {
	// contains filtered or unexported fields
}

The leader coordinates the processing of each client submission. Every server is also a leader, but each client submission gets assigned to one particular leader.

func NewLeader

func NewLeader(server *Server) *Leader

func (*Leader) Run

func (l *Leader) Run()

Start up the server.

type NewRequestArgs

type NewRequestArgs struct {
	RequestID  Uuid
	Ciphertext ServerCiphertext
}

type NewRequestReply

type NewRequestReply struct {
}

type NothingServer

type NothingServer struct {
	// contains filtered or unexported fields
}

A server that does nothing, just for performance comparison purposes.

func NewNothingServer

func NewNothingServer() *NothingServer

func (*NothingServer) Upload

func (s *NothingServer) Upload(args *UploadArgs, reply *UploadReply) error

type PublicServer

type PublicServer struct {
	// contains filtered or unexported fields
}

This is the object that we expose via the RPC. It hides the private server methods.

func NewPublicServer

func NewPublicServer(server *Server) *PublicServer

func (*PublicServer) Upload

func (s *PublicServer) Upload(args *UploadArgs, reply *UploadReply) error

type PublishArgs

type PublishArgs struct {
	Server uint
	Epoch  uint
	Agg    *mpc.Aggregator
}

type PublishReply

type PublishReply struct {
}

type RequestStatus

type RequestStatus struct {
	// contains filtered or unexported fields
}

type Server

type Server struct {
	ServerIdx int

	LeaderClient *rpc.Client
	// contains filtered or unexported fields
}

This is the object that holds all of the state of the Prio server.

func NewServer

func NewServer(cfg *config.Config, idx int) *Server

func (*Server) Accept

func (s *Server) Accept(args *AcceptArgs, reply *AcceptReply) error

func (*Server) Aggregate

func (s *Server) Aggregate(args *AggregateArgs, reply *AggregateReply) error

func (*Server) ChangePolyPoint

func (s *Server) ChangePolyPoint(args *ChangePolyPointArgs, reply *int) error

func (*Server) EvalCircuit

func (s *Server) EvalCircuit(args *EvalCircuitArgs, reply *mpc.CorShare) error

func (*Server) FinalCircuit

func (s *Server) FinalCircuit(args *FinalCircuitArgs, reply *mpc.OutShare) error

func (*Server) NewRequest

func (s *Server) NewRequest(args *NewRequestArgs, reply *NewRequestReply) error

func (*Server) Publish

func (s *Server) Publish(args *PublishArgs, reply *PublishReply) error

type ServerCiphertext

type ServerCiphertext struct {
	Nonce      [24]byte // NaCl Box nonce
	Ciphertext []byte   // Encrypted upload payload
}

type StatusFlag

type StatusFlag int
const (
	NotStarted    StatusFlag = iota
	OpenedTriples StatusFlag = iota
	Layer1        StatusFlag = iota
	Finished      StatusFlag = iota
)

Status of a client submission.

type UploadArgs

type UploadArgs struct {
	PublicKey   [32]byte // NaCl Box public key
	Ciphertexts []ServerCiphertext
}

Request from client to server to update the server DB state with fresh data from a client.

func GenDummyUploadArgs

func GenDummyUploadArgs(cfg *config.Config, reqs []*mpc.ClientRequest) (*UploadArgs, error)

func GenUploadArgs

func GenUploadArgs(cfg *config.Config, leaderIdx int, reqs []*mpc.ClientRequest) (*UploadArgs, error)

Generate a request that targets a particular leader node. If the leader ID is < 0, then a random server is the leader.

type UploadReply

type UploadReply struct {
}

type Uuid

type Uuid [32]byte

Jump to

Keyboard shortcuts

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