Github user tellison commented on a diff in the pull request:
https://github.com/apache/incubator-pirk/pull/111#discussion_r84356854
--- Diff:
src/main/java/org/apache/pirk/querier/wideskies/encrypt/EncryptQuery.java ---
@@ -178,11 +217,14 @@ public Querier encrypt(int numThreads) throws
InterruptedException, PIRException
{
// Hash collision
selectorQueryVecMapping.clear();
- hashKey = queryInfo.getHashKey() + ++keyCounter;
+ hashKey = hashKeyBase + getRandByteString(10);
logger.debug("index = " + index + "selector = " + selector + "
hash collision = " + hash + " new key = " + hashKey);
index = -1;
}
}
+
+ // Save off the final hashKey that we ended up using
+ queryInfo.setHashKey(hashKey);
--- End diff --
The ```QueryInfo``` is an API type, so the end user is free to reuse it
(and encrypt a query using it) as often as required.
Let me try a different angle ;-) Why do we ask for a user to specify a
hashKey anyway? Why not simply generate a totally random hashKey rather than a
salted key?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---