* This creates the "pseudo-encryption" of the R_q element mess, * - As required for key switching. */
| 13 | * - As required for key switching. |
| 14 | */ |
| 15 | void Encrypt_Rq_Element(Ciphertext& c,const Rq_Element& mess, const Random_Coins& rc, |
| 16 | const FHE_PK& pk) |
| 17 | { |
| 18 | auto c1 = pk.a() * rc.u() + rc.v() * pk.p(); |
| 19 | auto c0 = pk.b() * rc.u(); |
| 20 | auto edd = rc.w() * pk.p(); |
| 21 | |
| 22 | edd.change_rep(evaluation,evaluation); |
| 23 | add(edd,edd,mess); |
| 24 | add(c0,c0,edd); |
| 25 | c.set(c0,c1,pk); |
| 26 | } |
| 27 | |
| 28 | |
| 29 | void DistKeyGen::fake(FHE_PK& pk, vector<FHE_SK>& sks, const bigint& p, int nparties) |
no test coverage detected