Git Product home page Git Product logo

bfv-python's People

Contributors

acmert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bfv-python's Issues

Something wrong with the poly mulitiplication

As I used your code, I find that there are two method to do multiplication in the file poly.py.
But the results are different.
Here is the example code:

# method 1
c_poly = a_poly.toNTT() * b_poly.toNTT()
c_ref = c_poly.toPOL().F

# method 2
c_poly = a_poly * b_poly
c_ref = c_poly.F

The results c_ref are different.
I want to ask if there is anything wrong with the code?
Thank you.

Implement Square operation for FV HE Scheme

i want to realize Square function in my BFV Scheme, and I gave an example of what I want to know.

b/fv scheme ,a
i set parameter plaintext_module t=100 , ciphertext_module q=2^30+1
given a plaintext m=[ 0 ,1, 2 ,3 , 4 ,5 ,6 ,7]
Encrypted to get the ciphertext
CT=[ [ ct0_0 ,ct0_1, ct0_2 ,ct0_3 , ct0_4 ,ct0_5 ,ct0_6 ,ct0_7], [ ct1_0 ,ct1_1, ct1_2 ,ct1_3 , ct1_4 ,ct1_5 ,ct1_6 ,ct1_7] ]
(the value of ct0_0 ...ct1_7 is within the ciphertext_module)
CT_new=square(CT)
Decrypted the CT_new to get [ 0 ,1 ,4, 9 ,16, 25 ,36 ,49]

I want to know the details of the square process, in particular, how the value of ct0_0 ...ct1_7 change .
How do we manipulate values of ct0_0 ...ct1_7 to get a correct CT_new?

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.