public class Responder
extends java.lang.Object
Used primarily for testing, although it can be used anywhere in standalone mode
Does not bound the number of hits that can be returned per selector
Does not use the DataFilter class -- assumes all filtering happens before calling addDataElement()
NOTE: Only uses in expLookupTables that are contained in the Query object, not in hdfs as this is a standalone responder
Modifier and Type | Method and Description |
---|---|
void |
addDataElement(java.lang.String selector,
org.json.simple.JSONObject jsonData)
Method to add a data element associated with the given selector to the Response
|
void |
computeStandaloneResponse()
Method to compute the standalone response
|
java.util.TreeMap<java.lang.Integer,java.math.BigInteger> |
getColumns() |
Response |
getResponse() |
void |
setResponseElements() |
public Responder(Query queryInput)
public Response getResponse()
public java.util.TreeMap<java.lang.Integer,java.math.BigInteger> getColumns()
public void computeStandaloneResponse() throws java.io.IOException
Assumes that the input data is a single file in the local filesystem and is fully qualified
java.io.IOException
public void addDataElement(java.lang.String selector, org.json.simple.JSONObject jsonData) throws java.lang.Exception
Assumes that the dataMap contains the data in the schema specified
Initialize Paillier ciphertext values Y_i to 1 (as needed -- column values as the # of hits grows)
Initialize 2^hashBitSize counters: c_t = 0, 0 <= t <= (2^hashBitSize - 1)
For selector T:
For data element D, split D into partitions of size partitionSize-many bits:
D = D_0 || ... ||D_{\ceil{bitLength(D)/partitionSize} - 1)}
Compute H_k(T); let E_T = query.getQueryElement(H_k(T)).
For each data partition D_i:
Compute/Update:
Y_{i+c_{H_k(T)}} = (Y_{i+c_{H_k(T)}} * ((E_T)^{D_i} mod N^2)) mod N^2 ++c_{H_k(T)}
java.lang.Exception
public void setResponseElements()