/* * Checking.h * */ #ifndef FHEOFFLINE_CHECKING_H_ #define FHEOFFLINE_CHECKING_H_ #include "Networking/Player.h" #include "Protocols/MAC_Check.h" #include "Math/Setup.h" #include "Math/gfp.h" template class TripleSacriFactory { public: vector> triples; virtual ~TripleSacriFactory() {} virtual void get(T& a, T& b, T& c) = 0; }; template class TupleSacriFactory { public: virtual ~TupleSacriFactory() {} virtual void get(T& a, T& b) = 0; }; template class SingleSacriFactory { public: virtual ~SingleSacriFactory() {} virtual void get(T& a) = 0; }; template class FileSacriFactory : public TripleSacriFactory, public TupleSacriFactory, public SingleSacriFactory { ifstream inpf; public: FileSacriFactory(const char* type, const Player& P, int output_thread); void get(T& a, T& b, T& c); void get(T& a, T& b); void get(T& a); }; void Triple_Inverse_Checking(const Player& P, MAC_Check& MC, int nm, int nr, int output_thread = 0); template void Triple_Checking(const Player& P, MAC_Check& MC, int nm, int output_thread, TripleSacriFactory >& factory, bool write_output = true, bool clear = true, string dir = PREP_DIR); template void Inverse_Checking(const Player& P, MAC_Check& MC, int nr, int output_thread, TripleSacriFactory >& triple_factory, TupleSacriFactory >& inverse_factor, bool write_output = true, bool clear = true, string dir = PREP_DIR); void Triple_Checking(const Player& P,MAC_Check& MC,int nm); void Square_Bit_Checking(const Player& P,MAC_Check& MC,int ns,int nb); template void Square_Checking(const Player& P, MAC_Check& MC, int ns, int output_thread, TupleSacriFactory >& factory, bool write_output = true, bool clear = true, string dir = PREP_DIR); void Bit_Checking(const Player& P, MAC_Check& MC, int nb, int output_thread, TupleSacriFactory >& square_factory, SingleSacriFactory >& bit_factory, bool write_output = true, bool clear = true, string dir = PREP_DIR); void Square_Checking(const Player& P,MAC_Check& MC,int ns); template inline string file_completion(const T& dummy = {}) { (void)dummy; return { T::type_char() }; } #endif /* FHEOFFLINE_CHECKING_H_ */