Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
254 commits
Select commit Hold shift + click to select a range
ab63751
Instruction output functionality.
mkskeller Nov 20, 2021
eac6456
Allow preprocessing information to be supplied via named pipes.
mkskeller Nov 22, 2021
10f43e2
Fix cleartext comparisons with larger primes.
mkskeller Nov 23, 2021
40431cd
Fix bug in early abort.
mkskeller Nov 25, 2021
00a2bcb
Fix problem with Scripts/run-common.sh execution
rtaiello Nov 29, 2021
3a2683f
Merge pull request #429 from rtaiello/patch-1
mkskeller Nov 29, 2021
ae99bed
Access clear bit memory by run-time indices.
mkskeller Dec 2, 2021
b771417
Clear to secret bit conversion with Yao's garbled circuits.
mkskeller Dec 4, 2021
e76014e
More parallelized SSL handshake.
mkskeller Dec 7, 2021
047a477
init rc2 network
HaoXuan40404 Dec 8, 2021
cdb0c0f
In-place operations for containers.
mkskeller Dec 15, 2021
95c0383
support proxy pattern
Shareong Jan 5, 2022
8a19fd3
detach task data
Shareong Jan 6, 2022
3b356c3
detach task data
Shareong Jan 6, 2022
e07d9bf
Maintenance.
mkskeller Jan 11, 2022
aaa90a2
Don't overwrite persistence files at beginning.
mkskeller Jan 12, 2022
962919c
Bug in regint optimizer.
mkskeller Jan 13, 2022
f343d73
Bug in for_range_opt.
mkskeller Jan 13, 2022
0f9d5de
Allow overwriting of persistence files.
mkskeller Jan 12, 2022
9fcffad
approx_sigmoid is attributed to an earlier paper
jvmncs Jan 18, 2022
bc43c30
Merge pull request #450 from jvmncs/patch-1
mkskeller Jan 19, 2022
b5ff373
fix close socket error
Shareong Jan 20, 2022
fc3a2a0
Personal array functionality.
mkskeller Jan 24, 2022
5584e18
Bugs in binary register conversion.
mkskeller Jan 31, 2022
d50e97f
Simplify code.
mkskeller Feb 1, 2022
61d40b7
Fix bugs in mathematical functions using binary circuits.
mkskeller Feb 4, 2022
33991a9
send job type to gateway
Shareong Feb 15, 2022
0f7020d
Semi-honest computation based on threshold semi-homomorphic encryption.
mkskeller Feb 17, 2022
08ea9b3
Better scaling network setup.
mkskeller Feb 22, 2022
9c3e607
Bug when inputting to large arrays.
mkskeller Feb 24, 2022
6664de3
Multiplication of matrices larger than the maximum register size.
mkskeller Mar 1, 2022
60dd787
Multithreaded matrix multiplication.
mkskeller Mar 2, 2022
9c0c94d
update options
Shareong Mar 4, 2022
e485aac
Easier change of domain in SPDZ2k.
mkskeller Mar 2, 2022
0501a27
Document domain types.
mkskeller Mar 8, 2022
6a223a6
RTD build.
mkskeller Mar 8, 2022
c040a54
Fix typo in docs
sbellem Mar 10, 2022
2f8da94
Merge pull request #485 from sbellem/docs
mkskeller Mar 10, 2022
b283fdb
Improved multi-threaded tree reduction.
mkskeller Mar 9, 2022
1227376
Bug in conversion from secret integer to secret bits.
mkskeller Mar 14, 2022
5b248ce
Bug in negative sbits input.
mkskeller Mar 16, 2022
2834124
fix fuzzy search in database
HaoXuan40404 Mar 31, 2022
ddeef93
add write matrix to file
HaoXuan40404 Mar 31, 2022
07292ec
Bug in integer division.
mkskeller Mar 31, 2022
565c364
Bug in fixed-point division.
mkskeller Apr 2, 2022
b0e7857
Store MAC keys for persistence.
mkskeller Apr 1, 2022
f42930e
Sufficient offline preprocessing with several threads.
mkskeller Apr 2, 2022
06f3f21
Add SSL_DIR env var
sbellem Feb 11, 2022
68d6eb0
Add .env to .gitignore
sbellem Apr 9, 2022
d59d2aa
Merge pull request #528 from sbellem/ssl-dir
mkskeller Apr 11, 2022
d52a444
Merge pull request #529 from sbellem/gitignore
mkskeller Apr 11, 2022
9b4e044
Add missing SSL_DIR cflag in CONFIG
sbellem Apr 13, 2022
5773930
Emphasize that ssl keys must be under SSL_DIR
sbellem Apr 13, 2022
3050823
Add Dockerfile
sbellem Apr 8, 2022
4d17b4f
Add tl;dr for docker in readme
sbellem Apr 11, 2022
732f7c5
Merge pull request #535 from sbellem/ssl-dir
mkskeller Apr 13, 2022
2459ecb
Merge pull request #527 from sbellem/docker
mkskeller Apr 13, 2022
24bf33a
Fix typo in ECDSA readme
ghoshbishakh Apr 15, 2022
eee8865
Merge pull request #540 from ghoshbishakh/fix-edcda-doc
mkskeller Apr 19, 2022
9ef15cc
Protocol in dealer model.
mkskeller Apr 19, 2022
4e811ec
Fix tiny typo in readme
sbellem Apr 20, 2022
86a29e2
Merge pull request #548 from sbellem/typo-readme
mkskeller Apr 21, 2022
a5917de
Protocol setup with exact modulus.
mkskeller Apr 21, 2022
2760659
Fix comment/example in Dockerfile
sbellem Apr 22, 2022
49ff3f8
Merge pull request #551 from sbellem/fix-example-dockerfile
mkskeller Apr 22, 2022
a858e5b
Security bug in homomorphic encryption parameter generation.
mkskeller Apr 21, 2022
db67635
Security bug in Temi matrix multiplication.
mkskeller May 4, 2022
642d11f
Compile-time option for unencrypted client connections.
mkskeller May 4, 2022
b3c39c4
Missing vectorization.
mkskeller May 11, 2022
59fd44b
Fix compilation with OpenSSL 3.
mkskeller May 16, 2022
8e4fd45
Windows/VirtualBox performance
jakobzierk May 17, 2022
f349f76
Merge pull request #568 from jakobzierk/patch-2
mkskeller May 17, 2022
de12e08
Fix bugs on macOS.
mkskeller May 23, 2022
1460c9b
Fix output issue.
mkskeller May 24, 2022
2dad77b
More flexible conversion.
mkskeller May 24, 2022
5ab8c70
Secure shuffling.
mkskeller May 27, 2022
8853496
Fix biases in PRNG.
mkskeller Jun 2, 2022
6755a8f
Python client example.
mkskeller Jun 13, 2022
4c8e616
Improved binary circuit functionality.
mkskeller Jun 14, 2022
ec1d302
Local right shift for GF(2^n).
mkskeller Jun 23, 2022
af5af2d
Fix bug in logistic regression benchmark.
mkskeller Jun 23, 2022
12a0f0c
Fix bug when using specific port numbers.
mkskeller Jun 24, 2022
31f32f5
Fix bug in example code for adding protocols.
mkskeller Jun 24, 2022
a3b7d49
Small error
RHG101997 Jun 24, 2022
63f6a11
Merge pull request #601 from RHG101997/patch-1
mkskeller Jun 24, 2022
8707864
Improved error message for unclosed if blocks.
mkskeller Jun 24, 2022
1cdc682
Duplicated word
RHG101997 Jun 28, 2022
21b6a10
Merge pull request #604 from RHG101997/patch-2
mkskeller Jun 28, 2022
505d483
Parameter for ring size in fake preprocessing.
mkskeller Jul 1, 2022
7e2c0ed
Splitting for any number of bits in Semi2k.
mkskeller Jul 4, 2022
2a1ca6a
Fix cryptic assert statement in oram.py
Quitlox Jul 7, 2022
9bf86fc
Merge pull request #613 from Quitlox/fix-oram-batch-init-cryptic-asse…
mkskeller Jul 7, 2022
0d64282
Basic estimate for shuffling cost.
mkskeller Jul 8, 2022
dce0b42
Missing vectorization.
mkskeller Jul 14, 2022
6db0ed1
Array and matrix sorting in binary circuits.
mkskeller Jul 15, 2022
1a9bcd2
Correct SimpleOT version.
mkskeller Jul 16, 2022
1961a78
Fixed bug in MMO with prime fields longer than 1024 bits.
mkskeller Jul 16, 2022
1bbbcd2
Fixed bug in Python client.
mkskeller Jul 18, 2022
ac252cd
Fixed bug in MemValue of size larger than one.
mkskeller Jul 19, 2022
a1074ca
Fix BMR's --input-file and --output-file
prayforwind Jul 22, 2022
a0f5bb2
Update Makefile for macs where Homebrew is installed in non-tradition…
eriktaubeneck Jul 23, 2022
d39ca28
fix sorting import bug in Compiler/types.py
eriktaubeneck Jul 23, 2022
6db5f5d
update README to better represent running from other directories
eriktaubeneck Jul 23, 2022
e3dbb98
Merge pull request #628 from eriktaubeneck/mac-setup
mkskeller Jul 25, 2022
a9aff81
Merge pull request #629 from eriktaubeneck/sorting-import-bug
mkskeller Jul 25, 2022
4fda134
Merge pull request #627 from prayforwind/fix-625
mkskeller Jul 25, 2022
101879f
Try loading dynamic library from root directory in scripts on Linux a…
mkskeller Jul 25, 2022
81419ba
Fix bugs in matrix multiplication with binary circuits.
mkskeller Jul 25, 2022
9196044
Reveal sbitvec as list.
mkskeller Jul 26, 2022
97efdbc
Fix bug in preprocessing accounting.
mkskeller Jul 26, 2022
e1b4538
refactor to add Compiler class
eriktaubeneck Aug 3, 2022
1c6c758
allow for name to be passed in for function compiler
eriktaubeneck Aug 3, 2022
4859a09
update to use decorator
eriktaubeneck Aug 3, 2022
24a7b4f
add setup.py to and an example mpc program
eriktaubeneck Aug 3, 2022
7005ba4
remove unneed compiler parameter
eriktaubeneck Aug 3, 2022
497dd79
Fix bug in LSB extraction.
mkskeller Aug 3, 2022
c4c167f
Flow optimization test.
mkskeller Aug 5, 2022
e589c0b
Merge branch 'master' into compile-refactor
eriktaubeneck Aug 5, 2022
5e4e3dd
load mpc file as a string, not bytes
eriktaubeneck Aug 5, 2022
a165881
Fix bug in sintbit.
mkskeller Aug 6, 2022
80c7250
Add documentation about SPDZ2k non-interactive execution and correct …
hdvanegasm Aug 8, 2022
d6f843f
Fix bugs in Python client.
mkskeller Aug 8, 2022
803ffbb
Merge pull request #640 from hernan232/doc_spdz2k_bmr
mkskeller Aug 9, 2022
a94f774
Use edaBits for equality test with rings.
mkskeller Aug 10, 2022
3f90cc3
Fix bugs in sorting with binary circuits.
mkskeller Aug 11, 2022
f469dfc
Add the INVPERM instruction
Quitlox Jul 26, 2022
70135dd
Fix segfault in INVPERM instruction
Quitlox Jul 26, 2022
52ac60b
Add --invperm flag for the INVPERM instruction
Quitlox Aug 11, 2022
9e9210e
Add bit_not to MemValue
Quitlox Jul 28, 2022
06520ea
Add SqrtORAM to Compiler
Quitlox Jul 28, 2022
b070c23
Optimize performance of SqrtORAM
Quitlox Jul 29, 2022
3a4ccee
Fix misaligned stashi bug in sqrt_oram
Quitlox Jul 29, 2022
8af345a
Fix improper multi-dimensionality in SqrtORAM
Quitlox Jul 29, 2022
33299e7
Add multithreading to LinearPositionMap in SqrtORAM
Quitlox Jul 29, 2022
2cd263d
Improve multithreading and remove non-multithreaded code
Quitlox Aug 1, 2022
fb5871a
Add allow_memory_allocation option to SqrtORAM
Quitlox Aug 11, 2022
a4e4bad
add new in python compile to docs
eriktaubeneck Aug 12, 2022
f83476a
fix small typo
eriktaubeneck Aug 13, 2022
39b6d7e
allow custom_args to manaully override args
eriktaubeneck Aug 14, 2022
3c4f761
Merge pull request #638 from eriktaubeneck/compile-refactor
mkskeller Aug 15, 2022
4e9e600
Merge https://github.com/Quitlox/MP-SPDZ
mkskeller Aug 16, 2022
7630fbc
Correct documentation in BMR table.
hdvanegasm Aug 16, 2022
054995d
Merge pull request #646 from hdvanegasm/fix_doc_bmr
mkskeller Aug 17, 2022
e08a6ad
Fix shuffling in emulation.
mkskeller Aug 17, 2022
6a42453
SoftSpokenOT.
mkskeller Aug 25, 2022
29e498c
Faster test.
mkskeller Aug 25, 2022
c7b11ae
Update Dockerfile.
mkskeller Aug 25, 2022
c6e7302
Fix bugs in documentation.
mkskeller Aug 26, 2022
d754d41
Faster test.
mkskeller Aug 26, 2022
3ec1bd6
Fix broken import of GC.types to a relative import
Aug 26, 2022
e0dfcf9
Merge pull request #660 from aminfa/patch-1
mkskeller Aug 29, 2022
db40116
Update README.md
Mikerah Aug 31, 2022
7aab774
Merge pull request #664 from Mikerah/patch-1
mkskeller Sep 1, 2022
7a4c6f6
Bump version.
mkskeller Sep 1, 2022
15284ea
Fix security bug: insufficient security in non-interactive zero-knowl…
mkskeller Sep 2, 2022
817a9b4
Don't install boost locally by default.
mkskeller Sep 2, 2022
091484b
Print all timers in binary machines.
mkskeller Sep 7, 2022
24c56ce
Fix bug in vector input.
mkskeller Sep 13, 2022
1f592f1
Fix bug in floor computation.
mkskeller Sep 14, 2022
239f72b
Fix bugs in binary sorting.
mkskeller Sep 15, 2022
108be7c
Fix bug in Dockerfile.
mkskeller Sep 17, 2022
5867386
Fix sqrt_oram method_blocks
Quitlox Sep 20, 2022
21bfc63
Increase the buffer packing speed in domain.py
RHG101997 Sep 23, 2022
9a21897
Fix unintented memory allocation when allocation is disabled
Quitlox Oct 4, 2022
6d4acb4
Merge branch 'sqrt-oram' of github.com:Quitlox/MP-SPDZ into sqrt-oram
Quitlox Oct 4, 2022
a92f652
Merge pull request #685 from RHG101997/patch-3
mkskeller Oct 5, 2022
252c23c
Convenient interface for ORAM in binary circuits.
mkskeller Oct 6, 2022
1223ad6
Fix bug in binary circuit ORAM.
mkskeller Oct 6, 2022
6a0a780
Bugfix in RecursivePositionMap.get_position
Quitlox Oct 6, 2022
4ad6b51
Fix local libOTe installation on multiarch systems.
mkskeller Oct 10, 2022
f48c933
Use UTF-8 for outputs.
mkskeller Oct 19, 2022
d7f2c63
Fix bug in client interface.
mkskeller Oct 19, 2022
f89e3e1
Quote $PATH in Makefile
martinthomson Oct 20, 2022
14f56cf
Merge pull request #714 from martinthomson/quote-path
mkskeller Oct 20, 2022
ed7a474
Merge pull request #634 from Quitlox/sqrt-oram
mkskeller Oct 20, 2022
6f553cd
Dijkstra's algorithm in binary circuits.
mkskeller Oct 24, 2022
f5ed84c
More functionality with variable MultiArray size.
mkskeller Oct 27, 2022
aab093b
Automatic conversion for integer operations in binary circuits.
mkskeller Oct 27, 2022
9bbf38a
Update interface in example.
mkskeller Oct 31, 2022
bef8448
Add missing function.
mkskeller Oct 31, 2022
49fa130
Bump version.
mkskeller Oct 18, 2022
a9b03e8
Bug when system uses lib64.
mkskeller Nov 1, 2022
13b53d1
Fix libOTe library location.
mkskeller Nov 3, 2022
5812729
Fix bug in fake preprocessing.
mkskeller Nov 5, 2022
9033656
Interactive mode in BMR machines.
mkskeller Nov 7, 2022
cd25c2e
Decision tree training.
mkskeller Nov 9, 2022
e904a1b
Fix bugs in computation with binary circuits.
mkskeller Nov 30, 2022
0fd0a9a
Fix bug in macOS networking.
mkskeller Dec 15, 2022
c8799df
Use libOTe compatible with Apple M1 hardware.
mkskeller Dec 16, 2022
e9b9df9
Fix bug in binary subtraction.
mkskeller Dec 28, 2022
49c5070
Missing operations.
mkskeller Jan 3, 2023
3e280ab
Logarithm on secret integers.
mkskeller Jan 3, 2023
a3acf6e
Fix bugs in MaxPool.
mkskeller Jan 4, 2023
1f087f4
Fix bug in sorting.
mkskeller Jan 5, 2023
3ca35c7
Mitigate bug in GCC.
mkskeller Jan 5, 2023
c30bed3
Vectorized inputs for fixed-point numbers in binary circuits.
mkskeller Jan 9, 2023
63cb9c7
Bump version.
mkskeller Jan 10, 2023
a996aac
Mitigate GCC bug.
mkskeller Jan 10, 2023
5e75280
Fix bug in garbled circuit mode.
mkskeller Jan 10, 2023
4c8620a
Increase maximum memory.
mkskeller Jan 16, 2023
e42d11c
Fix bugs in sint-sfix comparison.
mkskeller Jan 18, 2023
bccfea7
Fix bugs in usage messaging.
mkskeller Jan 30, 2023
20f5cdc
Missing code.
mkskeller Jan 31, 2023
07a5b1f
Fix bug in example program.
mkskeller Feb 3, 2023
25c49ab
Fix complexity bug in allocation.
mkskeller Feb 6, 2023
2126897
Concatenation of multi-arrays.
mkskeller Feb 9, 2023
59afe5d
Avoid excessive memory use in matrix multiplication with Beaver-based…
mkskeller Feb 10, 2023
2f4d585
Fix bug when revealing an array.
mkskeller Feb 14, 2023
389824f
Fix bug in integer division.
mkskeller Feb 15, 2023
7266f3b
Fix performance bug in client communication with Shamir-based protocols.
mkskeller Feb 15, 2023
5153c63
More accessible machine learning functionality.
mkskeller Feb 16, 2023
300e9a1
Missing quotes.
mkskeller Feb 17, 2023
e369242
Fix typo in README
martin2384798 Feb 21, 2023
23cfb52
Merge pull request #880 from martin2384798/master
mkskeller Feb 22, 2023
9a671d0
Fix bug in array initialization.
mkskeller Feb 23, 2023
3e674c8
Remove unnecessary assertion.
mkskeller Feb 23, 2023
e388ab2
Fix bug in while loop.
mkskeller Mar 7, 2023
4e97f20
Improved client communication statistics.
mkskeller Mar 8, 2023
1308c26
Add documentation on schedule files and memory size indication.
mkskeller Mar 8, 2023
52cef40
Fix bug in documentation.
mkskeller Mar 8, 2023
b0b60b3
Fix bug in sint-cint matrix multiplication.
mkskeller Mar 8, 2023
fe12945
Fix bug in Low/HighGear key generation with multithreaded programs.
mkskeller Mar 9, 2023
abc4c67
Fix bug in register overwriting.
mkskeller Mar 10, 2023
bd5ae2b
More convenient SHA-3 usage.
mkskeller Mar 13, 2023
5d05f09
Fewer warnings.
mkskeller Mar 13, 2023
f3d5cc4
Fix bug in register update.
mkskeller Mar 14, 2023
1a73c74
Required preprocessing for semi-honest protocols.
mkskeller Mar 15, 2023
d1fefe1
Fix bug in register update.
mkskeller Mar 15, 2023
69bb53a
Fix bug in documentation.
mkskeller Mar 15, 2023
0e04248
Fix bug in multithreaded matrix multiplication.
mkskeller Mar 27, 2023
6e0c4ea
Reduce memory usage in matrix multiplication with Beaver-based protoc…
mkskeller Mar 28, 2023
2567855
Fix bug in Bristol Fashion circuits with multiple outputs.
mkskeller Mar 28, 2023
55b0810
Limit number of matrix triples in Dealer protocol to command-line par…
mkskeller Mar 28, 2023
95ea9f3
Fix bug in square layer back-propagation.
mkskeller Mar 28, 2023
34b4dd0
Less communication for probabilistic truncation in Rep3.
mkskeller Mar 29, 2023
e3ed7f6
Fix bug in mixed-type matrix multiplication.
mkskeller Apr 3, 2023
527b6b0
Avoid unnecessary communication in Dealer protocol.
mkskeller Apr 3, 2023
0bf7ad8
Convert single bits from arithmetic to binary.
mkskeller Apr 3, 2023
1de1922
Operator overloading for fixed-point power.
mkskeller Apr 5, 2023
b1157c7
Fix Sphinx version.
mkskeller Apr 6, 2023
9d578a3
Security bug: proper accounting for random elements.
mkskeller Apr 13, 2023
e5d89c3
ABY3 probabilistic truncation.
mkskeller Apr 13, 2023
933ea3f
Full range functionality in for_range_opt.
mkskeller Apr 20, 2023
85c683e
Fix bug in BMR input.
mkskeller Apr 20, 2023
2b0e1bc
Makefile: Clean dependencies
matthiasgeihs Apr 19, 2023
7dbb7b1
Merge pull request #988 from torusresearch/clean-deps
mkskeller Apr 26, 2023
640b1a9
Fix bug in updating binary values.
mkskeller Apr 26, 2023
accc43f
Merge remote-tracking branch 'up/master' into ppc-rc2
fqliao Apr 26, 2023
3b3cb0c
fix adapt network
fqliao Apr 27, 2023
eac543d
Merge pull request #7 from fqliao/ppc-rc2
fqliao Apr 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,10 @@ Thumbs.db

# Sphinx build
_build/

# environment
.env

# temp doc files
doc/readme.md
doc/xml
14 changes: 10 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
[submodule "SimpleOT"]
path = SimpleOT
path = deps/SimpleOT
url = https://github.com/mkskeller/SimpleOT
[submodule "mpir"]
path = mpir
url = git://github.com/wbhart/mpir.git
path = deps/mpir
url = https://github.com/wbhart/mpir
[submodule "Programs/Circuits"]
path = Programs/Circuits
url = https://github.com/mkskeller/bristol-fashion
[submodule "simde"]
path = simde
path = deps/simde
url = https://github.com/simd-everywhere/simde
[submodule "deps/libOTe"]
path = deps/libOTe
url = https://github.com/mkskeller/softspoken-implementation
[submodule "deps/SimplestOT_C"]
path = deps/SimplestOT_C
url = https://github.com/mkskeller/SimplestOT_C
3 changes: 2 additions & 1 deletion BMR/Party.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ FakeProgramParty::FakeProgramParty(int argc, const char** argv) :
}
cout << "Compiler: " << prev << endl;
P = new PlainPlayer(N, 0);
Share<gf2n_long>::MAC_Check::setup(*P);
if (argc > 4)
threshold = atoi(argv[4]);
cout << "Threshold for multi-threaded evaluation: " << threshold << endl;
Expand All @@ -259,7 +260,6 @@ ProgramParty::~ProgramParty()
reset();
if (P)
{
cerr << "Data sent: " << 1e-6 * P->comm_stats.total_data() << " MB" << endl;
delete P;
}
delete[] eval_threads;
Expand All @@ -281,6 +281,7 @@ FakeProgramParty::~FakeProgramParty()
cerr << "Dynamic storage: " << 1e-9 * dynamic_memory.capacity_in_bytes()
<< " GB" << endl;
#endif
Share<gf2n_long>::MAC_Check::teardown();
}

void FakeProgramParty::_compute_prfs_outputs(Key* keys)
Expand Down
2 changes: 0 additions & 2 deletions BMR/RealGarbleWire.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ class RealGarbleWire : public PRFRegister
static void inputbvec(GC::Processor<GC::Secret<RealGarbleWire>>& processor,
ProcessorBase& input_processor, const vector<int>& args);

RealGarbleWire(const Register& reg) : PRFRegister(reg) {}

void garble(PRFOutputs& prf_output, const RealGarbleWire<T>& left,
const RealGarbleWire<T>& right);

Expand Down
4 changes: 2 additions & 2 deletions BMR/RealGarbleWire.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void RealGarbleWire<T>::inputbvec(
{
GarbleInputter<T> inputter;
processor.inputbvec(inputter, input_processor, args,
inputter.party.P->my_num());
*inputter.party.P);
}

template<class T>
Expand Down Expand Up @@ -175,7 +175,7 @@ void GarbleInputter<T>::exchange()
assert(party.P != 0);
assert(party.MC != 0);
auto& protocol = party.shared_proc->protocol;
protocol.init_mul(party.shared_proc);
protocol.init_mul();
for (auto& tuple : tuples)
protocol.prepare_mul(tuple.first->mask,
T::constant(1, party.P->my_num(), party.mac_key)
Expand Down
23 changes: 13 additions & 10 deletions BMR/RealProgramParty.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RealProgramParty<T>* RealProgramParty<T>::singleton = 0;

template<class T>
RealProgramParty<T>::RealProgramParty(int argc, const char** argv) :
garble_processor(garble_machine), dummy_proc({{}, 0})
garble_processor(garble_machine), dummy_proc({}, 0)
{
assert(singleton == 0);
singleton = this;
Expand Down Expand Up @@ -64,7 +64,6 @@ RealProgramParty<T>::RealProgramParty(int argc, const char** argv) :
online_opts = {opt, argc, argv, 1000};
else
online_opts = {opt, argc, argv};
assert(not online_opts.interactive);

online_opts.finalize(opt, argc, argv);
this->load(online_opts.progname);
Expand Down Expand Up @@ -97,8 +96,6 @@ RealProgramParty<T>::RealProgramParty(int argc, const char** argv) :
if (online_opts.live_prep)
{
mac_key.randomize(prng);
if (T::needs_ot)
BaseMachine::s().ot_setups.push_back({*P, true});
prep = new typename T::LivePrep(0, usage);
}
else
Expand All @@ -107,13 +104,13 @@ RealProgramParty<T>::RealProgramParty(int argc, const char** argv) :
prep = new Sub_Data_Files<T>(N, prep_dir, usage);
}

T::MAC_Check::setup(*P);
MC = new typename T::MAC_Check(mac_key);

garble_processor.reset(program);
this->processor.open_input_file(N.my_num(), 0);
this->processor.open_input_file(N.my_num(), 0, online_opts.cmd_private_input_file);
this->processor.setup_redirection(P->my_num(), 0, online_opts, this->processor.out);

T::bit_type::mac_key_type::init_field();
GC::ShareThread<typename T::bit_type> share_thread(N, online_opts, *P, 0, usage);
shared_proc = new SubProcessor<T>(dummy_proc, *MC, *prep, *P);

auto& inputter = shared_proc->input;
Expand Down Expand Up @@ -157,7 +154,10 @@ RealProgramParty<T>::RealProgramParty(int argc, const char** argv) :
while (next != GC::DONE_BREAK);

MC->Check(*P);
data_sent = P->comm_stats.total_data() + prep->data_sent();
data_sent = P->total_comm().sent;

if (online_opts.verbose)
P->total_comm().print();

this->machine.write_memory(this->N.my_num());
}
Expand All @@ -175,15 +175,17 @@ void RealProgramParty<T>::garble()
garble_jobs.clear();
garble_inputter->reset_all(*P);
auto& protocol = *garble_protocol;
protocol.init_mul(shared_proc);
protocol.init(*prep, shared_proc->MC);
protocol.init_mul();

next = this->first_phase(program, garble_processor, this->garble_machine);

garble_inputter->exchange();
protocol.exchange();

typename T::Protocol second_protocol(*P);
second_protocol.init_mul(shared_proc);
second_protocol.init(*prep, shared_proc->MC);
second_protocol.init_mul();
for (auto& job : garble_jobs)
job.middle_round(*this, second_protocol);

Expand Down Expand Up @@ -215,6 +217,7 @@ RealProgramParty<T>::~RealProgramParty()
delete garble_inputter;
delete garble_protocol;
cout << "Data sent = " << data_sent * 1e-6 << " MB" << endl;
T::MAC_Check::teardown();
}

template<class T>
Expand Down
1 change: 1 addition & 0 deletions BMR/Register.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ void EvalRegister::inputb(GC::Processor<GC::Secret<EvalRegister> >& processor,
octetStream& my_os = oss[party.get_id() - 1];
vector<InputAccess> accesses;
InputArgList a(args);
processor.complexity += a.n_input_bits();
for (auto x : a)
{
accesses.push_back({x , processor});
Expand Down
38 changes: 17 additions & 21 deletions BMR/Register.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ using namespace std;
#include "Tools/PointerVector.h"
#include "Tools/Bundle.h"
#include "Tools/SwitchableOutput.h"
#include "Processor/Instruction.h"

//#define PAD_TO_8(n) (n+8-n%8)
#define PAD_TO_8(n) (n)
Expand Down Expand Up @@ -151,7 +152,7 @@ class Register {
* for pipelining matters.
*/

Register(int n_parties);
Register();

void init(int n_parties);
void init(int rfd, int n_parties);
Expand Down Expand Up @@ -234,6 +235,9 @@ class Phase
template <class T>
static void ands(T& processor, const vector<int>& args) { processor.ands(args); }
template <class T>
static void andrsvec(T& processor, const vector<int>& args)
{ processor.andrsvec(args); }
template <class T>
static void xors(T& processor, const vector<int>& args) { processor.xors(args); }
template <class T>
static void inputb(T& processor, const vector<int>& args) { processor.input(args); }
Expand All @@ -243,6 +247,9 @@ class Phase
template <class T>
static T get_input(int from, GC::Processor<T>& processor, int n_bits)
{ return T::input(from, processor.get_input(n_bits), n_bits); }
template<class U>
static void reveal_inst(GC::Processor<U>& processor, const vector<int>& args)
{ processor.reveal(args); }

template<class T>
static void convcbit(Integer& dest, const GC::Clear& source, T&)
Expand Down Expand Up @@ -274,10 +281,6 @@ class ProgramRegister : public Phase, public Register

static int threshold(int) { throw not_implemented(); }

static Register new_reg();
static Register tmp_reg() { return new_reg(); }
static Register and_reg() { return new_reg(); }

template<class T>
static void store(NoMemory& dest,
const vector<GC::WriteAccess<T> >& accesses) { (void)dest; (void)accesses; }
Expand All @@ -286,6 +289,15 @@ class ProgramRegister : public Phase, public Register
static void inputbvec(T& processor, ProcessorBase& input_processor,
const vector<int>& args);

template<class U>
static void convcbit2s(GC::Processor<U>&, const BaseInstruction&)
{ throw runtime_error("convcbit2s not implemented"); }
template<class U>
static void andm(GC::Processor<U>&, const BaseInstruction&)
{ throw runtime_error("andm not implemented"); }

static void run_tapes(const vector<int>&) { throw not_implemented(); }

// most BMR phases don't need actual input
template<class T>
static T get_input(GC::Processor<T>& processor, const InputArgs& args)
Expand All @@ -295,8 +307,6 @@ class ProgramRegister : public Phase, public Register
void other_input(Input&, int) {}

char get_output() { return 0; }

ProgramRegister(const Register& reg) : Register(reg) {}
};

class PRFRegister : public ProgramRegister
Expand All @@ -308,8 +318,6 @@ class PRFRegister : public ProgramRegister
static void load(vector<GC::ReadAccess<T> >& accesses,
const NoMemory& source);

PRFRegister(const Register& reg) : ProgramRegister(reg) {}

void op(const PRFRegister& left, const PRFRegister& right, Function func);
void XOR(const Register& left, const Register& right);
void input(party_id_t from, char input = -1);
Expand Down Expand Up @@ -385,8 +393,6 @@ class EvalRegister : public ProgramRegister
static void convcbit(Integer& dest, const GC::Clear& source,
GC::Processor<GC::Secret<EvalRegister>>& proc);

EvalRegister(const Register& reg) : ProgramRegister(reg) {}

void op(const ProgramRegister& left, const ProgramRegister& right, Function func);
void XOR(const Register& left, const Register& right);

Expand Down Expand Up @@ -416,8 +422,6 @@ class GarbleRegister : public ProgramRegister
static void load(vector<GC::ReadAccess<T> >& accesses,
const NoMemory& source);

GarbleRegister(const Register& reg) : ProgramRegister(reg) {}

void op(const Register& left, const Register& right, Function func);
void XOR(const Register& left, const Register& right);
void input(party_id_t from, char value = -1);
Expand All @@ -441,8 +445,6 @@ class RandomRegister : public ProgramRegister
static void load(vector<GC::ReadAccess<T> >& accesses,
const NoMemory& source);

RandomRegister(const Register& reg) : ProgramRegister(reg) {}

void randomize();

void op(const Register& left, const Register& right, Function func);
Expand All @@ -458,12 +460,6 @@ class RandomRegister : public ProgramRegister
};


inline Register::Register(int n_parties) :
garbled_entry(n_parties), external(NO_SIGNAL),
mask(NO_SIGNAL), keys(n_parties)
{
}

inline void KeyVector::operator=(const KeyVector& other)
{
resize(other.size());
Expand Down
12 changes: 2 additions & 10 deletions BMR/Register.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,7 @@ void ProgramRegister::inputbvec(T& processor, ProcessorBase& input_processor,
const vector<int>& args)
{
NoOpInputter inputter;
int my_num = -1;
try
{
my_num = ProgramParty::s().P->my_num();
}
catch (exception&)
{
}
processor.inputbvec(inputter, input_processor, args, my_num);
processor.inputbvec(inputter, input_processor, args, *ProgramParty::s().P);
}

template<class T>
Expand All @@ -31,7 +23,7 @@ void EvalRegister::inputbvec(T& processor, ProcessorBase& input_processor,
{
EvalInputter inputter;
processor.inputbvec(inputter, input_processor, args,
ProgramParty::s().P->my_num());
*ProgramParty::s().P);
}

template <class T>
Expand Down
6 changes: 3 additions & 3 deletions BMR/Register_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#include "CommonParty.h"
#include "Party.h"


inline Register ProgramRegister::new_reg()
inline Register::Register() :
garbled_entry(CommonParty::s().get_n_parties()), external(NO_SIGNAL),
mask(NO_SIGNAL), keys(CommonParty::s().get_n_parties())
{
return Register(CommonParty::s().get_n_parties());
}

#endif /* BMR_REGISTER_INLINE_H_ */
6 changes: 6 additions & 0 deletions BMR/TrustedParty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ BaseTrustedParty::BaseTrustedParty()
_received_gc_received = 0;
n_received = 0;
randomfd = open("/dev/urandom", O_RDONLY);
done_filling = false;
}

BaseTrustedParty::~BaseTrustedParty()
{
close(randomfd);
}

TrustedProgramParty::TrustedProgramParty(int argc, char** argv) :
Expand Down
3 changes: 1 addition & 2 deletions BMR/TrustedParty.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class BaseTrustedParty : virtual public CommonFakeParty {
vector<SendBuffer> msg_input_masks;

BaseTrustedParty();
virtual ~BaseTrustedParty() {}
virtual ~BaseTrustedParty();

/* From NodeUpdatable class */
virtual void NodeReady();
Expand Down Expand Up @@ -104,7 +104,6 @@ class TrustedProgramParty : public BaseTrustedParty {
void add_all_keys(const Register& reg, bool external);
};


inline void BaseTrustedParty::add_keys(const Register& reg)
{
for(int p = 0; p < get_n_parties(); p++)
Expand Down
Loading