Skip to content
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

About the size of qVec[] #5

Open
zzwplus opened this issue Jan 12, 2022 · 0 comments
Open

About the size of qVec[] #5

zzwplus opened this issue Jan 12, 2022 · 0 comments

Comments

@zzwplus
Copy link

zzwplus commented Jan 12, 2022

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++;
}

@zzwplus zzwplus changed the title 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 is only L as shown in the code. I wonder if there is something wrong? About the size of qVec[] Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant