server

package
v0.0.0-...-7a7f204 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amplify

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

func NewAmplify

func NewAmplify(db *database.LWE) *Amplify

func (*Amplify) Answer

func (a *Amplify) Answer(qq []*matrix.Matrix) []*matrix.Matrix

func (*Amplify) AnswerBytes

func (a *Amplify) AnswerBytes(qq []byte) ([]byte, error)

func (*Amplify) DBInfo

func (a *Amplify) DBInfo() *database.Info

type DH

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

A DH server for the single-server DL-based tag retrieval

func NewDH

func NewDH(db *database.Elliptic) *DH

func (*DH) AnswerBytes

func (s *DH) AnswerBytes(q []byte) ([]byte, error)

type LWE

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

func NewLWE

func NewLWE(db *database.LWE) *LWE

func (*LWE) Answer

func (s *LWE) Answer(q *matrix.Matrix) *matrix.Matrix

Answer function for the LWE-based scheme. The query is represented as a vector

func (*LWE) AnswerBytes

func (s *LWE) AnswerBytes(q []byte) ([]byte, error)

func (*LWE) DBInfo

func (s *LWE) DBInfo() *database.Info

type LWE128

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

func NewLWE128

func NewLWE128(db *database.LWE128) *LWE128

func (*LWE128) Answer

func (s *LWE128) Answer(q *matrix.Matrix128) *matrix.Matrix128

Answer function for the LWE-based scheme. The query is represented as a vector

func (*LWE128) AnswerBytes

func (s *LWE128) AnswerBytes(q []byte) ([]byte, error)

func (*LWE128) DBInfo

func (s *LWE128) DBInfo() *database.Info

type PIR

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

PIR is the server for the information theoretic classical PIR scheme working in GF(2). This scheme is used for point queries, both in the authenticated and unauthenticated setting. The former adds Merkle-tree based authentication information to the database entries, but this is trasparent from the server perspective and only changes the database creation.

func NewPIR

func NewPIR(db *database.Bytes, cores ...int) *PIR

NewPIR return a server for the information theoretic single-bit scheme, working both with the vector and the rebalanced representation of the database.

func NewPIRTwo

func NewPIRTwo(db *database.Bytes, cores ...int) *PIR

func (*PIR) Answer

func (s *PIR) Answer(q []byte) []byte

Answer computes the answer for the given query

func (*PIR) AnswerBytes

func (s *PIR) AnswerBytes(q []byte) ([]byte, error)

AnswerBytes computes the answer for the given query encoded in bytes

func (*PIR) DBInfo

func (s *PIR) DBInfo() *database.Info

DBInfo returns database info

type PredicateAPIR

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

PredicateAPIR represent the server for the FSS-based complex-queries authenticated PIR

func NewPredicateAPIR

func NewPredicateAPIR(db *database.DB, serverNum byte, cores ...int) *PredicateAPIR

func (*PredicateAPIR) Answer

func (s *PredicateAPIR) Answer(q *query.FSS) []uint32

func (*PredicateAPIR) AnswerBytes

func (s *PredicateAPIR) AnswerBytes(q []byte) ([]byte, error)

func (*PredicateAPIR) DBInfo

func (s *PredicateAPIR) DBInfo() *database.Info

type PredicatePIR

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

PredicatePIR represent the server for the FSS-based complex-queries unauthenticated PIR

func NewPredicatePIR

func NewPredicatePIR(db *database.DB, serverNum byte, cores ...int) *PredicatePIR

NewPredicatePIR initializes and returns a new server for FSS-based classical PIR

func (*PredicatePIR) Answer

func (s *PredicatePIR) Answer(q *query.FSS) []uint32

Answer computes the answer for the given query

func (*PredicatePIR) AnswerBytes

func (s *PredicatePIR) AnswerBytes(q []byte) ([]byte, error)

AnswerBytes computes the answer for the given query encoded in bytes

func (*PredicatePIR) DBInfo

func (s *PredicatePIR) DBInfo() *database.Info

DBInfo returns database info

type Server

type Server interface {
	AnswerBytes([]byte) ([]byte, error)
	DBInfo() *database.Info
}

Server is a scheme-agnostic VPIR server interface, implemented by both IT and DPF-based schemes

Jump to

Keyboard shortcuts

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