Browse Source

Removed now unused pir_param.dbc

Andrew Beams 3 years ago
parent
commit
c0d0dd716d
3 changed files with 3 additions and 7 deletions
  1. 3 3
      main.cpp
  2. 0 3
      pir.cpp
  3. 0 1
      pir.hpp

+ 3 - 3
main.cpp

@@ -80,6 +80,7 @@ int main(int argc, char *argv[]) {
     auto time_pre_e = high_resolution_clock::now();
     auto time_pre_us = duration_cast<microseconds>(time_pre_e - time_pre_s).count();
 
+
     // Choose an index of an element in the DB
     uint64_t ele_index = rd() % number_of_items; // element in DB at random position
     uint64_t index = client.get_fv_index(ele_index, size_per_item);   // index of FV plaintext
@@ -121,7 +122,7 @@ int main(int argc, char *argv[]) {
     for (uint32_t i = 0; i < size_per_item; i++) {
         if (elems[(offset * size_per_item) + i] != db_copy.get()[(ele_index * size_per_item) + i]) {
             cout << "Main: elems " << (int)elems[(offset * size_per_item) + i] << ", db "
-                 << (int) db_copy.get()[(ele_index * size_per_item) + i] << endl;
+                << (int) db_copy.get()[(ele_index * size_per_item) + i] << endl;
             cout << "Main: PIR result wrong at " << i <<  endl;
             failed = true;
         }
@@ -134,8 +135,7 @@ int main(int argc, char *argv[]) {
     cout << "Main: PIR result correct!" << endl;
     cout << "Main: PIRServer pre-processing time: " << time_pre_us / 1000 << " ms" << endl;
     cout << "Main: PIRClient query generation time: " << time_query_us / 1000 << " ms" << endl;
-    cout << "Main: PIRServer reply generation time: " << time_server_us / 1000 << " ms"
-         << endl;
+    cout << "Main: PIRServer reply generation time: " << time_server_us / 1000 << " ms" << endl;
     cout << "Main: PIRClient answer decode time: " << time_decode_us / 1000 << " ms" << endl;
     cout << "Main: Reply num ciphertexts: " << reply.size() << endl;
 

+ 0 - 3
pir.cpp

@@ -93,7 +93,6 @@ void gen_pir_params(uint64_t ele_num, uint64_t ele_size, uint32_t d,
     pir_params.d = d;                 
     pir_params.expansion_ratio = expansion_ratio;           
     pir_params.nvec = nvec;
-    pir_params.dbc = 6;
     pir_params.n = num_of_plaintexts;
 }
 
@@ -106,7 +105,6 @@ void print_pir_params(const PirParams &pir_params){
     cout << "num_of_plaintexts: " << pir_params.num_of_plaintexts << endl;
     cout << "dimension: " << pir_params.d << endl;
     cout << "expansion ratio: " << pir_params.expansion_ratio << endl;
-    cout << "dbc: " << pir_params.dbc << endl;
     cout << "n: " << pir_params.n << endl;
 }
 
@@ -136,7 +134,6 @@ void gen_params(uint64_t ele_num, uint64_t ele_size, uint32_t N, uint32_t logt,
     }
 
     pir_params.d = d;
-    pir_params.dbc = 6;
     pir_params.n = plaintext_num;
     pir_params.nvec = nvec;
     pir_params.expansion_ratio = expansion_ratio << 1; // because one ciphertext = two polys

+ 0 - 1
pir.hpp

@@ -21,7 +21,6 @@ struct PirParams {
     std::uint32_t d;                 // number of dimensions for the database
     std::uint32_t expansion_ratio;           // ratio of ciphertext to plaintext
     std::vector<std::uint64_t> nvec;         // size of each of the d dimensions
-    std::uint32_t dbc;
     std::uint32_t n;
 };