Documentation ¶
Index ¶
- func Base_p(p, m, i uint64) uint64
- func Compute_num_entries_base_p(p, log_q uint64) uint64
- func PrevPowerOfTwo(v uint64) uint64
- func Reconstruct_from_base_p(p uint64, vals []uint64) uint64
- type Answer
- type Client
- func (c *Client[T]) ClearHint()
- func (c *Client[T]) Decode(ans *matrix.Matrix[T], index uint64) uint64
- func (c *Client[T]) DecodeMany(ans *matrix.Matrix[T]) []uint64
- func (c *Client[T]) DecodeManyLHE(ans *matrix.Matrix[T]) *matrix.Matrix[T]
- func (c *Client[T]) GenerateSecret() *matrix.Matrix[T]
- func (c *Client[T]) GetL() uint64
- func (c *Client[T]) GetM() uint64
- func (c *Client[T]) GetP() uint64
- func (c *Client[T]) GetSecurityParam() uint64
- func (c *Client[T]) Hint() *matrix.Matrix[T]
- func (c *Client[T]) PreprocessQuery() *Secret[T]
- func (c *Client[T]) PreprocessQueryGivenSecret(inSecret *matrix.Matrix[T]) *Secret[T]
- func (c *Client[T]) PreprocessQueryLHE() *SecretLHE[T]
- func (c *Client[T]) PreprocessQueryLHEGivenSecret(inSecret *matrix.Matrix[T]) *SecretLHE[T]
- func (c *Client[T]) Query(i uint64) (*Secret[T], *Query[T])
- func (c *Client[T]) QueryLHE(arrIn *matrix.Matrix[T]) (*SecretLHE[T], *Query[T])
- func (c *Client[T]) QueryLHEPreprocessed(arrIn *matrix.Matrix[T], s *SecretLHE[T]) *Query[T]
- func (c *Client[T]) QueryPreprocessed(i uint64, s *Secret[T]) *Query[T]
- func (c *Client[T]) Recover(s *Secret[T], ansIn *Answer[T]) uint64
- func (c *Client[T]) RecoverMany(s *Secret[T], ansIn *Answer[T]) []uint64
- func (c *Client[T]) RecoverManyLHE(s *SecretLHE[T], ansIn *Answer[T]) *matrix.Matrix[T]
- type DBInfo
- type Database
- func NewDatabase[T matrix.Elem](num, rowLength uint64, vals []uint64) *Database[T]
- func NewDatabaseFixedParams[T matrix.Elem](Num, rowLength uint64, vals []uint64, params *lwe.Params) *Database[T]
- func NewDatabaseRandom[T matrix.Elem](prg *rand.BufPRGReader, num, rowLength uint64) *Database[T]
- func NewDatabaseRandomFixedParams[T matrix.Elem](prg *rand.BufPRGReader, Num, rowLength uint64, params *lwe.Params) *Database[T]
- type Query
- type Secret
- type SecretLHE
- type Server
- func (s *Server[T]) Answer(query *Query[T]) *Answer[T]
- func (s *Server[T]) DBInfo() *DBInfo
- func (s *Server[T]) DropHint()
- func (s *Server[T]) Get(i uint64) uint64
- func (s *Server[T]) GobDecode(buf []byte) error
- func (s *Server[T]) GobEncode() ([]byte, error)
- func (s *Server[T]) Hint() *matrix.Matrix[T]
- func (s *Server[T]) MatrixA() *rand.PRGKey
- func (s *Server[T]) Params() *lwe.Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compute_num_entries_base_p ¶
Returns how many entries in Z_p are needed to represent an element in Z_q
func PrevPowerOfTwo ¶
func Reconstruct_from_base_p ¶
Returns the element whose base-p decomposition is given by the values in vals
Types ¶
type Client ¶
func NewClientDistributed ¶
func (*Client[T]) DecodeManyLHE ¶
func (*Client[T]) GenerateSecret ¶
func (*Client[T]) GetSecurityParam ¶
func (*Client[T]) PreprocessQuery ¶
func (*Client[T]) PreprocessQueryGivenSecret ¶
func (*Client[T]) PreprocessQueryLHE ¶
func (*Client[T]) PreprocessQueryLHEGivenSecret ¶
func (*Client[T]) QueryLHEPreprocessed ¶
func (*Client[T]) QueryPreprocessed ¶
func (*Client[T]) RecoverMany ¶
type DBInfo ¶
type DBInfo struct { Num uint64 // number of db entries. RowLength uint64 // number of bits per db entry. Ne uint64 // number of Z_p elems per db entry, if db entry size > log(p). X uint64 // tunable param that governs communication, L uint64 // database height M uint64 // database width // For in-memory db compression Squishing uint64 Cols uint64 Params *lwe.Params }
func NewDBInfoFixedParams ¶
func (*DBInfo) ReconstructElem ¶
Store the database with entries decomposed into Z_p elements. Z_p elements that encode the same database entry are stacked vertically below each other.
func (*DBInfo) RecordSize ¶
Number of Z_p elements to represent a DB record
type Database ¶
func NewDatabase ¶
func NewDatabaseFixedParams ¶
func NewDatabaseRandom ¶
type Query ¶
func (*Query[T]) SelectRows ¶
Click to show internal directories.
Click to hide internal directories.