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
324 mac check spdz #343
324 mac check spdz #343
Conversation
Codecov Report
@@ Coverage Diff @@
## master #343 +/- ##
============================================
- Coverage 100% 99.97% -0.03%
+ Complexity 3316 3292 -24
============================================
Files 369 366 -3
Lines 9181 9108 -73
Branches 689 680 -9
============================================
- Hits 9181 9106 -75
- Misses 0 1 +1
- Partials 0 1 +1
Continue to review full report at Codecov.
|
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 was reviewing the PR out of curiosity of the changes and figured I might as well leave my review comments if you care for them ;)
core/src/main/java/dk/alexandra/fresco/lib/generic/BroadcastComputation.java
Outdated
Show resolved
Hide resolved
core/src/main/java/dk/alexandra/fresco/lib/generic/CommitmentComputation.java
Show resolved
Hide resolved
core/src/test/java/dk/alexandra/fresco/lib/generic/MaliciousCommitmentComputation.java
Show resolved
Hide resolved
core/src/main/java/dk/alexandra/fresco/lib/generic/CommitmentComputation.java
Outdated
Show resolved
Hide resolved
@rubensayshi awesome, thanks for the review! All good points. Addressed in 5f9eb04. |
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.
See the inline comments; but it seems that there is a bit of a consistency issue of the changes in SPDZ compared to SPDZ2k. Furthermore it seems that the MAC check issue might remain in SPDZ2k.
...e/spdz2k/src/main/java/dk/alexandra/fresco/suite/spdz2k/resource/Spdz2kResourcePoolImpl.java
Show resolved
Hide resolved
suite/spdz/src/main/java/dk/alexandra/fresco/suite/spdz/gates/SpdzMacCheckProtocol.java
Outdated
Show resolved
Hide resolved
.../java/dk/alexandra/fresco/suite/spdz2k/protocols/computations/Spdz2kMacCheckComputation.java
Show resolved
Hide resolved
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.
nothing much to note from my part
|
||
BroadcastComputation(List<byte[]> input) { | ||
public BroadcastComputation(List<byte[]> input, boolean runValidation) { |
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 it is reasonable to document this class and the constructor - especially when it it resonable to use one or the other
final AesCtrDrbg localDrbg = new AesCtrDrbg(); | ||
final HashBasedCommitmentSerializer commitmentSerializer = new HashBasedCommitmentSerializer(); | ||
|
||
return builder.seq(new CoinTossingComputation(drbgSeedBitLength / 8, |
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.
Please reconsider the alignment here
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.
Actually check the entire file :)
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.
Looks good to me.
This PR addresses #324 which is a bug in our SPDZ mac-checking protocol.
In particular, we need to run a fresh coin tossing each time we run a MAC check. To implement this, the PR moves several generic computations (for instance
BroadcastComputation
) out of SPDZ2k and into core, so these can be re-used across protocol suites.Re-using these generic computations also allows us to remove some classes that were previously SPDZ-specific (e.g.,
SpdzCommitProtocol
) and use the same commitment functionality as is currently used in MASCOT.