chiraag / gazelle_mpc

MIT License
65 stars 20 forks source link

Possible incorrect implementation of FV Encryption? #6

Open haochenuw opened 3 years ago

haochenuw commented 3 years ago

The actual encryption function should multiply the polynomials, but seems the code is performing coefficient-wise multiply

https://github.com/chiraag/gazelle_mpc/blob/f4eb3bae09bf4897f2651946eac7dee17e094a6f/src/lib/pke/fv.cpp#L53-L61

chiraag commented 2 years ago

Sorry just saw this comment. The multiplication should be polynomial multiplication. This is being implemented in the eval representation so it simplifies to a pointwise multiplication. The public key is stored in eval representation and the sampled errors are transformed to eval representation a few lines above. Does that sound okay?