-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add RLWEParameters and reduction to LWE #51
Conversation
Some other questions I was unsure about:
|
On further thought, for RLWE with vectors of polynomials, wouldn't you just stack the dimension-1 reduction horizontally, and then repeat the secret key vector |
Also, on the doc generation questions, it looks like the autodoc generation is failing in the github action as well, though it has an import error for all the modules, not just my new one... |
Hi Jeremy, let's talk about the mathematics/cryptography separately from Python issues. I don't think the PR works as is. Ring-LWE is not only defined for power-of-two ring dimensions. It is defined for, at least, any cyclotomic ring, e.g. |
If we're given samples |
I'm at a loss on the Sphinx question, though. |
My intention with this PR was mainly to document the provenance of the LWE parameter sets coming from RLWE instantiations, since those are not clearly explained in the cited papers. For example, the TFHE1024 set marks n=1024 in LWE parameters, but the paper it comes from uses RLWE and is at best vague about the relationship. This is all they have to say: And then in the table cited by lattice-estimator, the authors silently switch from I have also heard that, if N is not a power of 2 (and/or the secret is not binary) then the RLWE distributions don't reduce to Happy to accept the final call and close the PR if you're still unconvinced. |
I suspect by I'm afraid I still think this PR would rather add confusion than make things more accessible. |
Fixes #48
Hi Martin,
I added the simple reduction from RLWE to LWE in an RLWEParameters class. I wanted to get early feedback from you on aligning with your contributing guidelines before, e.g., adding constants for specific RLWE parameter instances in the literature (or adding tests, looks like it's all doctests?).
In particular, I ran into a roadblock when generating the docs (to see how my formatted matrices look and tweak them), and I ran into this error:
I think this is happening because of the MagicMock in docs/conf.py, which is being compared to an int in
__post_init__
; however, I don't see how this is not causing the same problem inlwe_parameters.py
. I'm not particularly familiar with sphinx (why would it be running this code to run into the type error instead of statically analyzing it?), but I also noticed thatsphinx-book-theme
is preventing sphinx version >= 5, which I imagine might have bug fixes that would avoid this: executablebooks/sphinx-book-theme#592.Open to any suggestions you have to fix this!