-
Notifications
You must be signed in to change notification settings - Fork 5
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 a new key switch method and support q>2N
#135
Conversation
|
||
let sk = secret_key_pack.lwe_secret_key(); | ||
|
||
let key: Vec<Vec<Vec<LWE<C>>>> = (0..len) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we parallelize this process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rng
makes it unable to parallelize.
/// - `Modulus Switch`: `q > 2N`, `2N|q` | ||
/// - `Scale`:`q < 2N`, `q|2N` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these two cases are essentially the same. Scale is actually a modulus switch process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but their operations are a little different. I need to make them into two types.
/// cryptographically secure random number generator | ||
csrng: RefCell<Prg>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should move this csrng
out of SecretKeyPack
, we could explicitly use rng as an input to a randomized function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, some optimization possibilities are limited to a certain extent. However, if you need to change it, another PR is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor changes.
3d4cbfc
to
1cbdcf0
Compare
FheField
macrodefault-features