mpc

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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Op_OR  boolOp = iota
	Op_AND boolOp = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

type Aggregator struct {
	Values []*big.Int
	Names  []string
	// contains filtered or unexported fields
}

Holds aggregates statistics computed by the Prio instance.

func NewAggregator

func NewAggregator(cfg *config.Config) *Aggregator

func (*Aggregator) Combine

func (agg *Aggregator) Combine(other *Aggregator)

func (*Aggregator) Copy

func (agg *Aggregator) Copy() *Aggregator

func (*Aggregator) Reset

func (agg *Aggregator) Reset()

func (*Aggregator) String

func (agg *Aggregator) String() string

func (*Aggregator) Update

func (agg *Aggregator) Update(chk *Checker)

type Checker

type Checker struct {
	N int // n rounded up to a power of two
	// contains filtered or unexported fields
}

Checker holds all of the state needed to check the validity of a single client submission.

func NewChecker

func NewChecker(cfg *config.Config, serverIdx int, leaderIdx int) *Checker

func (*Checker) Cor

func (c *Checker) Cor(sharesIn []*CorShare) *Cor

func (*Checker) CorShare

func (c *Checker) CorShare(out *CorShare, pre *CheckerPrecomp)

func (*Checker) OutShare

func (c *Checker) OutShare(out *OutShare, corIn *Cor, key *utils.PRGKey)

func (*Checker) OutputIsValid

func (c *Checker) OutputIsValid(sharesIn []*OutShare) bool

func (*Checker) Outputs

func (c *Checker) Outputs() []*circuit.Gate

func (*Checker) RandomX

func (c *Checker) RandomX() *big.Int

func (*Checker) SetReq

func (c *Checker) SetReq(req *ClientRequest)

Set-up the checker to check a new client submission req.

type CheckerPrecomp

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

Structure holding precomputed data for doing combined polynomial interpolation+evaluation at a fixed point x.

func NewCheckerPrecomp

func NewCheckerPrecomp(cfg *config.Config) *CheckerPrecomp

func (*CheckerPrecomp) SetCheckerPrecomp

func (pre *CheckerPrecomp) SetCheckerPrecomp(x *big.Int)

type ClientRequest

type ClientRequest struct {
	Hint *share.PRGHints

	// Compressed representation of Beaver triples for the
	// batch checking and for the main MPC protocol.
	TripleShare *triple.Share
}

The data struct that the client gives to each server.

func RandomRequest

func RandomRequest(cfg *config.Config, leaderForReq int) []*ClientRequest

type Cor

type Cor struct {
	D *big.Int
	E *big.Int
}

type CorShare

type CorShare struct {
	ShareD *big.Int
	ShareE *big.Int
}

type OutShare

type OutShare struct {
	Check *big.Int
}

Jump to

Keyboard shortcuts

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