Giter VIP home page Giter VIP logo

Comments (8)

Huelse avatar Huelse commented on September 24, 2024

Sorry for the reply late, I'm not sure what your code is, you mean encoder = IntegerEncoder(context)?
And FractionalEncoder does not exist in the wrapper.

from seal-python.

Huelse avatar Huelse commented on September 24, 2024

If you want to encode fractional values, please refer to tests/4_ckks_basics.py.

from seal-python.

aman1403 avatar aman1403 commented on September 24, 2024

Thanks for your reply. I need to encode both integer and fractional values. I am using encoder = IntegerEncoder(context) for encoding the integers value. Is there any other encoder exist in BFV scheme to encode fractional values. Because I need both type of encoders in the same file.

from seal-python.

aman1403 avatar aman1403 commented on September 24, 2024

Actually I wanted to divide the encrypted values by 2. As division is not supported in the SEAL library. So, I was going to multiply 0.5 with the encrypted value. But I am unable to encode 0.5 as I only know about Integer Encoder.

Is there any other encoder exist in BFV Scheme to encode float values?

from seal-python.

Huelse avatar Huelse commented on September 24, 2024

You can not mixed-use these two kinds of the scheme, they are encoded in different ways, refer to the C++ code's note.

from seal-python.

Huelse avatar Huelse commented on September 24, 2024

No way, consider the ckks scheme or multiply the divisor and dividend 10000 or more times.

from seal-python.

aman1403 avatar aman1403 commented on September 24, 2024

Okay. Btw, I was trying to send the encrypted list of Ciphertext Object from client to server through sockets in python. And I am using Pickle.dumps to encode it into bytes but getting the following error. Is there any other way to encode this Ciphertext object into bytes as we can only send bytes like object through sockets in python. I have tried Json, base64, pickle but nothing is working.
Screenshot from 2020-11-18 14-32-57

from seal-python.

Huelse avatar Huelse commented on September 24, 2024

For some reason, we can't directly pickle the Ciphertext in SEAL-3.4.5, we talked in #28, but you can use cipher.save('filename') to save the keys or ciphers to the native.
And the pickle function in SEAL-3.3.2 works well.

from seal-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.