histogram

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

Documentation

Overview

Package histogram is a VDAF for aggregating integer measurements into buckets.

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 Fp

type Fp = fp128.Fp

type Histogram

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

Histogram is a verifiable distributed aggregation function in which each measurement increments by one the histogram bucket, out of a set of fixed buckets, and the aggregate result counts the number of measurements in each bucket.

func New

func New(numShares uint8, length, chunkLen uint, context []byte) (h *Histogram, err error)

func (*Histogram) AggregateInit

func (h *Histogram) AggregateInit() AggShare

func (*Histogram) AggregateUpdate

func (h *Histogram) AggregateUpdate(aggShare *AggShare, outShare *OutShare)

func (*Histogram) Params

func (h *Histogram) Params() prio3.Params

func (*Histogram) PrepInit

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

func (*Histogram) PrepNext

func (h *Histogram) PrepNext(state *PrepState, msg *PrepMessage) (*OutShare, error)

func (*Histogram) PrepSharesToPrep

func (h *Histogram) PrepSharesToPrep(prepShares []PrepShare) (*PrepMessage, error)

func (*Histogram) Shard

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

func (*Histogram) Unshard

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

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 = 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