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

Can you provide a docker image, or how to install an older version of OpenFHE ? #18

Closed Sinking-Stone closed 3 months ago

Sinking-Stone commented 3 months ago

Hello, I read your paper and was very interested in your work, but when I installed the old version 1.0.4, I found that I couldn't install it correctly. When I tried to install the older version, after I downloaded 1.0.4 and downloaded all the dependent repositories in the third-party directory, I got the following error after executing make -j4. 338420671-377f7dc0-7020-40dd-9c28-db88aa14b792 When I commented out the error there was a new error. 338422573-c27b1c84-a022-42ee-84e8-a5de640fba68 My OS is 20.04.1-Ubuntu, and I have installed all the required environment dependencies.

narger-ef commented 3 months ago

Uhhm.. I honestly does not know how to use docker, in case you are just playing around with the library, I suggest you to simply relax the security level to use it without issues in the newer versions.

In 1.0.4 it seems that bootstrapping was consuming one less level, this is why on newer versions the circuit is not considered secure anymore by the library

Sinking-Stone commented 3 months ago

Thank you for your reply, I looked at the method in #11 can really solve my problem. But I still want to know, how can I make 128bit safe without changing the parameters.SetSecurityLevel(SecurityLevel::HEStd_NotSet) and generate_context from 16 to 17.

narger-ef commented 3 months ago

If you go from 16 to 17 and you let security level to 128 bits, it will work (but it will require approx twice the memory and time)

Sinking-Stone commented 3 months ago

Yes, I have just tried it, it will have a large memory footprint, so is there one that can guarantee the safety of 128bits without changing the N size.

narger-ef commented 3 months ago

Feel free to close the issue if resolved :)

Sinking-Stone commented 3 months ago

Hello, I'm very sorry to bother you again. When I read your source code, I don't quite understand how your downsampling is calculated. Could you explain it to me, because it is just a simple description in your paper.