#ifndef _DistDecrypt #define _DistDecrypt /* * This is the Distributed Decryption Protocol * */ #include "FHE/Ciphertext.h" #include "Networking/Player.h" #include "FHEOffline/Reshare.h" template class DistDecrypt { protected: const Player& P; const FHE_SK& share; const FHE_PK& pk; AddableVector vv, vv1; public: Plaintext_ mf, f; DistDecrypt(const Player& P, const FHE_SK& share, const FHE_PK& pk, const FD& fd); virtual ~DistDecrypt() {} Plaintext_& run(const Ciphertext& ctx, bool NewCiphertext = false); virtual void intermediate_step() {} virtual void reshare(Plaintext& m, const Ciphertext& cm, EncCommitBase& EC) { Ciphertext dummy(pk.get_params()); Reshare(m, dummy, cm, false, P, EC, pk, *this); } size_t report_size(ReportType type) { return vv.report_size(type) + vv1.report_size(type) + mf.report_size(type) + f.report_size(type); } }; #endif