-
Notifications
You must be signed in to change notification settings - Fork 23
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
Comments
seems like we need to implement https://pybind11.readthedocs.io/en/latest/advanced/classes.html#pickling-support |
Could you explain @bpradeep508 why you need this feature ? |
Distributed environment computation going on different nodes. So bininfhe
context needed to be shared among the nodes for computation.
…On Sun, 28 Apr, 2024, 1:05 am Muthu Annamalai (முத்து அண்ணாமலை), < ***@***.***> wrote:
Could you explain @bpradeep508 <https://github.com/bpradeep508> why you
need this feature ?
—
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALBYDJG22Z35EU3DSUGANADY7P4Z5AVCNFSM6AAAAABGQWU5ZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGE3DAOBSHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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 ? c ++
version already available. we need same for python binfhe context
…On Sun, Apr 28, 2024 at 5:07 AM Muthu Annamalai (முத்து அண்ணாமலை) < ***@***.***> wrote:
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
—
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALBYDJEVANQACA6FDRK5UD3Y7QZERAVCNFSM6AAAAABGQWU5ZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGI2DSNJUGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
currently equality is reflexive: a = a tautological |
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 |
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}"')
The text was updated successfully, but these errors were encountered: