| 34 | |
| 35 | |
| 36 | void KeyGen(FHE_PK& PK,FHE_SK& SK,PRNG& G) |
| 37 | { |
| 38 | if (PK.params!=SK.params) { throw params_mismatch(); } |
| 39 | if (PK.pr!=SK.pr) { throw pr_mismatch(); } |
| 40 | |
| 41 | Rq_Element sk = PK.sample_secret_key(G); |
| 42 | SK.assign(sk); |
| 43 | PK.KeyGen(sk, G); |
| 44 | } |
| 45 | |
| 46 | |
| 47 | FHE_PK::FHE_PK(const FHE_Params& pms) : |
no test coverage detected