-
Notifications
You must be signed in to change notification settings - Fork 72
feat(garble): randomize gate id #339
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
Conversation
th4s
left a comment
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.
lgtm 👍
| pub(crate) const DEFAULT_BATCH_SIZE: usize = MAX_BATCH_SIZE / BYTES_PER_GATE; | ||
|
|
||
| /// The initial gate id. | ||
| #[derive(Debug, Clone, Serialize, Deserialize)] |
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.
This can be Copy, then we do not need to clone it.
| #[derive(Debug, Clone, Serialize, Deserialize)] | |
| #[derive(Debug, Clone, Copy, Serialize, Deserialize)] |
|
I don't think I'm a fan of this change. Reading that paper the issue is the re-use of a tweak ( |
|
@sinui0, can you elaborate how a global counter would work? |
This is not clear to me, I'll need a definition of "session". The paper highlights an attack for recovering It seems to me it is sufficient to maintain the counter per VM instance (what I meant by global) not per circuit. The circuit boundary is unnecessary, we just need to maintain a counter for the total number of AND gates garbled, which can start at 1 and be maintained implicitly by both parties. If we really want to keep the randomization to mitigate the attack when a |
|
I see, you are suggesting randomizing the initial gate id and then incrementing per VM instance. That should work. (the attack works even if different deltas are used across multiple circuits #7 (comment) ) |
|
Closed in favour of #348 |
This PR implements gate randomization for garbling.
The rationale for it is discussed #7