|
@@ -77,7 +77,7 @@ bool run(DBHandler *db, uint64_t chosen_element, PIRParameters params){
|
|
|
* DO NOT try to use the same reply generator more than once, this causes issues
|
|
|
* ******************************************************************************/
|
|
|
|
|
|
-#if 1
|
|
|
+#if 0
|
|
|
// Generate 3 replies from 3 queries
|
|
|
for (int i = 0 ; i < 3 ; i++){
|
|
|
|
|
@@ -210,6 +210,7 @@ int main(int argc, char * argv[]) {
|
|
|
// nb_files=db.getNbStream();database_size = db.getDBSizeinbits();
|
|
|
// maxFileBytesize = database_size/nb_files;
|
|
|
|
|
|
+#if 0
|
|
|
// Simple test
|
|
|
std::cout << "======================================================================" << std::endl;
|
|
|
std::cout << "Test 1/7: database_size = 1ULL<<30; nb_files = 20;" << std::endl;
|
|
@@ -225,7 +226,6 @@ int main(int argc, char * argv[]) {
|
|
|
params.crypto_params = "LWE:80:2048:120";
|
|
|
tests_failed |= run(&db, chosen_element, params);
|
|
|
|
|
|
-#if 0
|
|
|
// Test with aggregation
|
|
|
// WARNING we must provide the representation of the database GIVEN recursion and aggregation
|
|
|
// as here we have 100 elements and aggregate them in a unique group we have params.n[0]=1
|
|
@@ -239,7 +239,8 @@ int main(int argc, char * argv[]) {
|
|
|
params.alpha = 100; params.d = 1; params.n[0] = 1;
|
|
|
params.crypto_params = "LWE:80:2048:120";
|
|
|
tests_failed |= run(&db2, chosen_element, params);
|
|
|
-
|
|
|
+#endif
|
|
|
+
|
|
|
// Test with recursion 2
|
|
|
std::cout << "======================================================================" << std::endl;
|
|
|
std::cout << "Test 3/7: database_size = 1ULL<<25; nb_files = 100;" << std::endl;
|
|
@@ -252,6 +253,7 @@ int main(int argc, char * argv[]) {
|
|
|
params.crypto_params = "LWE:80:2048:120";
|
|
|
tests_failed |= run(&db3, chosen_element, params);
|
|
|
|
|
|
+#if 0
|
|
|
// Test with recursion 2 and aggregation
|
|
|
std::cout << "======================================================================" << std::endl;
|
|
|
std::cout << "Test 4/7: database_size = 1ULL<<25; nb_files = 100;" << std::endl;
|
|
@@ -308,8 +310,8 @@ int main(int argc, char * argv[]) {
|
|
|
params.crypto_params = "LWE:80:2048:120";
|
|
|
tests_failed |= run(&db7, chosen_element, params);
|
|
|
}
|
|
|
-
|
|
|
#endif
|
|
|
+
|
|
|
if (tests_failed)
|
|
|
{
|
|
|
std::cout << "WARNING : at least one tests failed" << std::endl;
|