Giter Club home page Giter Club logo

emp-m2pc's People

Contributors

fabrice102 avatar schoppmp avatar wangxiao1254 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

emp-m2pc's Issues

question on bob_preload

The following is the code of bob_preload in the class Malicious.

void bob_preload(){
		int sent = fio->bytes_sent;
		delete fio;
		fio = new FileIO(GC_FILE.c_str(), true);
		mio = new MemIO(0);
		mio->load_from_file(fio, sent);
		delete fio;
}

So it actually uses the fio->bytes_sent from bob_offline() assuming it is run before the bob_preload(). I guess it is for experiment purpose because, for measurement, we run offline and then test in online.

If offline and online are highly separated (garble today and use tomorrow), I guess sent here should be retrieved from the file size of GC_FILE.c_str()?

considering to submit a short PR for this.

Emp-m2pc test file executables not building

Hello,

I've faced several errors with regard to building the tests. For example:
/emp-m2pc/malicious/malicious.h:17:2: error: ‘MOTExtension’ does not name a type
17 | MOTExtension * ot;
| ^~~~~~~~~~~~
/emp-m2pc/malicious/malicious.h:18:2: error: ‘MOTExtension’ does not name a type
18 | MOTExtension * cot;
| ^~~~~~~~~~~~
/emp-m2pc/malicious/malicious.h:19:2: error: ‘Commitment’ does not name a type
19 | Commitment commitment;
| ^~~~~~~~~~
/emp-m2pc/malicious/malicious.h:21:2: error: ‘XorTree’ does not name a type
21 | XorTree<> * xortree;
| ^~~~~~~
These are some of the errors that crop up when building the sha1 test

Stack Smashing Error with Examples

After compiling the project, when I try to run the examples, I get "*** stack smashing detected ***: ./bin/sha1 terminated". This happens with all the examples included in the test directory.

I am running ./run ./bin/sha1 12345. The same happens with ./bin/sha1 1 12345 and ./bin/sha1 2 12345.

But, I am able to run the examples of emp-sh2pc correctly.

Not compiling with latest emp-toolkit/emp-tool version

emp-toolkit/emp-m2pc does not compile with the latest emp-toolkit/emp-tool version because of the following issues:

  1. removal of the function timeStamp from https://github.com/emp-toolkit/emp-tool/blob/stable/utils/utils.h and https://github.com/emp-toolkit/emp-tool/blob/stable/utils/utils.hpp.
  2. removal of the function xorBlocks_arr2 from https://github.com/emp-toolkit/emp-tool/blob/stable/utils/block.h.
  3. removal of the macro SERVER_IP.

For the first point, I guess the function was removed because clock_gettime was not supported in macOS < 10.12. The best solution might be to use std::chrono as in https://github.com/emp-toolkit/emp-tool/blob/master/emp-tool/utils/utils.hpp. In the later file however, the return type was changed from double to uint64_t. This might yield some issues. In the meantime, it might be simpler to keep the old implementation with clock_gettime and to require macOS >= 10.12.

My Mac fails because `NETWORK_BUFFER_SIZE` not sufficient for `sha256` in `emp-m2pc`

OK:) this is not an easy debug. I found the reason why my Mac always fails for sha256 in emp-m2pc due to res4=1 and Alice cheat=1, showing WRONG_ANS.

It seems that my Mac has a terrible loopback network (or I guess too fast?). The standard NETWORK_BUFFER_SIZE in emp_tool/utils/constants.h will make buffer insufficient and cause data loss -- the result is that Bob 'cheats' and the result for sha256 in emp-m2pc is wrong in my specific case.

My question is:
During the EUROCRYPT'17 paper and previous works on emp-toolkit, will a very high NETWORK_BUFFER_SIZE obviously hurts the performance (due to the loss of locality?)? If this performance change is not obvious, maybe the default value for NETWORK_BUFFER_SIZE in emp-tool/utils/constants.h can be changed to a larger one.

(I see the comment nearby said that this value should be adjusted for the specific network. I feel that this value should increase for emp-m2pc because the evaluation is slower, the network can be too fast.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.