sumvec

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package sumvec is a VDAF for aggregating vectors of integers in a pre-determined range.

Index

Constants

This section is empty.

Variables

View Source
var ErrBits = errors.New("bits larger than 64 is not supported")

Functions

This section is empty.

Types

type AggShare

type AggShare = prio3.AggShare[Vec, Fp]

type Fp

type Fp = fp128.Fp

type InputShare

type InputShare = prio3.InputShare[Vec, Fp]

type Nonce

type Nonce = prio3.Nonce

type OutShare

type OutShare = prio3.OutShare[Vec, Fp]

type PrepMessage

type PrepMessage = prio3.PrepMessage

type PrepShare

type PrepShare = prio3.PrepShare[Vec, Fp]

type PrepState

type PrepState = prio3.PrepState[Vec, Fp]

type PublicShare

type PublicShare = prio3.PublicShare

type SumVec

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

SumVec is a verifiable distributed aggregation function in which each measurement is a fixed-length vector of integers in the range [0, 2^bits). the aggregated result is the sum of all the vectors.

func New

func New(numShares uint8, length, bits, chunkLength uint, context []byte) (s *SumVec, err error)

func (*SumVec) AggregateInit

func (s *SumVec) AggregateInit() AggShare

func (*SumVec) AggregateUpdate

func (s *SumVec) AggregateUpdate(aggShare *AggShare, outShare *OutShare)

func (*SumVec) Params

func (s *SumVec) Params() prio3.Params

func (*SumVec) PrepInit

func (s *SumVec) PrepInit(
	verifyKey *VerifyKey,
	nonce *Nonce,
	aggID uint8,
	publicShare PublicShare,
	inputShare InputShare,
) (*PrepState, *PrepShare, error)

func (*SumVec) PrepNext

func (s *SumVec) PrepNext(state *PrepState, msg *PrepMessage) (*OutShare, error)

func (*SumVec) PrepSharesToPrep

func (s *SumVec) PrepSharesToPrep(prepShares []PrepShare) (*PrepMessage, error)

func (*SumVec) Shard

func (s *SumVec) Shard(measurement []uint64, nonce *Nonce, rand []byte,
) (PublicShare, []InputShare, error)

func (*SumVec) Unshard

func (s *SumVec) Unshard(aggShares []AggShare, numMeas uint) (aggregate *[]uint64, err error)

type Vec

type Vec = fp128.Vec

type VerifyKey

type VerifyKey = prio3.VerifyKey

Jump to

Keyboard shortcuts

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