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

how to seralize openfhe binfhecontext #129

Open
bpradeep508 opened this issue Apr 20, 2024 · 7 comments
Open

how to seralize openfhe binfhecontext #129

bpradeep508 opened this issue Apr 20, 2024 · 7 comments

Comments

@bpradeep508
Copy link

from openfhe import *
import pickle5 as pickle

Sample Program: Step 1: Set CryptoContext

cc = BinFHEContext()
file_name = 'std1.pkl'

Writing the student object to a file using pickle

with open(file_name, 'wb') as file:
pickle.dump(cc, file,protocol=pickle.HIGHEST_PROTOCOL)
print(f'Object successfully saved to "{file_name}"')

@arcturusannamalai
Copy link
Collaborator

@arcturusannamalai
Copy link
Collaborator

Could you explain @bpradeep508 why you need this feature ?

@bpradeep508
Copy link
Author

bpradeep508 commented Apr 27, 2024 via email

@arcturusannamalai
Copy link
Collaborator

Thanks. So you need to really specify what attributes of the FHE Context you need to serialize and thats enough to deserialize;
how do you currently check the equality of the two FHE Context ? Maybe that is a good enough test to know if the ser-des approach is working or not. Please share it

@bpradeep508
Copy link
Author

bpradeep508 commented Apr 28, 2024 via email

@arcturusannamalai
Copy link
Collaborator

currently equality is reflexive: a = a tautological

@arcturusannamalai
Copy link
Collaborator

the key members of binfhecontext are in form of a binary large object (BLOB) and need to be serialized/deserialized; this can't be done easily without more support from the upstream C++ API

@yspolyakov yspolyakov added this to the Discussion topics milestone Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants