openfheorg / openfhe-development

This is the development repository for the OpenFHE library. The current (stable) version is v1.2.0 (released on June 25, 2024).
BSD 2-Clause "Simplified" License
655 stars 167 forks source link

Negacyclic property check in the function "checkInputFunction" #780

Closed fstasel closed 1 month ago

fstasel commented 1 month ago

static uint32_t checkInputFunction(...) (in binfhe-base-scheme.h) basically checks lut[i] = (mod - lut[mid + i]) which is identical to check whether lut[i] + lut[mid + i] = mod. That is for checking whether the 1st half of LUT is negative of the 2nd half. However, a zero (0) in LUT always breaks negacyclic propery even if 0=m (mod m). For instance: [0,1,0,3] (mod 4) is not negacyclic w.r.t. checkInputFunction (since 0+0 != 4) Is this behaviour correct or does it need to be fixed?

yspolyakov commented 1 month ago

@fstasel Please ask this question in the OpenFHE discourse forum: https://openfhe.discourse.group/ The issues are only for reporting bugs, requests, etc.