libfss

package
v0.0.0-...-03c7df9 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CWLt

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

type Fss

type Fss struct {
	// store keys used in fixedBlocks so that they can be sent to the server
	PrfKeys     [][]byte
	FixedBlocks []cipher.Block
	M           uint // used only in multiparty. It is default to 4. If you want to change this, you should also change the size of the CWs in the multiparty keys.
	N           uint
	NumBits     uint   // number of bits in domain
	Temp        []byte // temporary slices so that we only need to allocate memory at the beginning
	Out         []byte
}

func ClientInitialize

func ClientInitialize(numBits uint) *Fss

Initialize client with this function numBits represents the input domain for the function, i.e. the number of bits to check

func ServerInitialize

func ServerInitialize(prfKeys [][]byte, numBits uint) *Fss

Upon receiving query from client, initialize server with this function. The server, unlike the client receives prfKeys, so it doesn't need to pick random ones

func (Fss) EvaluateEqMP

func (f Fss) EvaluateEqMP(k FssKeyEqMP, x uint) uint32

func (Fss) EvaluateLt

func (f Fss) EvaluateLt(k ServerKeyLt, x uint) uint

This is the 2-party FSS evaluation function for interval functions, i.e. <,> functions. The usage is similar to 2-party FSS for equality functions

func (Fss) EvaluatePF

func (f Fss) EvaluatePF(serverNum byte, k FssKeyEq2P, x uint) int

func (Fss) GenerateTreeEqMP

func (f Fss) GenerateTreeEqMP(a, b, num_p uint) []FssKeyEqMP

func (Fss) GenerateTreeLt

func (f Fss) GenerateTreeLt(a, b uint) []ServerKeyLt

func (Fss) GenerateTreePF

func (f Fss) GenerateTreePF(a, b uint) []FssKeyEq2P

type FssKeyEq2P

type FssKeyEq2P struct {
	SInit   []byte
	TInit   byte
	CW      [][]byte // there are n
	FinalCW int
}

type FssKeyEqMP

type FssKeyEqMP struct {
	NumParties uint
	CW         [][]uint32 //Assume CW is 32-bit because f.M is 4. If you change f.M, you should change this
	Sigma      [][]byte
}

type ServerKeyLt

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

Jump to

Keyboard shortcuts

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