acmert / bfv-python Goto Github PK
View Code? Open in Web Editor NEWSimple Python implementation of BFV Homomorphic Encryption Scheme
Simple Python implementation of BFV Homomorphic Encryption Scheme
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.
how to encrypt an image
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.