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

Expand Alogrithm in paper #35

Open
czh-rot opened this issue Jun 20, 2024 · 2 comments
Open

Expand Alogrithm in paper #35

czh-rot opened this issue Jun 20, 2024 · 2 comments

Comments

@czh-rot
Copy link

czh-rot commented Jun 20, 2024

I am confused about the pseudocode described in the paper. Take the Figure 3 and Figure 4.
(1) query = Enc(x^2);
(2) First Outer loop: C0=Enc(x^2), C1=Enc(x^1), C0'=C0+sub(C0,5), C1'=C1+sub(C1,5);
In this step, sub(C1, 5) = Enc(x^5) mod x^4+1 = Enc(-x^1), so C1= Enc(0);
But, sub(C0, 5) = Enc(x^10) mod x^4+1, I do not know if my solution is right, but x^10 = x^4+1 * (x^6-x^2) + x^2, so sub(C0,5) = Enc(x^2) ? If it is true, C0' = Enc(2x^2), why the result in Figure 4 is [0,2,0,0], i.e., Enc(2x^1)?

I would appreciate it if you could point out my mistake.

@sga001
Copy link
Contributor

sga001 commented Jun 20, 2024

Are you looking at the latest version of the paper? https://www.cis.upenn.edu/~sga001/papers/pbc-sp18.pdf

It seems I forgot to update the eprint version a while back. I have updated the eprint version as well.

@czh-rot
Copy link
Author

czh-rot commented Jun 20, 2024

So, the 1st outer loop finish, ciphertext[k] = {Enc(2x^2), Enc(0)};
for the 2nd outer loop & 1st inner loop:
(1) C0 =ciphertext[0] [0,0,2,0], i.e., Enc(2
x^2);
(2) C1 = C0 * x^-2 = [2,0,0,0], i.e., Enc(2);
(3) C0' = C0 + sub(C0, 3) = Enc(2x^2) + Enc(2x^6) mod (x^4+1) = Enc(2x^2) + Enc(-2x^2) = Enc(0);
(4) C2' = C1 + sub(C1, 3) = Enc(2) + Enc(2)mod (x^4+1) = Enc(4);
and the 2nd inner loop generate C1' & C3';

Nice job! I haven't found the pattern yet, but thank you very much for your reply

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

2 participants