Skip to content

Commit

Permalink
Sharded decrypt and uniqueness verification (#1358)
Browse files Browse the repository at this point in the history
* refactor UniqueBytesValidator to UniqueTagValidator with fixed width array

* add implementation of Serializable for UniqueTag

* tmp working commit

* working commit, all tests passing

* remove type aliases because clippy doesn't like them

* Update ipa-core/src/query/runner/hybrid.rs

Co-authored-by: Alex Koshelev <[email protected]>

* fix formatting error

* add a ReshardByTag step and narrow to it

* do modulo on u128, update compile check for TAG_SIZE

* update type signature and name of flatten3v

* update test to generate_random_tag directly

* reorganize ShardIndex implementations and remove conflicting implementation

---------

Co-authored-by: Alex Koshelev <[email protected]>
  • Loading branch information
eriktaubeneck and akoshelev authored Oct 18, 2024
1 parent 4307265 commit 0c276b9
Show file tree
Hide file tree
Showing 10 changed files with 419 additions and 223 deletions.
1 change: 1 addition & 0 deletions ipa-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ ipa-step = { version = "*", path = "../ipa-step" }
ipa-step-derive = { version = "*", path = "../ipa-step-derive" }

aes = "0.8.3"
assertions = "0.1.0"
async-trait = "0.1.79"
async-scoped = { version = "0.9.0", features = ["use-tokio"], optional = true }
axum = { version = "0.7.5", optional = true, features = ["http2", "macros"] }
Expand Down
4 changes: 3 additions & 1 deletion ipa-core/src/protocol/hybrid/step.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use ipa_step_derive::CompactStep;

#[derive(CompactStep)]
pub(crate) enum HybridStep {}
pub(crate) enum HybridStep {
ReshardByTag,
}
17 changes: 2 additions & 15 deletions ipa-core/src/query/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use crate::{
Gate,
},
query::{
runner::{HybridQuery, OprfIpaQuery, QueryResult},
runner::{OprfIpaQuery, QueryResult},
state::RunningQuery,
},
sync::Arc,
Expand Down Expand Up @@ -164,20 +164,7 @@ pub fn execute<R: PrivateKeyRegistry>(
)
},
),
(QueryType::SemiHonestHybrid(query_params), _) => do_query(
runtime,
config,
gateway,
input,
move |prss, gateway, config, input| {
let ctx = SemiHonestContext::new(prss, gateway);
Box::pin(
HybridQuery::<_, BA32, R>::new(query_params, key_registry)
.execute(ctx, config.size, input)
.then(|res| ready(res.map(|out| Box::new(out) as Box<dyn Result>))),
)
},
),
(QueryType::SemiHonestHybrid(_), _) => todo!(),
}
}

Expand Down
Loading

0 comments on commit 0c276b9

Please sign in to comment.