/* * RealProgramParty.h * */ #ifndef BMR_REALPROGRAMPARTY_H_ #define BMR_REALPROGRAMPARTY_H_ #include "Party.h" #include "RealGarbleWire.h" #include "GC/Machine.h" #include "GC/RuntimeBranching.h" #include "Processor/Processor.h" template class RealProgramParty : public ProgramPartySpec { typedef typename T::Input Inputter; friend class RealGarbleWire; friend class GarbleJob; static RealProgramParty* singleton; GC::Machine>> garble_machine; GC::Processor>> garble_processor; DataPositions usage; Preprocessing* prep; SubProcessor* shared_proc; ArithmeticProcessor dummy_proc; vector deltas; Inputter* garble_inputter; typename T::Protocol* garble_protocol; vector> garble_jobs; GC::BreakType next; public: static RealProgramParty& s(); RealProgramParty(int argc, const char** argv); ~RealProgramParty(); void garble(); void receive_keys(Register& reg); void receive_all_keys(Register& reg, bool external); void process_prf_output(PRFOutputs& prf_output, PRFRegister* out, const PRFRegister* left, const PRFRegister* right); void push_spdz_wire(SpdzOp op, const RealGarbleWire& wire); void done() {} T shared_delta(int i) { return deltas[i]; } }; template inline RealProgramParty& RealProgramParty::s() { if (singleton) return *singleton; else throw runtime_error("no singleton"); } #endif /* BMR_REALPROGRAMPARTY_H_ */