#include "DistDecrypt.h" #include "FHE/P2Data.h" template DistDecrypt::DistDecrypt(const Player& P, const FHE_SK& share, const FHE_PK& pk, const FD& FTD) : P(P), share(share), pk(pk), mf(FTD), f(FTD) { vv.resize(pk.get_params().phi_m()); vv1.resize(pk.get_params().phi_m()); // extra limb for operations bigint limit = pk.get_params().Q() << 64; vv.allocate_slots(limit); vv1.allocate_slots(limit); mf.allocate_slots(pk.get_params().p0() << 64); } template Plaintext_& DistDecrypt::run(const Ciphertext& ctx, bool NewCiphertext) { const FHE_Params& params=ctx.get_params(); share.dist_decrypt_1(vv, ctx,P.my_num(),P.num_players()); if (not NewCiphertext) intermediate_step(); // Now pack into an octetStream for broadcasting vector os(P.num_players()); if ((int)vv.size() != params.phi_m()) throw length_error("wrong length of ring element"); for (int i=0; i; template class DistDecrypt;