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

Delete the old IPA implementation #956

Merged
merged 22 commits into from
Feb 20, 2024

Conversation

akoshelev
Copy link
Collaborator

I had to add more clippy checks because I noticed we don't run it when web-app feature is enabled, so we've accumulated quite a bit of debt there.

Maybe controversial, but I removed the radix sort implementation, mainly because it is not compatible with the new shuffle protocol. I think if we want to use it, we need to rewrite it anyway.

@@ -181,7 +154,7 @@ fn gen_inputs(
) -> io::Result<()> {
let rng = seed
.map(StdRng::seed_from_u64)
.unwrap_or_else(|| StdRng::from_entropy());
.unwrap_or_else(StdRng::from_entropy);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here and below - clippy error fixes

@@ -89,6 +91,26 @@ where
Ok(Replicated::new_arr(lhs, rhs))
}

/// Implement secure multiplication for semi-honest contexts with replicated secret sharing.
#[async_trait]
impl<C, F, const N: usize> super::SecureMul<C> for Replicated<F, N>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved things around to avoid slapping descriptive-gate feature flag on too many things

@@ -32,6 +27,16 @@ pub trait Reveal<C: Context, B: RecordBinding>: Sized {
async fn reveal<'fut>(&self, ctx: C, record_binding: B) -> Result<Self::Output, Error>
where
C: 'fut;

/// partial reveal protocol to open a shared secret to all helpers except helper `left_out` inside the MPC ring.
async fn partial_reveal<'fut>(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PartialReveal trait is removed too, I don't see a why partial_reveal should be on its own trait.

@@ -602,26 +604,55 @@ mod tests {
}

async fn ipa_query(app: &TestApp) -> Result<(), BoxError> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GenericReportTestInput and associated macro ipa_test_input! are gone

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Attention: 48 lines in your changes are missing coverage. Please review.

Comparison is base (b526f55) 90.30% compared to head (eb868d0) 88.43%.
Report is 3 commits behind head on main.

Files Patch % Lines
ipa-core/src/protocol/basics/reveal.rs 42.10% 33 Missing ⚠️
ipa-core/src/cli/noise.rs 0.00% 8 Missing ⚠️
ipa-core/src/cli/playbook/ipa.rs 85.00% 3 Missing ⚠️
ipa-core/src/cli/playbook/mod.rs 60.00% 2 Missing ⚠️
ipa-core/src/bin/report_collector.rs 87.50% 1 Missing ⚠️
ipa-core/src/bin/test_mpc.rs 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #956      +/-   ##
==========================================
- Coverage   90.30%   88.43%   -1.88%     
==========================================
  Files         182      158      -24     
  Lines       26091    21462    -4629     
==========================================
- Hits        23561    18979    -4582     
+ Misses       2530     2483      -47     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@danielmasny danielmasny left a 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. I noticed you also changed some inputs to use a value rather than reference. There might be other parts that we can remove (e.g. some of the files in ff). We can always removed them later once we have a clear picture what we still need.

Copy link
Collaborator

@andyleiserson andyleiserson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain the issue with descriptive-gate? Compact gate doesn't work with malicious security any more for some reason?

ipa-core/src/protocol/basics/partial_reveal.rs Outdated Show resolved Hide resolved
@akoshelev
Copy link
Collaborator Author

Could you explain the issue with descriptive-gate? Compact gate doesn't work with malicious security any more for some reason?

Yes that is our common source of pain - anything that we don't execute as part of collect_steps cannot be compiled with compact-gate feature enabled. We don't run OPRF IPA with malicious security enabled, hence the need to gate the malicious implementation behind a feature flag

@akoshelev akoshelev merged commit 36c5883 into private-attribution:main Feb 20, 2024
11 of 12 checks passed
@akoshelev akoshelev deleted the ipa-v2-is-dead branch February 20, 2024 23:15
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

Successfully merging this pull request may close these issues.

3 participants