|
@@ -189,10 +189,7 @@ int main(const int argc, const char * argv[])
|
|
|
//read_final_cws(sockets_2[0]);
|
|
|
|
|
|
|
|
|
- block<__m128i> seed;
|
|
|
- #ifdef ThreeParty
|
|
|
- read(sockets_2[0], boost::asio::buffer(&seed, sizeof(seed)));
|
|
|
- #endif
|
|
|
+
|
|
|
blinds = (DB_t *) std::aligned_alloc(sizeof(__m256i), db_nitems * sizeof(DB_t));
|
|
|
updated_blinds = (DB_t *) std::aligned_alloc(sizeof(__m256i), db_nitems * sizeof(DB_t));
|
|
|
|
|
@@ -243,7 +240,7 @@ int main(const int argc, const char * argv[])
|
|
|
DB_t * read_out = new DB_t[number_of_writes];
|
|
|
DB_t * Gamma = new DB_t[number_of_writes];
|
|
|
#endif
|
|
|
-
|
|
|
+
|
|
|
DB_t * CW = new DB_t[number_of_writes];
|
|
|
|
|
|
DB_t * update_message = new DB_t[number_of_writes];
|
|
@@ -285,20 +282,20 @@ int main(const int argc, const char * argv[])
|
|
|
dot_product_with_bool(updated_blinds, writing_c, db_nitems, rotate_by_[w]) -
|
|
|
dot_product_with_bool(updated_blinds, writing_d, db_nitems, rotate_by_[w]) + Gamma[w];
|
|
|
|
|
|
- //#ifdef DEBUG
|
|
|
+ #ifdef DEBUG
|
|
|
std::cout << "read_out[" << w << "] = " << read_out[w] << std::endl;
|
|
|
- //#endif
|
|
|
+ #endif
|
|
|
|
|
|
- //#ifdef DEBUG
|
|
|
+ #ifdef DEBUG
|
|
|
std::cout << "reconstructing the output: " << print_reconstruction(sockets_[0], read_out[w]) << "\n";
|
|
|
- //#endif
|
|
|
+ #endif
|
|
|
|
|
|
distinguised_value[0] = 80 * (1 + w);
|
|
|
update_message[w] = distinguised_value[0] - read_out[w] + alpha0;
|
|
|
|
|
|
- #ifdef DEBUG
|
|
|
- std::cout << "-> The updated message shares is " << update_message[w] << std::endl;
|
|
|
- #endif
|
|
|
+ #ifdef DEBUG
|
|
|
+ std::cout << "-> The updated message shares is " << update_message[w] << std::endl;
|
|
|
+ #endif
|
|
|
boost::asio::write(sockets_2[2], boost::asio::buffer(&update_message[w], sizeof(DB_t)));
|
|
|
boost::asio::write(sockets_[2], boost::asio::buffer(&update_message[w], sizeof(DB_t)));
|
|
|
boost::asio::read(sockets_[2], boost::asio::buffer(&CW[w], sizeof(DB_t)));
|
|
@@ -310,6 +307,7 @@ int main(const int argc, const char * argv[])
|
|
|
#endif
|
|
|
}
|
|
|
#endif
|
|
|
+
|
|
|
for(size_t w = 0; w < number_of_writes; ++w)
|
|
|
{
|
|
|
DuoramUpdate(party, db_nitems, rotate_by_[w], DB, updated_DB, writing_b, b, CW[w], update_message[w], writing_c, writing_d, c, d);
|