dbfv

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CKG

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

func NewCKG

func NewCKG(context *ring.Context, crs *ring.Poly) *CKG

func (*CKG) AggregateShares

func (ckg *CKG) AggregateShares(shares []*ring.Poly) error

func (*CKG) Finalize

func (ckg *CKG) Finalize() (*bfv.PublicKey, error)

func (*CKG) GenShare

func (ckg *CKG) GenShare(sk *ring.Poly) error

func (*CKG) GetShare

func (ckg *CKG) GetShare() *ring.Poly

type CKS

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

func NewCKS

func NewCKS(skInput, skOutput *ring.Poly, context *ring.Context, sigmaSmudging float64) *CKS

func (*CKS) Aggregate

func (cks *CKS) Aggregate(c0 *ring.Poly, h []*ring.Poly)

func (*CKS) KeySwitch

func (cks *CKS) KeySwitch(c1 *ring.Poly) *ring.Poly

type CRPGenerator

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

Common Reference Polynomial Generator

func NewCRPGenerator

func NewCRPGenerator(key []byte, context *ring.Context) (*CRPGenerator, error)

func (*CRPGenerator) Clock

func (crpgenerator *CRPGenerator) Clock() *ring.Poly

func (*CRPGenerator) GetClock

func (crpgenerator *CRPGenerator) GetClock() uint64

func (*CRPGenerator) GetSeed

func (crpgenerator *CRPGenerator) GetSeed() []byte

func (*CRPGenerator) Seed

func (crpgenerator *CRPGenerator) Seed(seed []byte)

func (*CRPGenerator) SetClock

func (crpgenerator *CRPGenerator) SetClock(n uint64) error

type EkgProtocol

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

func NewEkgProtocol

func NewEkgProtocol(context *ring.Context, bitDecomp uint64) *EkgProtocol

func (*EkgProtocol) Aggregate

func (ekg *EkgProtocol) Aggregate(sk *ring.Poly, samples [][][]*ring.Poly, crp [][]*ring.Poly) (h [][][2]*ring.Poly)

Round 2

func (*EkgProtocol) ComputeEVK

func (ekg *EkgProtocol) ComputeEVK(h1 [][][]*ring.Poly, h [][][2]*ring.Poly) (collectiveEVK [][][2]*ring.Poly)

func (*EkgProtocol) GenSamples

func (ekg *EkgProtocol) GenSamples(u, sk *ring.Poly, crp [][]*ring.Poly) (h [][]*ring.Poly)

Ephemeral Key u (needs to be stored among the 3 first round)

func (*EkgProtocol) KeySwitch

func (ekg *EkgProtocol) KeySwitch(u, sk *ring.Poly, samples [][][2]*ring.Poly) (h1 [][]*ring.Poly)

Part 2

func (*EkgProtocol) NewEphemeralKey

func (ekg *EkgProtocol) NewEphemeralKey() *ring.Poly

Ephemeral Key u (needs to be stored among the 3 first round)

func (*EkgProtocol) Sum

func (ekg *EkgProtocol) Sum(samples [][][][2]*ring.Poly) (h [][][2]*ring.Poly)

Part 1

type EkgProtocolNaive

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

func NewEkgProtocolNaive

func NewEkgProtocolNaive(context *ring.Context, bitDecomp uint64) *EkgProtocolNaive

func (*EkgProtocolNaive) Aggregate

func (ekg *EkgProtocolNaive) Aggregate(sk *ring.Poly, pk [2]*ring.Poly, samples [][][][2]*ring.Poly) (h [][][2]*ring.Poly)

func (*EkgProtocolNaive) Finalize

func (ekg *EkgProtocolNaive) Finalize(h [][][][2]*ring.Poly) (evaluationKey [][][2]*ring.Poly)

func (*EkgProtocolNaive) GenSamples

func (ekg *EkgProtocolNaive) GenSamples(sk *ring.Poly, pk [2]*ring.Poly) (h [][][2]*ring.Poly)

type PCKS

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

func NewPCKS

func NewPCKS(skInput *ring.Poly, pkOutput [2]*ring.Poly, context *ring.Context, sigmaSmudging float64) *PCKS

func (*PCKS) Aggregate

func (pcks *PCKS) Aggregate(ct []*ring.Poly, h [][2]*ring.Poly)

func (*PCKS) KeySwitch

func (pcks *PCKS) KeySwitch(ct1 *ring.Poly) (h [2]*ring.Poly)

type PRNG

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

func NewPRNG

func NewPRNG(key []byte) (*PRNG, error)

NewPRNG creates a new instance of PRNG Accepts an optional key, if no key, call with key=nill

func (*PRNG) Clock

func (prng *PRNG) Clock() []byte

Clock returns the right part of the digest value of the current PRNG state and reseeds the PRNG with the left part of the digest value. Increases the clock cycle by 1.

func (*PRNG) GetClock

func (prng *PRNG) GetClock() uint64

GetClock returns the value of the clock cycle of the PRNG

func (*PRNG) GetSeed

func (prng *PRNG) GetSeed() []byte

func (*PRNG) Seed

func (prng *PRNG) Seed(seed []byte)

Seed resets the current state of the PRNG (without changing the optional key) and seeds it with the given bytes. Seed will also reset the clock cycle to 0.

func (*PRNG) SetClock

func (prng *PRNG) SetClock(n uint64) error

Sets the clock cycle of the PRNG to a given number. Returns an error if the target clock cycle is smaller than the current clock cycle.

Jump to

Keyboard shortcuts

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