Skip to content

Commit 1e5a6d7

Browse files
committed
partial aby2.0
1 parent e80fc31 commit 1e5a6d7

File tree

15 files changed

+3347
-754
lines changed

15 files changed

+3347
-754
lines changed

Cargo.lock

Lines changed: 293 additions & 368 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ This framework implements secure 2-party secret-sharing-based multi party comput
66
the Boolean and arithmetic versions of GMW87 with multiplication triple preprocessing. Additionally, we implement the
77
Boolean part of the ABY2.0 protocol.
88

9+
> [!NOTE]
10+
> You need to run the tests with `-- --test-threads=1` at the moment!
11+
912
## Citing SEEC
1013
If you use SEEC for your academic projects, please cite as follows:
1114
```

crates/seec/src/executor.rs

Lines changed: 318 additions & 290 deletions
Large diffs are not rendered by default.

crates/seec/src/protocols/aby2.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub struct SetupData {
7979

8080
#[derive(Clone)]
8181
pub struct EvalShares {
82-
shares: BitVec,
82+
pub shares: BitVec,
8383
}
8484

8585
impl BooleanAby2 {
@@ -306,7 +306,7 @@ impl BooleanGate {
306306
}
307307
}
308308

309-
fn setup_output_share(
309+
pub(crate) fn setup_output_share(
310310
&self,
311311
mut inputs: impl Iterator<Item = Share>,
312312
mut rng: impl Rng,
@@ -400,6 +400,15 @@ impl BooleanGate {
400400
})
401401
.collect()
402402
}
403+
404+
pub fn from_gmw_gate(g: boolean_gmw::BooleanGate) -> Self {
405+
match g {
406+
crate::BooleanGate::Base(base_gate) => Self::Base(base_gate),
407+
crate::BooleanGate::And => Self::And { n: 2 },
408+
crate::BooleanGate::Xor => Self::Xor,
409+
crate::BooleanGate::Inv => Self::Inv,
410+
}
411+
}
403412
}
404413

405414
impl Gate<bool> for BooleanGate {

0 commit comments

Comments
 (0)