count

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package count is a VDAF for counting Boolean measurements.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

Jump to

Keyboard shortcuts

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