public class EncryptQuery
extends java.lang.Object
| Constructor and Description |
|---|
EncryptQuery(QueryInfo queryInfo,
java.util.List<java.lang.String> selectors,
Paillier paillier)
Constructs a query encryptor using the given query information, selectors, and Paillier cryptosystem.
|
| Modifier and Type | Method and Description |
|---|---|
Querier |
encrypt()
Encrypts the query described by the query information using Paillier encryption.
|
Querier |
encrypt(int numThreads)
Encrypts the query described by the query information using Paillier encryption using the given number of threads.
|
public EncryptQuery(QueryInfo queryInfo, java.util.List<java.lang.String> selectors, Paillier paillier)
queryInfo - Fundamental information about the query.selectors - the list of selectors for this query.paillier - the Paillier cryptosystem to use.public Querier encrypt() throws java.lang.InterruptedException, PIRException
The encryption builds a Querier object, calculating and setting the query vectors.
Uses the system configured number of threads to conduct the encryption, or a single thread if the configuration has not been set.
java.lang.InterruptedException - If the task was interrupted during encryption.PIRException - If a problem occurs performing the encryption.public Querier encrypt(int numThreads) throws java.lang.InterruptedException, PIRException
The encryption builds a Querier object, calculating and setting the query vectors.
If we have hash collisions over our selector set, we will append integers to the key starting with 0 until we no longer have collisions.
For encrypted query vector E =
E_i = 2^{j*dataPartitionBitSize} if i = H_k(selector_j) 0 otherwise
numThreads - the number of threads to use when performing the encryption.java.lang.InterruptedException - If the task was interrupted during encryption.PIRException - If a problem occurs performing the encryption.