Giter Club home page Giter Club logo

fullrns-heaan's People

Contributors

k-miran avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fullrns-heaan's Issues

About security level of ciphertexts in HEAAN (or any FHE scheme for that matter)

About security level of ciphertexts in HEAAN (or any FHE scheme for that matter)
If we see sagemathcell implementation of tester for checking security levels for given paramters, as we increase logq for same n value, it says security level also increases. is this true??
If so why not just set n to 1024 and increase only logq to meet different application requirements, i.e. higher multiplicative depth??

Fail on homomorphic multiplication

Hello,

I've found some cases in which the homomorphic multiplication seems to fail. In particular, I got this MWE that tries to compute -22.5 * -22.5:

	long logN = 7;
	long L = 2;
	long logp = 45;
	long logSlots = 1;

	long K = L + 1;
	Context context(logN, logp, L, K);
	SecretKey secretKey(context);
	Scheme scheme(secretKey, context);

	srand(0);

	complex<double> mvec1 = {-22.5,0};
	complex<double> mvec2 = {-22.5,0};

	complex<double> mvecMult;

	mvecMult = mvec1 * mvec2;

	Ciphertext cipher1 = scheme.encryptSingle(mvec1, L);
	Ciphertext cipher2 = scheme.encryptSingle(mvec2, L);

	Ciphertext multCipher = scheme.mult(cipher1, cipher2);
	scheme.reScaleByAndEqual(multCipher, 1);

	complex<double>* dvecMult = scheme.decrypt(secretKey, multCipher);

        std::cout << "Expected: " << (mvec1 * mvec2) << std::endl;
        std::cout << "Output: " << *dvecMult << std::endl;

This is the output I get:

Expected: (506.25,-0)
Output: (-18073.4,-30416)

Still, it works for 22.5 * 22.5.
Any ideas about what is happening here?

bootstrapping

Do you have plans to increase the code of the bootstrapping part?

About the size of qVec[]

According to your article "A Full RNS Variant of Approximate Homomorphic Encryption", the Vector qVec should have L + 1 elements. However, it seems like that the size of qVec may be L or L + 1 as shown in the code. I wonder if there is something wrong?

// Generate Primes //
long bnd = 1;
long cnt = 1;
bnd = 1;
while(1) {
uint64_t prime = (1ULL << Q0_BIT_SIZE) + bnd * M + 1;
if(primeTest(prime)) {
qVec[0] = prime;
break;
}
bnd++;
}
bnd = 1;
while(cnt < L) {
uint64_t prime1 = (1ULL << logp) + bnd * M + 1;
if(primeTest(prime1)) {
qVec[cnt] = prime1;
cnt++;
}
uint64_t prime2 = (1ULL << logp) - bnd * M + 1;
if(primeTest(prime2)) {
qVec[cnt] = prime2;
cnt++;
}
bnd++;
}

A question about Negative number multiplication

I am sorry to trouble you.
When i use FullRNS-HEAAN to do a negative number multiplication, the answer is wrong.
Can FullRNS-HEAAN do negative number multiplication?(negative number addition is right)
Thanks a million.

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.