Documentation ¶
Index ¶
- Constants
- type Amplify
- type Client
- type DH
- type LWE
- type LWE128
- type PIR
- type PredicateAPIR
- func (c *PredicateAPIR) Query(q *query.ClientFSS, numServers int) []*query.FSS
- func (c *PredicateAPIR) QueryBytes(in []byte, numServers int) ([][]byte, error)
- func (c *PredicateAPIR) Reconstruct(answers [][]uint32) (uint32, error)
- func (c *PredicateAPIR) ReconstructBytes(a [][]byte) (interface{}, error)
- type PredicatePIR
- func (c *PredicatePIR) Query(q *query.ClientFSS, numServers int) []*query.FSS
- func (c *PredicatePIR) QueryBytes(in []byte, numServers int) ([][]byte, error)
- func (c *PredicatePIR) Reconstruct(answers [][]uint32) (uint32, error)
- func (c *PredicatePIR) ReconstructBytes(answers [][]byte) (interface{}, error)
- type StateLWE
- type StateLWE128
Constants ¶
const BlockLength = 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Amplify ¶
type Amplify struct {
// contains filtered or unexported fields
}
func NewAmplify ¶
func (*Amplify) Reconstruct ¶
type Client ¶
type Client interface { QueryBytes([]byte, int) ([][]byte, error) ReconstructBytes([][]byte) (interface{}, error) }
Client represents the client for all (A)PIR clients implemented in the package
type DH ¶
type DH struct {
// contains filtered or unexported fields
}
Single-server tag retrieval scheme
func (*DH) QueryBytes ¶
QueryBytes takes as input the index of an entry in the database and returns the query for the server encoded in bytes
func (*DH) ReconstructBytes ¶
type LWE128 ¶
type LWE128 struct {
// contains filtered or unexported fields
}
Client description
func (*LWE128) Reconstruct ¶
type PIR ¶
type PIR struct {
// contains filtered or unexported fields
}
Client for the information theoretic classical PIR multi-bit scheme
func NewPIR ¶
NewPIR return a client for the classical PIR multi-bit scheme in GF(2), working both with the vector and the rebalanced representation of the database.
func (*PIR) Query ¶
Query performs a client query for the given database index to numServers servers. This function performs both vector and rebalanced query depending on the database representation
func (*PIR) QueryBytes ¶
QueryBytes is wrapper around Query to implement the Client interface
func (*PIR) Reconstruct ¶
Reconstruct reconstruct the entry of the database from answers
func (*PIR) ReconstructBytes ¶
ReconstructBytes returns []byte
type PredicateAPIR ¶
type PredicateAPIR struct {
// contains filtered or unexported fields
}
PredicateAPIR represent the client for the FSS-based complex-queries non-verifiable PIR
func NewPredicateAPIR ¶
func NewPredicateAPIR(rnd io.Reader, info *database.Info) *PredicateAPIR
NewFSS returns a new client for the FSS-based single- and multi-bit schemes
func (*PredicateAPIR) Query ¶
Query takes as input the index of the entry to be retrieved and the number of servers (= 2 in the DPF case). It returns the two FSS keys.
func (*PredicateAPIR) QueryBytes ¶
func (c *PredicateAPIR) QueryBytes(in []byte, numServers int) ([][]byte, error)
QueryBytes executes Query and encodes the result a byte array for each server
func (*PredicateAPIR) Reconstruct ¶
func (c *PredicateAPIR) Reconstruct(answers [][]uint32) (uint32, error)
Reconstruct takes as input the answers from the client and returns the reconstructed entry after the appropriate integrity check.
func (*PredicateAPIR) ReconstructBytes ¶
func (c *PredicateAPIR) ReconstructBytes(a [][]byte) (interface{}, error)
ReconstructBytes decodes the answers from the servers and reconstruct the entry, returned as []uint32
type PredicatePIR ¶
type PredicatePIR struct {
// contains filtered or unexported fields
}
PredicatePIR represent the client for the FSS-based complex-queries non-verifiable PIR
func NewPredicatePIR ¶
func NewPredicatePIR(rnd io.Reader, info *database.Info) *PredicatePIR
NewPredicatePIR returns a new client for the DPF-base multi-bit classical PIR scheme
func (*PredicatePIR) Query ¶
Query outputs the queries, i.e. DPF keys, for index i. The DPF implementation assumes two servers.
func (*PredicatePIR) QueryBytes ¶
func (c *PredicatePIR) QueryBytes(in []byte, numServers int) ([][]byte, error)
QueryBytes executes Query and encodes the result a byte array for each server
func (*PredicatePIR) Reconstruct ¶
func (c *PredicatePIR) Reconstruct(answers [][]uint32) (uint32, error)
Reconstruct reconstruct the entry of the database from answers
func (*PredicatePIR) ReconstructBytes ¶
func (c *PredicatePIR) ReconstructBytes(answers [][]byte) (interface{}, error)
ReconstructBytes returns []byte