| 139 | |
| 140 | template<class T, class FD, class S> |
| 141 | void FHE_PK::encrypt(Ciphertext& c, |
| 142 | const Plaintext<T, FD, S>& mess,const Random_Coins& rc) const |
| 143 | { |
| 144 | if (&c.get_params()!=params) { throw params_mismatch(); } |
| 145 | if (&rc.get_params()!=params) { throw params_mismatch(); } |
| 146 | if (T::characteristic_two ^ (pr == 2)) |
| 147 | throw pr_mismatch(); |
| 148 | |
| 149 | Rq_Element mm((*params).FFTD(),polynomial,polynomial); |
| 150 | mm.from(mess.get_iterator()); |
| 151 | |
| 152 | quasi_encrypt(c,mm,rc); |
| 153 | } |
| 154 | |
| 155 | void FHE_PK::quasi_encrypt(Ciphertext& c, |
| 156 | const Rq_Element& mess,const Random_Coins& rc) const |
no test coverage detected