/* * TinyShare.h * */ #ifndef GC_TINYSHARE_H_ #define GC_TINYSHARE_H_ #include "ShareSecret.h" #include "ShareParty.h" #include "Secret.h" #include "Protocols/Spdz2kShare.h" namespace GC { template class TinySecret; template class ShareThread; template class TinierSharePrep; template class TinyShare : public Spdz2kShare<1, S>, public ShareSecret> { typedef TinyShare This; public: typedef Spdz2kShare<1, S> super; typedef void DynamicMemory; typedef Beaver Protocol; typedef MAC_Check_Z2k_ MAC_Check; typedef MAC_Check Direct_MC; typedef ::Input Input; typedef TinierSharePrep LivePrep; typedef SwitchableOutput out_type; typedef This small_type; typedef NoShare bit_type; static string name() { return "tiny share"; } TinyShare() { } TinyShare(const typename super::super::super& other) : super(other) { } TinyShare(const super& other) : super(other) { } void XOR(const This& a, const This& b) { *this = a + b; } void public_input(bool input) { auto& party = this->get_party(); *this = super::constant(input, party.P->my_num(), party.MC->get_alphai()); } }; } /* namespace GC */ #endif /* GC_TINYSHARE_H_ */