-
Notifications
You must be signed in to change notification settings - Fork 24
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 export ciphertext and apply addition outside node-seal #153
Comments
Did you solve your problem? trying to do something similar with angular and python flask (so two seal instances) |
Hey sorry I missed this question. So your goal is to create a cipher in one language and then import it in another runtime (even a different machine)? If you're using this library, then it is pretty straight forward. There's a test showing how to save and load ciphertexts: https://github.com/s0l0ist/node-seal/blob/main/src/__tests__/cipher-text.test.ts#L326 If you're using another language (python), then you'd need to lookup how to load it from a binary array on that platform. Thankfully, the SEAL library has its own serialization format (self-contained) so it should "just work". |
Your answer is helpful, @s0l0ist. This helps us export (and import) a cipher, but my question is more complex. I need to understand how to perform an addition operation manually (without using the node-seal library). For example, consider that I created two ciphers using |
There are two ways to perform addition:
I assume you want to do 2 as it is more common. Unfortunately, you cannot simply add two cipher text arrays without using a derivative work from a Microsoft SEAL library. Mainly because the serialized output you have contains other information about the protocol such as the version of SEAL and some other metadata in addition to the underlying cipher text encrypted data. |
In general, you'd need to build the SEAL C++ library and create the appropriate bindings in whatever language you needed to deserialize, and recreate the same encryption parameters. Ideally, you would use an existing 3rd party library that already has bindings in the language you need. I found this python lib, but I have not followed the build instructions. Assuming you are able to build it, you'd need to save the cipher with no compression (node-seal has this override when calling |
Hi guys, I need some help.
I'm using this repository to perform great BVF operations, it's amazing!
When I use the entire lib to perform all operations works fine, but is possible to perform addition operations outside the lib? How can I export 2 ciphertexts in a way that I can perform a external addition (I should execute this into another programming language and restricted hardware)?
My SEAL config:
The result of
ciphertext.saveArray()
:Sorry if this is a primary question, I'm not a cipher expert
Thanks!
The text was updated successfully, but these errors were encountered: