Skip to content

Commit

Permalink
Fix ci (#7)
Browse files Browse the repository at this point in the history
* Fix CI 
* Exclude remoc from workspace
  • Loading branch information
robinhundt authored Dec 12, 2023
1 parent 8c67859 commit 897a319
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 103 deletions.
File renamed without changes.
96 changes: 1 addition & 95 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
resolver = "2"
members = ["crates/*"]
exclude = ["libs/coproto-sys", "libs/libote-sys"]
exclude = ["libs/libote-sys", "libs/remoc"]

[profile.release]
debug = 1
2 changes: 1 addition & 1 deletion crates/gmw/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub use circuit::Circuit;
pub use circuit::GateId;
pub use gmw_macros::sub_circuit;
pub use parse::bristol;
pub use protocols::boolean_gmw::BooleanGate;
pub use protocols::boolean_gmw::{BooleanGate, BooleanGmw};
pub use utils::BitMask;

pub mod circuit;
Expand Down
1 change: 1 addition & 0 deletions crates/gmw/src/mul_triple/silent_ot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ mod tests {
use rand::rngs::OsRng;

#[tokio::test]
#[cfg(feature = "silent_ot_silver")]
async fn silent_mts() {
let (ch11, ch21) = mpc_channel::in_memory::new_pair(128);
let (ch12, ch22) = mpc_channel::in_memory::new_pair(128);
Expand Down
4 changes: 2 additions & 2 deletions crates/gmw/src/share_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ pub(crate) fn sub_circuit_inputs<P: Protocol, Idx: GateIdx>(
///# use gmw::circuit::{BaseCircuit, DefaultIdx};
///# use gmw::share_wrapper::{inputs, low_depth_reduce};
///# use parking_lot::Mutex;
///# use gmw::{BooleanGate, Circuit, CircuitBuilder};
///# use gmw::{BooleanGate, Circuit, CircuitBuilder, BooleanGmw};
///#
/// let inputs = inputs::<DefaultIdx>(23);
/// let inputs = inputs::<BooleanGmw, DefaultIdx>(23);
/// low_depth_reduce(inputs, std::ops::BitAnd::bitand)
/// .unwrap()
/// .output();
Expand Down
46 changes: 46 additions & 0 deletions crates/gmw/test_resources/lut_circuits/lfa32.lut
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#STATISTICS
#ORIGINAL LUTS: 70

#GROUPED LUTS: 27
#DEPTH: 3
#XOR: 0
#NOT: 0
#XNOR: 0
#ASSIGN: 0

#INPUTS 64
x_a[0] x_a[1] x_a[2] x_a[3] x_a[4] x_a[5] x_a[6] x_a[7] x_a[8] x_a[9] x_a[10] x_a[11] x_a[12] x_a[13] x_a[14] x_a[15] x_a[16] x_a[17] x_a[18] x_a[19] x_a[20] x_a[21] x_a[22] x_a[23] x_a[24] x_a[25] x_a[26] x_a[27] x_a[28] x_a[29] x_a[30] x_a[31] x_b[0] x_b[1] x_b[2] x_b[3] x_b[4] x_b[5] x_b[6] x_b[7] x_b[8] x_b[9] x_b[10] x_b[11] x_b[12] x_b[13] x_b[14] x_b[15] x_b[16] x_b[17] x_b[18] x_b[19] x_b[20] x_b[21] x_b[22] x_b[23] x_b[24] x_b[25] x_b[26] x_b[27] x_b[28] x_b[29] x_b[30] x_b[31]
#OUTPUTS 33
wx[0] wx[1] wx[2] wx[3] wx[4] wx[5] wx[6] wx[7] wx[8] wx[9] wx[10] wx[11] wx[12] wx[13] wx[14] wx[15] wx[16] wx[17] wx[18] wx[19] wx[20] wx[21] wx[22] wx[23] wx[24] wx[25] wx[26] wx[27] wx[28] wx[29] wx[30] wx[31] wx[32]
#constant zero
0
#constant one
1
#LUTs
LUT 8 5 x_a[0] x_a[1] x_a[2] x_a[3] x_b[0] x_b[1] x_b[2] x_b[3] 2 10001000 0x6 wx[0] 4 11001100 0x936c wx[1] 6 11101110 0xe1c3870f1e3c78f0 wx[2] 8 11111111 0xfe01fc03f807f00fe01fc03f807f00ff01fe03fc07f80ff01fe03fc07f80ff00 wx[3] 8 11111111 0x000100030007000f001f003f007f00ff01ff03ff07ff0fff1fff3fff7fffffff n102
LUT 8 4 x_a[4] x_a[5] x_a[6] x_a[7] x_b[4] x_b[5] x_b[6] x_b[7] 4 11001100 0x137f n105 4 11001100 0x1248 n106 8 11111111 0x0001000200040008001000200040008001000200040008001000200040008000 n109 8 11111111 0x000100030007000f001f003f007f00ff01ff03ff07ff0fff1fff3fff7fffffff n110
LUT 8 3 x_a[8] x_a[9] x_a[10] x_a[11] x_b[8] x_b[9] x_b[10] x_b[11] 2 00010001 0x6 n115 8 11111111 0x0001000200040008001000200040008001000200040008001000200040008000 n117 8 11111111 0x000100030007000f001f003f007f00ff01ff03ff07ff0fff1fff3fff7fffffff n118
LUT 8 3 x_a[12] x_a[13] x_a[14] x_a[15] x_b[12] x_b[13] x_b[14] x_b[15] 2 00100010 0x6 n121 8 11111111 0x0001000200040008001000200040008001000200040008001000200040008000 n126 8 11111111 0xfffefffcfff8fff0ffe0ffc0ff80ff00fe00fc00f800f000e000c00080000000 n127
LUT 8 3 x_a[16] x_a[17] x_a[18] x_a[19] x_b[16] x_b[17] x_b[18] x_b[19] 2 00010001 0x6 n132 8 11111111 0x0001000200040008001000200040008001000200040008001000200040008000 n134 8 11111111 0xfffefffcfff8fff0ffe0ffc0ff80ff00fe00fc00f800f000e000c00080000000 n135
LUT 8 4 x_a[27] x_b[27] x_a[22] x_b[22] x_a[20] x_a[21] x_b[20] x_b[21] 4 00001111 0x1248 n138 4 00001111 0x137f n139 2 00110000 0x6 n141 2 11000000 0x6 n151
LUT 8 4 x_a[24] x_a[25] x_a[26] x_a[27] x_b[24] x_b[25] x_b[26] x_b[27] 4 11001100 0x1248 n148 4 11001100 0x137f n149 8 11111111 0x0001000200040008001000200040008001000200040008001000200040008000 n153 8 11111111 0xfffefffcfff8fff0ffe0ffc0ff80ff00fe00fc00f800f000e000c00080000000 n154
LUT 8 5 x_a[31] x_b[31] x_a[30] x_b[30] x_a[28] x_a[29] x_b[28] x_b[29] 2 00000101 0x6 n156 4 00001111 0x1248 n158 4 00001111 0xec80 n160 2 00110000 0x6 n162 2 11000000 0x6 n164
LUT 7 3 n153 n158 n102 x_a[4] x_a[5] x_b[4] x_b[5] 3 0011010 0x69 wx[4] 5 0011111 0xd24b2db4 wx[5] 2 1100000 0x8 n159
LUT 7 2 n102 n105 n106 x_a[6] x_a[7] x_b[6] x_b[7] 5 1111010 0x738c8c73 wx[6] 7 1111111 0xff73008c73008cff008cff738cff7300 wx[7]
LUT 7 2 n102 n109 n110 n117 n118 n126 n127 3 1110000 0xb0 n111 7 1111111 0x0000000000000000b0ff0000ffffffff n128
LUT 8 2 n118 n121 x_a[12] x_a[13] x_a[14] x_b[12] x_b[13] x_b[14] 5 01110110 0x02082080 n123 7 10111111 0x0002000b002f00bf02ff0bff2fffbfff n124
LUT 7 2 n135 n138 n139 x_a[22] x_a[23] x_b[22] x_b[23] 3 1110000 0x70 n140 7 1111111 0xffffff8fffff8f00ff8f00008f000000 n145
LUT 5 1 n134 n138 n141 x_a[23] x_b[23] 5 11111 0x00808000 n144
LUT 7 2 n154 n158 n160 x_a[30] x_a[31] x_b[30] x_b[31] 3 1110000 0x07 n161 7 1111111 0x00000007000007ff0007ffff07ffffff n166
LUT 8 4 n111 n115 x_a[8] x_a[9] x_a[10] x_b[8] x_b[9] x_b[10] 3 10100100 0x69 wx[8] 5 10110110 0xd24b2db4 wx[9] 7 10111111 0xfd02f40bd02f40bf02fd0bf42fd0bf40 wx[10] 8 11111111 0x333333393333339c333339cc33339ccc3339cccc339ccccc39cccccc9ccccccc wx[11]
LUT 8 3 n111 n117 n118 n121 x_a[12] x_a[13] x_b[12] x_b[13] 5 11101010 0x4fb0b04f wx[12] 7 11101111 0xff4f00b04f00b0ff00b0ff4fb0ff4f00 wx[13] 8 11111111 0x00ff00ff00ffb04f00ff00ffb04fff0000ffb04fff00ff00b04fff00ff00ff00 wx[14]
LUT 6 1 n111 n123 n124 n117 x_a[15] x_b[15] 6 111111 0x4f0fb0f0b0f04f0f wx[15]
LUT 8 4 n128 n132 x_a[16] x_a[17] x_a[18] x_b[16] x_b[17] x_b[18] 3 10100100 0x69 wx[16] 5 10110110 0xd24b2db4 wx[17] 7 10111111 0xfd02f40bd02f40bf02fd0bf42fd0bf40 wx[18] 8 11111111 0x333333393333339c333339cc33339ccc3339cccc339ccccc39cccccc9ccccccc wx[19]
LUT 7 2 n128 n134 n135 x_a[20] x_a[21] x_b[20] x_b[21] 5 1111010 0xf40b0bf4 wx[20] 7 1111111 0xfff4000bf4000bff000bfff40bfff400 wx[21]
LUT 5 1 n128 n140 n134 n138 n141 5 11111 0x8ccc7333 wx[22]
LUT 8 1 n128 n140 n134 n138 x_a[22] x_a[23] x_b[22] x_b[23] 8 11111111 0xffff733300008ccc733300008cccffff00008cccffff73338cccffff73330000 wx[23]
LUT 7 2 n128 n144 n145 x_a[24] x_a[25] x_b[24] x_b[25] 5 1111010 0xf40b0bf4 wx[24] 7 1111111 0xfff4000bf4000bff000bfff40bfff400 wx[25]
LUT 8 2 n128 n144 n145 n148 n149 n151 x_a[26] x_b[26] 7 11111011 0xf400ffff0bff00000bff0000f400ffff wx[26] 8 11111111 0x00000000ffffffff0bff0000f400ffff0bff0000f400ffffffffffff00000000 wx[27]
LUT 8 2 n128 n144 n145 n153 n154 n156 x_a[28] x_b[28] 7 11111011 0xfffff40000000bff00000bfffffff400 wx[28] 8 11111111 0x00000000ffffffff00000bfffffff40000000bfffffff400ffffffff00000000 wx[29]
LUT 8 2 n128 n144 n145 n159 n166 n161 n162 n164 6 11110110 0x0bff0000f400ffff wx[30] 7 11111011 0xf400ffff0000ffff0000ffff0000ffff wx[32]
LUT 8 1 n128 n144 n145 n159 n161 n164 x_a[30] x_b[30] 8 11111111 0x00000000ffffffff0bff0000f400ffff0bff0000f400ffffffffffff00000000 wx[31]
3 changes: 2 additions & 1 deletion crates/gmw/tests/boolean_aby2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ use std::path::Path;
use tracing::{info, trace};

#[tokio::test(flavor = "multi_thread")]
#[ignore = "issue #6"]
async fn eval_sample_lut() -> anyhow::Result<()> {
let _guard = init_tracing();
let circ = BaseCircuit::load_lut_circuit(
Path::new("test_resources/lut_circuits/lfa32_4.lut"),
Path::new("test_resources/lut_circuits/minimal.lut"),
Load::Circuit,
)?
.into();
Expand Down
2 changes: 1 addition & 1 deletion crates/zappot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bitpolymul = {path = "../bitpolymul", optional = true}
bitvec = "1.0.0"
bytemuck = { version = "1.9.1", features = ["derive", "extern_crate_alloc"]}
crossbeam-channel = "0.5.4"
curve25519-dalek = { version = "4.0.0-pre.2", features = ["serde"]}
curve25519-dalek = { version = "4.0.0-pre.2", features = ["serde", "rand_core"]}
futures = { version = "0.3.21", features = ["executor"]}
rand = "0.8.5"
rand_core = "0.6.3"
Expand Down
4 changes: 2 additions & 2 deletions crates/zappot/src/base_ot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl BaseROTSender for Sender {
RNG: RngCore + CryptoRng + Send,
{
let a = Scalar::random(rng);
let mut A = &RISTRETTO_BASEPOINT_TABLE * &a;
let mut A = RISTRETTO_BASEPOINT_TABLE * &a;
let seed: Block = rng.gen();
// TODO: libOTE uses fixedKeyAES hash here, using Blake should be fine and not really
// impact performance
Expand Down Expand Up @@ -130,7 +130,7 @@ impl BaseROTReceiver for Receiver {
.iter()
.map(|choice| {
let b = Scalar::random(rng);
let B_0 = &RISTRETTO_BASEPOINT_TABLE * &b;
let B_0 = RISTRETTO_BASEPOINT_TABLE * &b;
let B = [B_0, A + B_0];
(b, B[choice.as_usize()])
})
Expand Down

0 comments on commit 897a319

Please sign in to comment.