Percy++
A C++ implementation of Private Information Retrieval (PIR) protocols
|
Public Member Functions | |
AGParams (dbsize_t num_blocks, dbsize_t block_size, dbsize_t N=50, dbsize_t word_size=20, dbsize_t virtual_block_size=1) | |
dbsize_t | N () const |
AG_Element | p () const |
AG_Element | q () const |
dbsize_t | block_rows () const |
virtual dbsize_t | request_size (nqueries_t num_queries=1) const |
Get the size of a client to server request. More... | |
virtual dbsize_t | response_size (nqueries_t num_queries=1) const |
Get the size of a server to client response. More... | |
virtual void | print_mode_specific (std::ostream &os) const |
Print mode-specific parameters. More... | |
virtual std::vector< const PercyParams * > | create_worker_params (std::vector< Dimension > worker_dims) const |
Create protocol parameters for threads/workers. More... | |
Public Member Functions inherited from PercyParams | |
PercyParams (dbsize_t num_blocks, dbsize_t block_size, dbsize_t word_size, PercyMode mode, nservers_t tau=0, dbsize_t virtual_block_size=1) | |
Constructor. More... | |
virtual | ~PercyParams () |
Destructor. More... | |
dbsize_t | num_blocks () const |
Get the number of blocks in the database. More... | |
dbsize_t | block_size () const |
Get the size of each block in the database in bytes. More... | |
virtual dbsize_t | server_block_size () const |
Get the size of each block in the database that the datastore will actually use. More... | |
dbsize_t | word_size () const |
Get the word size used to split blocks. More... | |
dbsize_t | words_per_block () const |
Get the number of words per database block. More... | |
PercyMode | get_mode () const |
Get the protocol being used. More... | |
nservers_t | tau () const |
Get the level of tau-independence. More... | |
dbsize_t | num_virtual_blocks () const |
Get the number of virtual blocks when being used as one iteration of a recursive protocol. More... | |
dbsize_t | virtual_block_size () const |
Get the number of actual blocks in a virtual block when being used as one iteration of a recursive protocol. More... | |
void | print (std::ostream &os) const |
Prints the parameters in CSV form. More... | |
virtual bool | is_recursive () const |
Check if the protocol is recursive. More... | |
Protected Member Functions | |
virtual void | write (std::ostream &os) const |
Write the parameters to a stream to check compatibility. More... | |
virtual bool | check_compatible (std::istream &is) const |
Read the parameters from a stream (as written by write()) and check that they are compatible with these parameters. More... | |
Protected Attributes | |
dbsize_t | _N |
AG_Element | _p |
AG_Element | _q |
dbsize_t | _block_rows |
Protected Attributes inherited from PercyParams | |
unsigned char | version [3] |
Percy++ version. More... | |
dbsize_t | _num_blocks |
Number of database blocks. More... | |
dbsize_t | _block_size |
Size of database blocks in bytes. More... | |
dbsize_t | _word_size |
Word size used to split blocks. More... | |
dbsize_t | _words_per_block |
Number of words per database block. More... | |
PercyMode | mode |
Protocol being used. More... | |
nservers_t | _tau |
Level of tau-independence. More... | |
dbsize_t | _num_virtual_blocks |
Number of virtual blocks when part of a recursive protocol. More... | |
dbsize_t | _virtual_block_size |
Number of actual blocks per virtual block when part of a recursive protocol. More... | |
|
protectedvirtual |
Read the parameters from a stream (as written by write()) and check that they are compatible with these parameters.
is | Stream to read from. |
Reimplemented from PercyParams.
|
virtual |
Create protocol parameters for threads/workers.
worker_dims The database dimensions for each thread/worker.
Implements PercyParams.
|
virtual |
Print mode-specific parameters.
Meant to be overloaded by subclasses to print more details about that mode. Is used by print() to print the mode_specific column.
os | Stream to print to. |
Reimplemented from PercyParams.
|
virtual |
Get the size of a client to server request.
num_queries | The number of queries in the request. (Default: 1) |
Implements PercyParams.
|
virtual |
Get the size of a server to client response.
num_queries | The number of queries in the request. (Default: 1) |
Implements PercyParams.
|
protectedvirtual |
Write the parameters to a stream to check compatibility.
os | Stream to write to. |
Reimplemented from PercyParams.