Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Pyfhel support Batching Encode and Bootstrapping? #237

Open
huyvu1404 opened this issue May 30, 2024 · 9 comments
Open

Does Pyfhel support Batching Encode and Bootstrapping? #237

huyvu1404 opened this issue May 30, 2024 · 9 comments
Labels
Functionality Wether this library supports a certain operation or not

Comments

@huyvu1404
Copy link

Please let me know if Pyfhel support Batching Encode and Bootstrapping?
Thank you so much.

@huyvu1404 huyvu1404 added the Functionality Wether this library supports a certain operation or not label May 30, 2024
@ShokofehVS
Copy link

Here are just few examples of issues asking about bootstrapping: #216, #204, #144, #136 -> "SEAL does not provide this out of the box, meaning that Pyfhel is limited to SHE until it is merged to the bootstrapping of OpenFHE."

I saw also a comment about "batch encoding" here that Pyfhel already uses batch encoding by default. But TBH now I couldn't recall how 😄

@huyvu1404
Copy link
Author

Here are just few examples of issues asking about bootstrapping: #216, #204, #144, #136 -> "SEAL does not provide this out of the box, meaning that Pyfhel is limited to SHE until it is merged to the bootstrapping of OpenFHE."

I saw also a comment about "batch encoding" here that Pyfhel already uses batch encoding by default. But TBH now I couldn't recall how 😄

Thanks for your support. I'm trying to implement BFV bootstrapping, but it's too hard 😢

@ShokofehVS
Copy link

You can use OpenFHE written in C++ that has already implemented bootstrapping; however it is very slow compared to Pyfhel.

@huyvu1404
Copy link
Author

You can use OpenFHE written in C++ that has already implemented bootstrapping; however it is very slow compared to Pyfhel.

I want to implement logistic regression with BFV scheme but cannot find any public code to reference. Do you know any document or source code about this topic? :'(

@ShokofehVS
Copy link

I know about a library Concrete ML that has ML models including Linear (regression) but with TFHE scheme implemented.

Let me search a bit about BFV and I'll come back to you soon.

@ShokofehVS
Copy link

I found these resources just by having a quick look but you can continue by searching among Google scholar papers and project in GitHub (putting #homomorphic-encryption and #logistic-regression):

Papers (if they don't have public access to the code; you can still ask their authors):

  1. Logistic regression over encrypted data from fully homomorphic encryption
  2. Doing Real Work with FHE: The Case of Logistic Regression
  3. Secure Logistic Regression Based on Homomorphic Encryption: Design and Evaluation
  4. Implementing Linear Regression with Homomorphic Encryption
  5. Web-Based Privacy-Preserving Multicenter Medical Data Analysis Tools Via Threshold Homomorphic Encryption: Design and Development Study

Projects (I'm not sure they have implemented the bootstrapping of BFV but maybe good for you to look at them):

  1. https://github.com/MarwanNour/SEAL-FYP-Logistic-Regression (written in C++)
  2. https://github.com/datthinh1801/Homomorphic-Encryption-on-Logistic-Regression (written in C++)

@huyvu1404
Copy link
Author

I found these resources just by having a quick look but you can continue by searching among Google scholar papers and project in GitHub (putting #homomorphic-encryption and #logistic-regression):

Papers (if they don't have public access to the code; you can still ask their authors):

  1. Logistic regression over encrypted data from fully homomorphic encryption
  2. Doing Real Work with FHE: The Case of Logistic Regression
  3. Secure Logistic Regression Based on Homomorphic Encryption: Design and Evaluation
  4. Implementing Linear Regression with Homomorphic Encryption
  5. Web-Based Privacy-Preserving Multicenter Medical Data Analysis Tools Via Threshold Homomorphic Encryption: Design and Development Study

Projects (I'm not sure they have implemented the bootstrapping of BFV but maybe good for you to look at them):

  1. https://github.com/MarwanNour/SEAL-FYP-Logistic-Regression (written in C++)
  2. https://github.com/datthinh1801/Homomorphic-Encryption-on-Logistic-Regression (written in C++)

I have read those papers and github code. However, most of them use CKKS or don't have source code for me to reference. Anyway, thank you very much :((

@ShokofehVS
Copy link

Ah, and why so far you want to use BFV? I guess the conversion shouldn't be difficult.

TBH, I'm not sure for the current version of Pyfhel but for instance for 3.1.4, once Alberto told me that I need to rewrite things a bit e.g., turn np.sum into sums and rotations to have this conversion between schemes.

@huyvu1404
Copy link
Author

Ah, and why so far you want to use BFV? I guess the conversion shouldn't be difficult.

TBH, I'm not sure for the current version of Pyfhel but for instance for 3.1.4, once Alberto told me that I need to rewrite things a bit e.g., turn np.sum into sums and rotations to have this conversion between schemes.

Ah, I use BFV due to the requirements of my course project. There are many difficulties when using this scheme compared to CKKS :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality Wether this library supports a certain operation or not
Projects
None yet
Development

No branches or pull requests

2 participants