/* * PairwiseGenerator.h * */ #ifndef FHEOFFLINE_PAIRWISEGENERATOR_H_ #define FHEOFFLINE_PAIRWISEGENERATOR_H_ #include using namespace std; #include "FHEOffline/Multiplier.h" #include "FHEOffline/SimpleGenerator.h" class PairwiseMachine; template class PairwiseGenerator : public GeneratorBase { typedef typename FD::T T; friend MultiEncCommit; template friend class CowGearPrep; PlaintextVector a, b, c; AddableVector b_mod_q; vector*> multipliers; TripleProducer_ producer; MultiEncCommit EC; MAC_Check MC; // temporary data AddableVector C; octetStream ciphertexts, cleartexts; size_t volatile_memory; public: PairwiseMachine& machine; vector>> inputs; PairwiseGenerator(int thread_num, PairwiseMachine& machine, Player* player = 0); ~PairwiseGenerator(); void run(); void generate_inputs(int player); size_t report_size(ReportType type); void report_size(ReportType type, MemoryUsage& res); size_t report_sent(); }; #endif /* FHEOFFLINE_PAIRWISEGENERATOR_H_ */