narger-ef / LowMemoryFHEResNet20

Source code for the paper "Encrypted Image Classification with Low Memory Footprint using Fully Homomorphic Encryption"
https://eprint.iacr.org/2024/460
MIT License
34 stars 10 forks source link

Compile Error " XXX has no member named ‘GetFHE’" #8

Closed JerryFishY closed 6 months ago

JerryFishY commented 6 months ago

I encountered an error:

error: ‘using element_type = class lbcrypto::SchemeBase<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<long unsigned int> > > >’ {aka ‘class lbcrypto::SchemeBase<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<long unsigned int> > > >’} has no member named ‘GetFHE’
  386 | derivedPtr = dynamic_cast<FHECKKSRNS*>(context->GetScheme()->GetFHE().get()); 

while compiling the project. It seems the GetFHE method does not exist. I was wondering if it is due to the mismatch between the OpenFHE lib (v1.1.3) and the one that was used during dev since the OpenFHE is still under heavy dev.

narger-ef commented 6 months ago

Hello,

thank you very much for opening the issue.

Indeed, I used a custom forked version of OpenFHE in order to have access to GetFHE() function. I commented those two lines in the last commit, they were supposed to clear from memory some bootstrapping pre computations ($\approx 1$GB of data), it should now work with any OpenFHE instance.

Feel free to close the issue if you are able to compile.

JerryFishY commented 6 months ago

Thanks for your reply. It could compile successfully now.