You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Visual Studio 2019 or newer is required. And use the **x64 Native Tools Command Prompt for Visual Studio 2019** command prompt to configure and build the Microsoft SEAL library. It's usually can be found in your Start Menu.
Generally, the Ninja generator is better than the "Visual Studio 16 2019" generator, and there is more information in the Microsoft SEAL official [illustrate](https://github.com/microsoft/SEAL#building-microsoft-seal-manually).
66
+
67
+
68
+
69
+
## Note
70
+
71
+
*#### Serialize
72
+
73
+
In most situations, you can use the SEAL's native serialize API to save the data, here is an example:
74
+
75
+
```python
76
+
cipher.save('cipher')
77
+
78
+
load_cipher = Ciphertext()
79
+
load_cipher.load(context, 'cipher') # work if the context is valid.
80
+
```
81
+
82
+
Support type: `Encryptionparams, Ciphertext, Plaintext, SecretKey, Publickey, Relinkeys, Galoiskeys`
83
+
84
+
Particularly, if you want to use the pickle to serialize your data, you need to do these things like below:
85
+
86
+
```shell
87
+
# 1. Modify the serializable object's header file in SEAL and switch the wrapper.
88
+
python helper.py
89
+
90
+
# 2. Rebuild the SEAL lib like above
91
+
cmake --build build
92
+
93
+
# 3. Run the setup.py
94
+
python setup.py build_ext -i
95
+
```
96
+
97
+
Then, you can pickle the data object like this:
98
+
99
+
```python
100
+
import pickle
101
+
102
+
cipher.set_parms(parms) # necessary
103
+
cipher_dump = pickle.dumps(cipher)
104
+
cipher_load = pickle.loads(cipher_dump)
105
+
```
106
+
107
+
Generally, we don't use compression library.
108
+
109
+
*#### Other
110
+
111
+
There are a lot of changes in the latest SEAL lib, we try to make the API in python can be used easier, it may remain some problems we unknown, if any problems(bugs), [Issue](https://github.com/Huelse/SEAL-Python/issues) please.
0 commit comments