package count

import "github.com/cloudflare/circl/vdaf/prio3/count"

Package count is a VDAF for counting Boolean measurements.

Index

Types

type AggShare

type AggShare = prio3.AggShare[Vec, Fp]

type Count

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

Count is a verifiable distributed aggregation function in which each measurement is either one or zero and the aggregate result is the sum of the measurements.

func New

func New(numShares uint8, context []byte) (c *Count, err error)

func (*Count) AggregateInit

func (c *Count) AggregateInit() AggShare

func (*Count) AggregateUpdate

func (c *Count) AggregateUpdate(aggShare *AggShare, outShare *OutShare)

func (*Count) Params

func (c *Count) Params() prio3.Params

func (*Count) PrepInit

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

func (*Count) PrepNext

func (c *Count) PrepNext(state *PrepState, msg *PrepMessage) (*OutShare, error)

func (*Count) PrepSharesToPrep

func (c *Count) PrepSharesToPrep(prepShares []PrepShare) (*PrepMessage, error)

func (*Count) Shard

func (c *Count) Shard(measurement bool, nonce *Nonce, rand []byte,
) (PublicShare, []InputShare, error)

func (*Count) Unshard

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

type Fp

type Fp = fp64.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 Vec

type Vec = fp64.Vec

type VerifyKey

type VerifyKey = prio3.VerifyKey

Source Files

count.go

Version
v1.6.1 (latest)
Published
Apr 9, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
21 hours ago

Tools for package owners.